summaryrefslogtreecommitdiff
path: root/office/LibreOffice
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2022-03-01 21:56:01 +1300
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-03 15:56:51 +0700
commitb2519f95fdcc4c34874b99ada283907bfc6147ec (patch)
treee75d63b868e6a19636de30283257389cb05b256a /office/LibreOffice
parent062c44615d50deb42afe6e8dfa766bbb726a386d (diff)
downloadslackbuilds-b2519f95fdcc4c34874b99ada283907bfc6147ec.tar.gz
various: Use zulu jdk builds for REQUIRES.
As noted in the FAQ, you can still use Oracle's JDK for building or running, but we'll default to the Zulu builds in the REQUIRES since they are easily downloadable. Zulu is a good default for us at SBo since it is available for both 32 and 64 bit, freely downloadable and compatible and they provide builds for all the LTS branches. We don't currently have builds for Adoptium (previously AdoptOpenJDK, not part of the Eclipse Foundation), but if someone wants to submit builds for them, we can include them too. Note though that they do not provide 32 bit builds. Software should run with either Zulu or Oracle's JDK, or indeed any other builds of OpenJDK, so if I have broken your build with this change, apologies. This should be rare and we can change the REQUIRES back to jdkX in that case and note it in the README, but I do not expect this should be the case. Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/LibreOffice')
-rw-r--r--office/LibreOffice/LibreOffice.SlackBuild41
-rw-r--r--office/LibreOffice/LibreOffice.info2
2 files changed, 24 insertions, 19 deletions
diff --git a/office/LibreOffice/LibreOffice.SlackBuild b/office/LibreOffice/LibreOffice.SlackBuild
index 143d1db258..f9c4701223 100644
--- a/office/LibreOffice/LibreOffice.SlackBuild
+++ b/office/LibreOffice/LibreOffice.SlackBuild
@@ -92,7 +92,6 @@ else
HAVE_SRCS_TARBALL=0
fi
-
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -110,24 +109,30 @@ jval="$(echo $MAKEFLAGS |grep -o "\-j *[0-9]*" | grep -o "[0-9]*")" || true
# If PARALLEL environment variable is set, use that to override everything.
[ "${PARALLEL:-0}" != "0" ] && parallel="--with-parallelism=$PARALLEL"
-JAVA=${JAVA:-jdk11}
-if [ "$JAVA" = "jdk11" ]; then
- . /etc/profile.d/jdk11.sh
- use_java="--with-jdk-home=$JAVA_HOME"
-elif [ "$JAVA" = "jdk12" ]; then
- . /etc/profile.d/jdk12.sh
- use_java="--with-jdk-home=$JAVA_HOME"
-elif [ "$JAVA" = "jdk13" ]; then
- . /etc/profile.d/jdk13.sh
- use_java="--with-jdk-home=$JAVA_HOME"
-elif [ "$JAVA" = "jdk14" ]; then
- . /etc/profile.d/jdk14.sh
- use_java="--with-jdk-home=$JAVA_HOME"
-elif [ "$JAVA" = "jdk15" ]; then
- . /etc/profile.d/jdk15.sh
- use_java="--with-jdk-home=$JAVA_HOME"
-elif [ "$JAVA" = "no" ]; then
+JAVA=${JAVA:-}
+if [ "$JAVA" = "no" ]; then
use_java="--with-java=no"
+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
+ break
+ fi
+ done
+ fi
+
+ if [ -z "$JAVA_HOME" ]; then
+ cat <<EOF
+!!! Java support requested, but JAVA_HOME is unset and I can't find
+!!! a /etc/profile.d script that sets it. Are you sure you have a JDK
+!!! package installed?
+EOF
+ exit 1
+ fi
+
+ use_java="--with-jdk-home=$JAVA_HOME"
fi
# General optional use of packages available from SBo. If not found, LibreOffice internal versions are used
diff --git a/office/LibreOffice/LibreOffice.info b/office/LibreOffice/LibreOffice.info
index 23ad7e4e83..b29182643d 100644
--- a/office/LibreOffice/LibreOffice.info
+++ b/office/LibreOffice/LibreOffice.info
@@ -7,6 +7,6 @@ MD5SUM="8d7d3fb99d3680d58c92f42e20657965 \
a0e69e73892c22d8f8417483df090c82"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="jdk11 apache-ant perl-Archive-Zip"
+REQUIRES="zulu-openjdk11 apache-ant perl-Archive-Zip"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"