From f3bb5bf2cc4a48428a8cac4ddbe77166e891c597 Mon Sep 17 00:00:00 2001 From: Tim Dickson Date: Fri, 4 Sep 2020 16:23:18 +0100 Subject: academic/bibletime: Updated for version 3.0. Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- academic/bibletime/README | 10 ++++- academic/bibletime/bibletime.SlackBuild | 74 ++++++++++++++++++++++++++++----- academic/bibletime/bibletime.info | 8 ++-- 3 files changed, 76 insertions(+), 16 deletions(-) diff --git a/academic/bibletime/README b/academic/bibletime/README index 1d351b5a56..85a6230bc1 100644 --- a/academic/bibletime/README +++ b/academic/bibletime/README @@ -1,8 +1,14 @@ BibleTime is a Bible study application for Linux. It is based on the K Desktop Environment and uses the Sword programming library to work with Bible texts, commentaries, dictionaries, and books provided by the -rosswire Bible Society. +Crosswire Bible Society. This version requires sword version 1.8.1 or higher, and qt5.9 or -higher +higher, as well as po4a and fop, as the documentation is created in the +build now. + +If you have a local version of cmake>=3.10 then setting CMAKEBINDIR +to the directory containing your local cmake binary will allow that to +be used instead of the version bundled in this script. It will save +several minutes of build time. diff --git a/academic/bibletime/bibletime.SlackBuild b/academic/bibletime/bibletime.SlackBuild index 9af701fef1..df21ddf077 100644 --- a/academic/bibletime/bibletime.SlackBuild +++ b/academic/bibletime/bibletime.SlackBuild @@ -26,10 +26,23 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Modified by Robert Delahunt [twinreverb[at]puresimplicity.net -# Modified 2018/9 by Tim Dickson (dickson.tim@googlemail.com) +# Modified 2018/19/20 by Tim Dickson (dickson.tim@googlemail.com) PRGNAM=bibletime -VERSION=${VERSION:-3.0_beta2} +VERSION=${VERSION:-3.0} +CMVERSION=${CMVERSION:-3.17.2} + +#if you have a private cmake v 3.10 or newer, setting CMAKEBINDIR with the +#full directory of the cmake binary will cause this script to try it +#instead of building it's own private version + +CHKCMAKE="no" +if [ "x${CMAKEBINDIR}" != "x" ]&&[ -d "${CMAKEBINDIR}" ]&&[ -x "${CMAKEBINDIR}/cmake" ]; then + #we make sure either main version is >3 or subversion>=10. this should + #cover all possibilities with slack14.2 or higher, although 15.0 should + #have newer version of cmake anyway :-) + CHKCMAKE=`${CMAKEBINDIR}/cmake --version|head -n1|awk '{print $NF}'|awk -F"." '($1>3)||($2>=10) {print "yes"}'` +fi BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -68,6 +81,13 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar -xJvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION + +#we need a private copy of a newer version of cmale (at least 3.10) +if [ "$CHKCMAKE" != "yes" ]; then + tar xvf $CWD/cmake-$CMVERSION.tar.gz +fi + +#sane permissions for everything chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -75,13 +95,45 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir build -#patch CMakeLists.txt so it works with verson of cmake on slack14.2 -#these patches can be removed once cmake gets to 3.10 or higher -sed -i "s/VERSION 3.10/VERSION 3.5/g" CMakeLists.txt -sed -i "s/^CHECK_IPO_SUPPORTED(RESULT HAVE_IPO)/SET(HAVE_IPO FALSE)/g" CMakeLists.txt -sed -i "s/^INCLUDE(CheckIPO/#INCLUDE(CheckIPO/g" CMakeLists.txt -sed -i "/TARGET_COMPILE_FEATURES/s/.*/SET(CMAKE_CXX_STANDARD 11)/" CMakeLists.txt +#first we do the private cmake stuff. +if [ "$CHKCMAKE" != "yes" ]; then + cd CMake-$CMVERSION + mkdir cmake-build + cd cmake-build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ../configure \ + --prefix=$TMP/$PRGNAM-$VERSION/tmpcmake \ + --docdir=/doc \ + --no-qt-gui \ + --system-curl \ + --system-expat \ + --no-system-jsoncpp \ + --system-zlib \ + --system-bzip2 \ + --system-libarchive + #we don't care about the docs really as this is a temp install. + make + make install + #hopefully that has installed our tmp cmake in the right place + #in $TMP/$PRGNAM-$VERSION/tmpcmake/bin + #lets make it available to the bibletime build + OLDPATH=$PATH + export PATH=$TMP/$PRGNAM-$VERSION/tmpcmake/bin:$PATH + #move back to the right directory + cd ../../ +else + #we passed a viable cmake alternative location, so use that. + OLDPATH=$PATH + export PATH=${CMAKEBINDIR}:$PATH +fi + +#we need to patch the cmake file to skip tests as they fail at the moment +#hopefully they will be fixed in 3.0.1 + +sed -i "/BTTests/s/^/#/" cmake/BTApplication.cmake + +mkdir -p build cd build cmake \ -Wno-dev \ @@ -90,7 +142,9 @@ cd build -DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_C_FLAGS="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ - -DLIB_SUFFIX=$LIBDIRSUFFIX .. + -DLIB_SUFFIX=$LIBDIRSUFFIX .. + #we have done the cmake stuff, so restore the PATH + export PATH=$OLDPATH make make install DESTDIR=$PKG cd .. diff --git a/academic/bibletime/bibletime.info b/academic/bibletime/bibletime.info index 06b7202b16..a590379f68 100644 --- a/academic/bibletime/bibletime.info +++ b/academic/bibletime/bibletime.info @@ -1,10 +1,10 @@ PRGNAM="bibletime" -VERSION="3.0_beta2" +VERSION="3.0" HOMEPAGE="http://www.bibletime.info/" -DOWNLOAD="https://github.com/bibletime/bibletime/releases/download/v3.0_beta2/bibletime-3.0_beta2.tar.xz" -MD5SUM="1874d442546791b5611343fbcf2aed73" +DOWNLOAD="https://github.com/bibletime/bibletime/releases/download/v3.0/bibletime-3.0.tar.xz https://github.com/KitWare/CMake/archive/v3.17.2/cmake-3.17.2.tar.gz" +MD5SUM="c90bcafa7938ff0257a8599c3d9cb024 41e0259ede89083081d3276ecaba5b38" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="sword qt5" +REQUIRES="sword qt5 po4a fop" MAINTAINER="Tim Dickson" EMAIL="dickson.tim@googlemail.com" -- cgit v1.2.3