diff options
Diffstat (limited to 'office/LibreOffice/LibreOffice.SlackBuild')
-rw-r--r-- | office/LibreOffice/LibreOffice.SlackBuild | 41 |
1 files changed, 23 insertions, 18 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 |