office/jfbview: Fix imlib2-1.10.0 breakage.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-01-04 01:58:13 -05:00 committed by Willy Sudiarto Raharjo
parent ebf3fa231f
commit 143cdde0d8
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -9,12 +9,17 @@
# This doesn't depend on mupdf or mupdf-legacy because it includes its
# own bundled mupdf source.
# 20230104 bkw: BUILD=2
# - fix imlib2 builds (broke with recent imlib2 update to 1.10.0).
# - fix PKGTYPE mess.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jfbview
VERSION=${VERSION:-0.6.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -68,18 +73,24 @@ sed -i -e 's,share/man,man,g' \
doc/CMakeLists.txt
# no autodetect for imlib2, help it out some.
IMLIB_OPT=off
[ "${IMLIB:-yes}" = "yes" ] && pkg-config --exists imlib2 && IMLIB_OPT=on
# 20230104 bkw: imlib2 no longer has /usr/bin/imlib2-config, which
# the FindImlib2.cmake in jfbview's source wants. Work around it by
# manually setting the cmake vars it would automatically set.
if [ "${IMLIB:-yes}" = "yes" ] && pkg-config --exists imlib2; then
IMLIB_OPT="-DENABLE_IMAGE_SUPPORT=ON -DIMLIB2_FOUND=ON -DIMLIB2_LIBRARIES=-lImlib2"
else
IMLIB_OPT="-DENABLE_IMAGE_SUPPORT=OFF"
fi
mkdir -p build
cd build
cmake \
-DENABLE_IMAGE_SUPPORT=$IMLIB_OPT \
$IMLIB_OPT \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make
make VERBOSE=1
make install/strip DESTDIR=$PKG
cd ..
@ -103,4 +114,4 @@ mkdir -p $PKG/install
sed "s,@WITHIM@,$WITHIM," $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE