summaryrefslogtreecommitdiffstats
path: root/libreoffice/build/libreoffice36.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-10-21 19:31:29 +0000
committer Eric Hameleers <alien@slackware.com>2010-10-21 19:31:29 +0000
commit5a127d74e64c13b522b1ed64cab54c31f4769597 (patch)
treef9eb11de1d22f550f74372dc770d73696b7c183f /libreoffice/build/libreoffice36.SlackBuild
parentfabbe7457587394e16838a0bb2f67f74fee68428 (diff)
downloadasb-5a127d74e64c13b522b1ed64cab54c31f4769597.tar.gz
asb-5a127d74e64c13b522b1ed64cab54c31f4769597.tar.xz
Allow for building on system without KDE4
Diffstat (limited to 'libreoffice/build/libreoffice36.SlackBuild')
-rwxr-xr-xlibreoffice/build/libreoffice36.SlackBuild57
1 files changed, 44 insertions, 13 deletions
diff --git a/libreoffice/build/libreoffice36.SlackBuild b/libreoffice/build/libreoffice36.SlackBuild
index bf3e385d..43c1c328 100755
--- a/libreoffice/build/libreoffice36.SlackBuild
+++ b/libreoffice/build/libreoffice36.SlackBuild
@@ -41,6 +41,8 @@
# run-time dependencies any more.
# 20101013-1: 13/oct/2010 by Eric Hameleers <alien@slackware.com>
# * Fix permissions of LICENSE.odt file.
+# Add additional (non-english) language support - code taken from
+# GnomeSlackBuild project's openoffice3.SlackBuild script.
#
# Run 'sh libreoffice.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -60,6 +62,14 @@ TAG=${TAG:-alien}
DOCS="AUTHORS COPYING* MAINTAINERS NEWS README* TODO TOTEST"
+# Select default langue for the libreoffice package:
+DEF_LANG=${DEF_LANG:-"en-US"}
+# Should we generate additional language packs:
+ADD_LANGUAGES=${ADD_LANGUAGES:-"YES"}
+
+# We keep languages plus their descriptive names in an external file:
+LANGUAGES="$(cat $SRCDIR/languages |cut -f1 -d= |tr '\n' ' ' |tr -s ' ' |sed -e 's/ *$//')"
+
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -215,10 +225,16 @@ echo Building ...
# Look for something like: AC_INIT(libreoffice-build, 3.2.99.2)
LOVER=$(cat configure.in | grep ^AC_INIT | sed -e 's/.*, \(.\+\))/\1/')
-# Stupid but what can I do... LibreOffice detection routines suck:
-export KDE4DIR="$KDEDIRS"
-export QT4INC="$QT4DIR/include"
-export QT4LIB="$QT4DIR/lib${LIBDIRSUFFIX}"
+# Check for an installed KDE4 and assume Qt4:
+if [ ! -z "$KDEDIRS" ]; then
+ # Stupid but what can I do... LibreOffice detection routines suck:
+ export KDE4DIR="$KDEDIRS"
+ export QT4INC="$QT4DIR/include"
+ export QT4LIB="$QT4DIR/lib${LIBDIRSUFFIX}"
+ KDEOPTS="--enable-kde4"
+else
+ KDEOPTS="--disable-kde4"
+fi
# Regular build flags:
export LDFLAGS="$SLKLDFLAGS"
@@ -233,20 +249,33 @@ export OODESTDIR="$PKG"
# Substitute our Slackware-specific configuration:
cat $SRCDIR/Slackware.conf.in > distro-configs/Slackware.conf.in
+# If this local directory does not exist during configuration,
+# support for Open Clip Art will be disabled:
+mkdir -p /usr/share/openclipart
+
+# Do we generate language packs?
+if [ "$ADD_LANGUAGES" != "YES" ]; then
+ LANGUAGES="$DEF_LANG"
+else
+ LANGUAGES="${DEF_LANG} $(echo ${LANGUAGES} |sed -e 's/${DEF_LANG} *//')"
+fi
+
enable_pam=no \
./autogen.sh \
- --with-git \
- --with-distro=Slackware \
+ --with-arch-flags="$SLKCFLAGS" \
--with-build-version="SlackBuild by Eric Hameleers" \
+ --with-distro=Slackware \
+ --with-docdir=/usr/doc/$PRGNAM-${LOVER}_$VERSION \
+ --with-git \
--with-installed-ooo-dirname=$PRGNAM \
- --with-arch-flags="$SLKCFLAGS" \
+ --with-lang="${LANGUAGES}" \
--with-num-cpus=${NUMCPUS} \
- --with-docdir=/usr/doc/$PRGNAM-${LOVER}_$VERSION \
--without-binsuffix \
--docdir=/usr/doc/$PRGNAM-${LOVER}_$VERSION \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
+ ${KDEOPTS} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
./download \
@@ -262,11 +291,13 @@ make -i verbose=yes \
2>&1 | tee $OUTPUT/install-${PRGNAM}.log
)
-# Link the browser plugin into the mozilla plugins directory:
-( mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
- cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
- ln -sf /usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so
-)
+if [ -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so ]; then
+ # Link the browser plugin into the mozilla plugins directory:
+ ( mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+ cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+ ln -sf /usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so
+ )
+fi
# Replace redundant fonts with symlinks to save space:
( cd $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/basis-link/share/fonts/truetype/