aboutsummaryrefslogtreecommitdiff
path: root/office/LibreOffice/LibreOffice.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/LibreOffice/LibreOffice.SlackBuild')
-rw-r--r--office/LibreOffice/LibreOffice.SlackBuild118
1 files changed, 106 insertions, 12 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild
index dd02a3218ff9..ed9db052848d 100644
--- a/office/LibreOffice/LibreOffice.SlackBuild
+++ b/office/LibreOffice/LibreOffice.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=LibreOffice
SRCNAM=libreoffice
-VERSION=${VERSION:-6.1.0.3}
+VERSION=${VERSION:-6.1.1.2}
SHORT_VERSION=${VERSION%.*.*}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -81,12 +81,7 @@ 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 {} \;
-# Options
-avahi="" ; [ "${AVAHI:-no}" != "no" ] && avahi="--enable-avahi"
-vlc="" ; [ "${VLC:-no}" != "no" ] && vlc="--enable-vlc"
-kde4="--enable-kde4" ; [ "${KDE4:-yes}" != "yes" ] && kde4="--disable-kde4"
LOLANGS=${LOLANGS:-"de es fr id it ja nl vi zh-CN"}
-use_ccache="--disable-ccache" ; [ "${USE_CCACHE:-no}" != "no" ] && use_ccache=""
# By default, LibreOffice ignores MAKEFLAGS -j option and uses all available cpu cores.
parallel=""
@@ -110,6 +105,62 @@ elif [ "$JAVA" = "no" ]; then
use_java="--with-java=no"
fi
+# General optional use of packages available from SBo. If not found, LibreOffice internal versions are used
+if pkg-config --exists coinmp ; then coinmp="--with-system-coinmp" ; else coinmp="" ; fi
+if pkg-config --exists cppunit ; then cppunit="--with-system-cppunit" ; else cppunit="" ; fi
+if pkg-config --exists glm ; then glm="--with-system-glm" ; else glm="" ; fi
+if pkg-config --exists libabw-0.1 ; then libabw="--with-system-libabw" ; else libabw="" ; fi
+if pkg-config --exists libcdr-0.1 ; then libcdr="--with-system-libcdr" ; else libcdr="" ; fi
+if pkg-config --exists liblangtag ; then liblangtag="--with-system-liblangtag" ; else liblangtag="" ; fi
+if pkg-config --exists libcmis-0.5 ; then libcmis="--with-system-libcmis" ; else libcmis="" ; fi
+if pkg-config --exists libe-book-0.1 ; then libebook="--with-system-libebook" ; else libebook="" ; fi
+if pkg-config --exists libepubgen-0.1 ; then libepubgen="--with-system-libepubgen" ; else libepubgen="" ; fi
+if pkg-config --exists libeot ; then libeot="--with-system-libeot" ; else libeot="" ; fi
+if pkg-config --exists libetonyek-0.1 ; then libetonyek="--with-system-libetonyek" ; else libetonyek="" ; fi
+if pkg-config --exists libexttextcat ; then libexttextcat="--with-system-libexttextcat" ; else libexttextcat="" ; fi
+if pkg-config --exists libfreehand-0.1 ; then libfreehand="--with-system-libfreehand" ; else libfreehand="" ; fi
+if pkg-config --exists libmspub-0.1 ; then libmspub="--with-system-libmspub" ; else libmspub="" ; fi
+if pkg-config --exists libmwaw-0.3 ; then libmwaw="--with-system-libmwaw" ; else libmwaw="" ; fi
+if pkg-config --exists libnumbertext ; then libnumbertext="--with-system-libnumbertext" ; else libnumbertext="" ; fi
+if pkg-config --exists liborcus-0.13 ; then liborcus="--with-system-orcus" ; else liborcus="" ; fi
+if pkg-config --exists libpagemaker-0.0 ; then libpagemaker="--with-system-libpagemaker" ; else libpagemaker="" ; fi
+if pkg-config --exists libqxp-0.0 ; then libqxp="--with-system-libqxp" ; else libqxp="" ; fi
+if pkg-config --exists libstaroffice-0.0 ; then libstaroffice="--with-system-libstaroffice" ; else libstaroffice="" ; fi
+if pkg-config --exists libtommath ; then libtommath="--with-system-libtommath" ; else libtommath="" ; fi
+if pkg-config --exists libwps-0.4 ; then libwps="--with-system-libwps" ; else libwps="" ; fi
+if pkg-config --exists libzmf-0.0 ; then libzmf="--with-system-libzmf" ; else libzmf="" ; fi
+if pkg-config --exists libpq ; then postgresql="--with-system-postgresql" ; else postgresql="" ; fi
+if pkg-config --exists libucpp ; then ucpp="--with-system-ucpp" ; else ucpp="" ; fi
+if test -e /usr/include/lpsolve ; then lpsolve="--with-system-lpsolve" ; else lpsolve="" ; fi
+if pkg-config --exists mdds-1.2 ; then mdds="--with-system-mdds" ; else mdds="" ; fi
+if test -e /usr/include/mysql_connection.h ; then mysql="--with-system-mysql-cppconn" ; else mysql="" ; fi
+if pkg-config --exists mythes ; then mythes="--with-system-mythes" ; else mythes="" ; fi
+if test -x /usr/bin/odbc_config ; then odbc="--with-system-odbc" ; else odbc="" ; fi
+#if test -d /usr/lib${LIBDIRSUFFIX}/python3*/site-packages/lxml ; then lxml="--with-system-lxml" ; else lxml="" ; fi
+if pkg-config --exists xmlsec1 ; then xmlsec="--with-system-xmlsec" ; else xmlsec="" ; fi
+#if test -e /usr/share/ant/lib/rhino.jar ; then rhino="--with-system-rhino --with-rhino-jar=/usr/share/ant/lib/rhino.jar" ; else rhino="" ; fi
+if pkg-config --exists libvlc ; then vlc="--enable-vlc" ; else vlc="" ; fi
+# Building with vlc backend is marked as experimental so demand explicit indication via environment variable VLC to do it.
+[ "${VLC:-no}" != "yes" ] && vlc=""
+
+# Other options
+if pkg-config --exists avahi-core ; then avahi="--enable-avahi" ; else avahi="" ; fi
+if pkg-config --exists python3 ; then Python3="--enable-python=system" ; else Python3="" ; fi
+if pkg-config --exists Qt5 ; then qt5="--enable-qt5" ; else qt5="" ; fi
+if pkg-config --exists valgrind ; then valgrind="--with-valgrind" ; else valgrind="" ; fi
+
+kde4="--enable-kde4" ; [ "${KDE4:-yes}" != "yes" ] && kde4="--disable-kde4"
+use_ccache="--disable-ccache" ; [ "${USE_CCACHE:-no}" != "no" ] && use_ccache=""
+
+# Extensions
+extct2n="--enable-ext-ct2n"; [ "${EXTCT2N:-no}" != "yes" ] && extct2n=""
+extnumbertext="--enable-ext-numbertext"; [ "${EXTNUMBERTEXT:-no}" != "yes" ] && extnumbertext=""
+extlanguagetool="--enable-ext-languagetool"; [ "${EXTLANGUAGETOOL:-no}" != "yes" ] && extlanguagetool=""
+extwikipub="--enable-ext-wiki-publisher"; [ "${EXTWIKIPUB:-no}" != "yes" ] && extwikipub=""
+
+extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] && extnlpsolver=""
+extmariadb="--enable-ext-mariadb-connector"; [ "${EXTMARIADB:-yes}" != "yes" ] && extmariadb=""
+
./configure \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -124,17 +175,24 @@ fi
--with-vendor="Just Another Slacker" \
--with-lang="$LOLANGS" \
--enable-release-build=yes \
- --enable-python="system" \
- --enable-gio \
--enable-ext-mariadb-connector \
+ --enable-gio \
+ $extct2n \
+ $extnumbertext \
+ $extnlpsolver \
+ $extlanguagetool \
+ $extmariadb \
+ $extwikipub \
$avahi \
+ $Python3 \
$vlc \
$kde4 \
$use_ccache \
$use_java \
$parallel \
- --with-x \
+ --with-alloc=system \
--with-tls="nss" \
+ --with-x \
--without-krb5 \
--without-gssapi \
--without-junit \
@@ -147,27 +205,61 @@ fi
--with-system-clucene \
--with-system-curl \
--with-system-dicts \
+ --with-system-epoxy \
--with-system-expat \
--with-system-hunspell \
--with-system-icu \
--with-system-jpeg \
--with-system-lcms2 \
- --with-system-libepoxy \
--with-system-libodfgen \
--with-system-libpng \
--with-system-librevenge \
+ --with-system-libvisio \
--with-system-libwpd \
--with-system-libwpg \
--with-system-libxml \
--with-system-mariadb \
--with-system-neon \
--with-system-nss \
- --with-system-openldap-client \
+ --with-system-openldap \
--with-system-openssl \
--with-system-poppler \
--with-system-redland \
--with-system-sane \
--with-system-zlib \
+ $coinmp \
+ $cppunit \
+ $glm \
+ $libabw \
+ $libcdr \
+ $libcmis \
+ $libebook \
+ $libeot \
+ $libepubgen \
+ $mdds \
+ $libetonyek \
+ $libexttextcat \
+ $libfreehand \
+ $libmspub \
+ $libmwaw \
+ $liborcus \
+ $libnumbertext \
+ $libpagemaker \
+ $libqxp \
+ $libstaroffice \
+ $libtommath \
+ $libwps \
+ $libzmf \
+ $lpsolve \
+ $mythes \
+ $postgresql \
+ $qt5 \
+ $valgrind \
+ $ucpp \
+ $odbc \
+ $mysql \
+ $xmlsec \
+
#Create a srcs tarball if we don't already have one
@@ -202,7 +294,9 @@ for df in $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM-$VERSION/share/xdg/*.desktop ; do
sed -i -e "s/libreofficedev$SHORT_VERSION/libreoffice/g" $df
done
-PYSITEDIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+# Use the system python if we have it, else use the python just built with LibreOffice
+PYTHONEXE=$(which python3) || PYTHONEXE=$PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM/program/python
+PYSITEDIR=$($PYTHONEXE -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
mkdir -p $PKG/$PYSITEDIR
cat <<EOF >$PKG/$PYSITEDIR/pyuno.pth
import sys; sys.path.insert(0,'/usr/lib$LIBDIRSUFFIX/libreoffice/program')