diff options
author | Christoph Willing <chris.willing@iinet.net.au> | 2017-04-27 21:30:28 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-04-29 12:50:49 +0700 |
commit | 7a68b5d3134f60377c9f2b47e916d13f9eb69e8e (patch) | |
tree | 205ecbab47aad221fb52f7e2487cca3f0ad4dd53 /office/LibreOffice | |
parent | 27b04996493e9c34c0338a54bce360be4e7245d7 (diff) |
office/LibreOffice: Added control over make parallelism
Signed-off-by: Christoph Willing <chris.willing@iinet.net.au>
Diffstat (limited to 'office/LibreOffice')
-rw-r--r-- | office/LibreOffice/LibreOffice.SlackBuild | 11 | ||||
-rw-r--r-- | office/LibreOffice/README | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild index 78a23bcd1407..5cc38ac0081b 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 \ diff --git a/office/LibreOffice/README b/office/LibreOffice/README index 45aca1dcf6d6..0e1df33c6782 100644 --- a/office/LibreOffice/README +++ b/office/LibreOffice/README @@ -40,6 +40,17 @@ Build time environment variables that may set to vary features are as follows: apache-ant package is needed to build LibreOffice. Finally, setting JAVA=no will build LibreOffice without any Java support. +6. The number of parallel make jobs used by the LibreOffice build system defaults + to the number of available cpu cores. If the MAKEFLAGS environment variable + contains the -j option e.g. + MAKEFLAGS=-j6 + then the SlackBuild will pass this to the LibreOffice build system + (via its --with-parallelism configure option). The number of parallel make jobs + is further controlled with the PARALLEL environment varaiable e.g. + PARALLEL=1 sh LibreOffice.SlackBuild + which would limit building to a single make process, overriding any value set + with the -j option in MAKEFLAGS. + For performance reasons, this Slackbuild sets GTK2 to be used at runtime. Alternatives (gen, gtk3, kde4) may still be used by setting SAL_USE_VCLPLUGIN in the user environment. |