summaryrefslogtreecommitdiff
path: root/office/LibreOffice/LibreOffice.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/LibreOffice/LibreOffice.SlackBuild')
-rw-r--r--office/LibreOffice/LibreOffice.SlackBuild11
1 files changed, 10 insertions, 1 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild
index 78a23bcd14..5cc38ac008 100644
--- a/office/LibreOffice/LibreOffice.SlackBuild
+++ b/office/LibreOffice/LibreOffice.SlackBuild
@@ -28,7 +28,7 @@ PRGNAM=LibreOffice
SRCNAM=libreoffice
VERSION=${VERSION:-5.3.2.2}
SHORT_VERSION=${VERSION%.*.*}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PACKAGER=${PACKAGER:-"AnonymousCoward"}
@@ -88,6 +88,14 @@ 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"}
+# 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
+[ -n "$jval" ] && parallel="--with-parallelism=$jval"
+# If PARALLEL environment variable is set, use that to override everything.
+[ "${PARALLEL:-0}" != "0" ] && parallel="--with-parallelism=$PARALLEL"
+
JAVA=${JAVA:-openjdk}
if [ "$JAVA" = "openjdk" ]; then
. /etc/profile.d/openjdk.sh
@@ -123,6 +131,7 @@ fi
$vlc \
$kde4 \
$use_java \
+ $parallel \
--with-x \
--with-tls="nss" \
--without-krb5 \