academic/bibletime: Use cmake-202x.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2020-09-18 02:16:11 -04:00 committed by Willy Sudiarto Raharjo
parent 005c5e84e8
commit b6f67ff21c
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 6 additions and 66 deletions

View file

@ -27,23 +27,11 @@
# Modified by Robert Delahunt [twinreverb[at]puresimplicity.net
# Modified 2018/19/20 by Tim Dickson (dickson.tim@googlemail.com)
# Modified 20200918 by B. Watson <yalhcru@gmail.com>
PRGNAM=bibletime
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}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -82,52 +70,6 @@ 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 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
#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
@ -135,7 +77,7 @@ sed -i "/BTTests/s/^/#/" cmake/BTApplication.cmake
mkdir -p build
cd build
cmake \
/opt/cmake-202x/bin/cmake \
-Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@ -143,8 +85,6 @@ cd build
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DLIB_SUFFIX=$LIBDIRSUFFIX ..
#we have done the cmake stuff, so restore the PATH
export PATH=$OLDPATH
make
make install DESTDIR=$PKG
cd ..

View file

@ -1,10 +1,10 @@
PRGNAM="bibletime"
VERSION="3.0"
HOMEPAGE="http://www.bibletime.info/"
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="https://github.com/bibletime/bibletime/releases/download/v3.0/bibletime-3.0.tar.xz"
MD5SUM="c90bcafa7938ff0257a8599c3d9cb024"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="sword qt5 po4a fop"
REQUIRES="cmake-202x sword qt5 po4a fop"
MAINTAINER="Tim Dickson"
EMAIL="dickson.tim@googlemail.com"