office/LibreOffice: Handle incompatible system boost

Signed-off-by: Christoph Willing <chris.willing@linux.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2023-04-08 15:29:52 +10:00 committed by Willy Sudiarto Raharjo
parent cbd1879709
commit 0449fb4fac
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -30,7 +30,7 @@ PRGNAM=LibreOffice
SRCNAM=libreoffice
VERSION=${VERSION:-7.5.2.2}
SHORT_VERSION=${VERSION%.*.*}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -189,6 +189,16 @@ extwikipub="--enable-ext-wiki-publisher"; [ "${EXTWIKIPUB:-no}" != "yes" ] &
extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] && extnlpsolver=""
# Temporary fix for problems with boost > 1.80
# Results in additional download of compatible boost to use internally
BOOST_MINOR_VERSION=$(basename $(ls -d /usr/lib${LIBDIRSUFFIX}/cmake/Boost-1.*) | cut -d'.' -f2)
if [ "$BOOST_MINOR_VERSION" -gt "80" ]; then
boost="--without-system-boost"
else
boost="--with-system-boost"
fi
./configure \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@ -222,7 +232,6 @@ extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] &
--without-junit \
--with-help \
--with-system-bluez \
--with-system-boost \
--with-system-bzip2 \
--with-system-cairo \
--with-system-clucene \
@ -249,6 +258,7 @@ extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] &
--with-system-poppler \
--with-system-sane \
--with-system-zlib \
$boost \
$coinmp \
$cppunit \
$glm \
@ -298,7 +308,6 @@ sed -i external/libebook/ExternalProject_libebook.mk \
-e '/configure /i \\t\t&& sed -i "s/TRUE/true/g" src/lib/EBOOKCharsetConverter.cpp \\'
export LDFLAGS="-lboost_system"
make build
make distro-pack-install DESTDIR=$PKG