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.SlackBuild121
1 files changed, 60 insertions, 61 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild
index 676be1aa01..221f7d0289 100644
--- a/office/LibreOffice/LibreOffice.SlackBuild
+++ b/office/LibreOffice/LibreOffice.SlackBuild
@@ -1,6 +1,4 @@
#!/bin/bash
-#
-# ex:set ai shiftwidth=4 inputtab=spaces smarttab noautotab:
# Slackware build script for LibreOffice
@@ -24,11 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-cd $(dirname $0) ; CWD=$(pwd)
+cd "$(dirname "$0")" ; CWD=$(pwd)
PRGNAM=LibreOffice
SRCNAM=libreoffice
-VERSION=${VERSION:-25.2.4.3}
+VERSION=${VERSION:-25.8.1.1}
SHORT_VERSION=${VERSION%.*.*}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,39 +67,40 @@ else
LIBDIRSUFFIX=""
fi
-if [ -x /usr/bin/gcc-11.* ];
+
+set -e
+
+rm -rf "$PKG"
+mkdir -p "$TMP" "$PKG" "$OUTPUT"
+cd "$TMP"
+rm -rf "$SRCNAM"-"$VERSION"
+tar xvf "$CWD"/"$SRCNAM"-"$VERSION".tar.xz
+cd "$SRCNAM"-"$VERSION"
+
+#if [ -x /usr/bin/gcc-11.* ];
+if [[ "$(gcc --version |head -1 |cut -d' ' -f3)" == "11."* ]];
then
echo Slackware-15.0
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
CXXCLANGFLAGS="-Wno-c++11-narrowing"
+ # for 28.5.0.4
+ sed -i -e '/errEncrypted/c printf("#ERROR:%d\\n", err);' sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+ PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+ export PYTHONPATH=/opt/python$PYVER/site-packages
else
echo Slackware-15.0++
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
fi
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
-cd $SRCNAM-$VERSION
-
-# Needed for 15.0 - not for -current
-if [ -x /usr/bin/gcc-11.* ]; then
- patch -p0 < $CWD/xpdfwrapper_invalid-argument.diff
-fi
-
-if [ -r $CWD/$SRCNAM-${VERSION}-srcs.tar.xz ]; then
- tar xvf $CWD/$SRCNAM-${VERSION}-srcs.tar.xz
+if [ -r "$CWD"/"$SRCNAM"-"${VERSION}"-srcs.tar.xz ]; then
+ tar xvf "$CWD"/"$SRCNAM"-"${VERSION}"-srcs.tar.xz
# For 7.2.0.4 these aren't found as previously so unpack them manually
- cd $TMP
- tar xf libreoffice-${VERSION}/external/tarballs/libreoffice-translations-${VERSION}.tar.xz
- tar xf libreoffice-${VERSION}/external/tarballs/libreoffice-help-${VERSION}.tar.xz
- cd $SRCNAM-$VERSION
+ cd "$TMP"
+ tar xf libreoffice-"${VERSION}"/external/tarballs/libreoffice-translations-"${VERSION}".tar.xz
+ tar xf libreoffice-"${VERSION}"/external/tarballs/libreoffice-help-"${VERSION}".tar.xz
+ cd "$SRCNAM"-"$VERSION"
else
HAVE_SRCS_TARBALL=0
fi
@@ -118,7 +117,7 @@ LOLANGS=${LOLANGS:-"de es fr id it ja nl vi zh-CN"}
# By default, LibreOffice ignores MAKEFLAGS -j option and uses all available cpu cores.
parallel=""
# If MAKEFLAGS contains -j option, we extract its value to override the default.
-jval="$(echo $MAKEFLAGS |grep -o "\-j *[0-9]*" | grep -o "[0-9]*")" || true
+jval="$(echo "$MAKEFLAGS" |grep -o "\-j *[0-9]*" | grep -o "[0-9]*")" || true
[ -n "$jval" ] && parallel="--with-parallelism=$jval"
# If PARALLEL environment variable is set, use that to override everything.
[ "${PARALLEL:-0}" != "0" ] && parallel="--with-parallelism=$PARALLEL"
@@ -130,8 +129,8 @@ else
if [ -z "$JAVA_HOME" ]; then
# if JAVA_HOME isn't set, try to set it by sourcing the profile script
for i in /etc/profile.d/*jdk*.sh; do
- if [ -x $i ]; then
- source $i
+ if [ -x "$i" ]; then
+ source "$i"
break
fi
done
@@ -219,10 +218,10 @@ if pkg-config --atleast-version 24.11.0 poppler ; then poppler="--without-system
NSS_CFLAGS="$(pkg-config --cflags-only-I mozilla-nss)"\
--prefix=/usr \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --libdir=/usr/lib$LIBDIRSUFFIX \
+ --docdir=/usr/doc/"$PRGNAM"-"$VERSION" \
+ --libdir=/usr/lib"$LIBDIRSUFFIX" \
--sysconfdir=/etc \
- --build=$ARCH-slackware-linux \
+ --build="$ARCH"-slackware-linux \
--with-vendor="Just Another Slacker" \
--with-lang="$LOLANGS" \
--enable-release-build=yes \
@@ -238,8 +237,8 @@ if pkg-config --atleast-version 24.11.0 poppler ; then poppler="--without-system
$avahi \
$vlc \
$use_ccache \
- $use_java \
- $parallel \
+ "$use_java" \
+ "$parallel" \
--with-tls="nss" \
--with-x \
--without-krb5 \
@@ -311,12 +310,12 @@ if pkg-config --atleast-version 24.11.0 poppler ; then poppler="--without-system
chmod a+x bin/unpack-sources
if [ "$HAVE_SRCS_TARBALL" = "0" ]; then
make fetch
- tar cvf - external/tarballs | xz -c > $CWD/$SRCNAM-$VERSION-srcs.tar.xz
+ tar cvf - external/tarballs | xz -c > "$CWD"/"$SRCNAM"-"$VERSION"-srcs.tar.xz
echo ; echo "Run build script again with HAVE_SRCS_TARBALL=1"
exit 0
fi
-patch -p0 < $CWD/no-check-if-root.diff
+patch -p0 < "$CWD"/no-check-if-root.diff
# GCC10 requirements (Tx alienBOB)
sed -i external/libebook/ExternalProject_libebook.mk \
@@ -324,18 +323,18 @@ sed -i external/libebook/ExternalProject_libebook.mk \
make build
-make distro-pack-install DESTDIR=$PKG
+make distro-pack-install DESTDIR="$PKG"
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+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
-cd $PKG/usr/lib$LIBDIRSUFFIX
-mv $SRCNAM $SRCNAM-$VERSION
-ln -s $SRCNAM-$VERSION $SRCNAM
+cd "$PKG"/usr/lib"$LIBDIRSUFFIX"
+mv "$SRCNAM" "$SRCNAM"-"$VERSION"
+ln -s "$SRCNAM"-"$VERSION" "$SRCNAM"
cd -
-for df in $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM-$VERSION/share/xdg/*.desktop ; do
- sed -i -e "s/libreofficedev$SHORT_VERSION/libreoffice/g" $df
+for df in "$PKG"/usr/lib"$LIBDIRSUFFIX"/"$SRCNAM"-"$VERSION"/share/xdg/*.desktop ; do
+ sed -i -e "s/libreofficedev$SHORT_VERSION/libreoffice/g" "$df"
done
# Only enable pyuno if requested
@@ -343,34 +342,34 @@ 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
+ 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
-cat <<EOF >$PKG/etc/profile.d/libreoffice.sh
-export UNO_PATH=$sd_prog
+mkdir -p "$PKG"/etc/profile.d
+sd_prog=/usr/lib"$LIBDIRSUFFIX"/libreoffice/program
+cat <<EOF >"$PKG"/etc/profile.d/libreoffice.sh
+export UNO_PATH="$sd_prog"
export URE_BOOTSTRAP=vnd.sun.star.pathname:$sd_prog/fundamentalrc
export PATH=\${PATH}:$sd_prog
EOF
-cat <<EOF >$PKG/etc/profile.d/libreoffice.csh
-setenv UNO_PATH $sd_prog
-setenv URE_BOOTSTRAP vnd.sun.star.pathname:$sd_prog/fundamentalrc
+cat <<EOF >"$PKG"/etc/profile.d/libreoffice.csh
+setenv UNO_PATH "$sd_prog"
+setenv URE_BOOTSTRAP vnd.sun.star.pathname:sd_prog/fundamentalrc
setenv PATH \${PATH}:$sd_prog
EOF
-chmod 0755 $PKG/etc/profile.d/libreoffice.{csh,sh}
+chmod 0755 "$PKG"/etc/profile.d/libreoffice.{csh,sh}
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING* README* $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mkdir -p "$PKG"/usr/doc/"$PRGNAM"-"$VERSION"
+cp -a COPYING* README* "$PKG"/usr/doc/"$PRGNAM"-"$VERSION"
+cat "$CWD"/"$PRGNAM".SlackBuild > "$PKG"/usr/doc/"$PRGNAM"-"$VERSION"/"$PRGNAM".SlackBuild
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+mkdir -p "$PKG"/install
+cat "$CWD"/slack-desc > "$PKG"/install/slack-desc
+cat "$CWD"/doinst.sh > "$PKG"/install/doinst.sh
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
+cd "$PKG"
+/sbin/makepkg -l y -c n "$OUTPUT"/"$PRGNAM"-"$VERSION"-"$ARCH"-"$BUILD""$TAG"."$PKGTYPE"