diff options
author | Christoph Willing <chris.willing@linux.com> | 2022-06-03 08:53:20 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-06-04 10:37:05 +0700 |
commit | 5a9fd1a9e0e35fd2f72a39bf6cb9dc5a40508813 (patch) | |
tree | 35822101a39c20456bbf83a9848c86811f96ac19 /office/LibreOffice/LibreOffice.SlackBuild | |
parent | 1a15b65355dac33e3661bdb808c45d8029623bf8 (diff) |
office/LibreOffice: Make PyUNO build time optional
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/LibreOffice/LibreOffice.SlackBuild')
-rw-r--r-- | office/LibreOffice/LibreOffice.SlackBuild | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild index 4161ba47beaa..a33b8a57c049 100644 --- a/office/LibreOffice/LibreOffice.SlackBuild +++ b/office/LibreOffice/LibreOffice.SlackBuild @@ -30,7 +30,7 @@ PRGNAM=LibreOffice SRCNAM=libreoffice VERSION=${VERSION:-7.3.3.2} SHORT_VERSION=${VERSION%.*.*} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -308,11 +308,6 @@ make distro-pack-install DESTDIR=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -# Prefer GTK2 toolkit -cd $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM/program -sed -i -e '/^#\ restore/i# Prefer GTK2\nexport SAL_USE_VCLPLUGIN=${SAL_USE_VCLPLUGIN:-gtk}\n' soffice -cd - - cd $PKG/usr/lib$LIBDIRSUFFIX mv $SRCNAM $SRCNAM-$VERSION ln -s $SRCNAM-$VERSION $SRCNAM @@ -322,14 +317,17 @@ for df in $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM-$VERSION/share/xdg/*.desktop ; do sed -i -e "s/libreofficedev$SHORT_VERSION/libreoffice/g" $df done -# 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 +# Only enable pyuno if requested +if [ "${PYUNO:-no}" == "yes" ]; then + # 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') EOF -chmod 0644 $PKG/$PYSITEDIR/pyuno.pth + chmod 0644 $PKG/$PYSITEDIR/pyuno.pth +fi mkdir -p $PKG/etc/profile.d sd_prog=/usr/lib$LIBDIRSUFFIX/libreoffice/program |