summaryrefslogtreecommitdiffstats
path: root/development/zulu-openjdk8/zulu-openjdk8.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/zulu-openjdk8/zulu-openjdk8.SlackBuild')
-rw-r--r--development/zulu-openjdk8/zulu-openjdk8.SlackBuild60
1 files changed, 40 insertions, 20 deletions
diff --git a/development/zulu-openjdk8/zulu-openjdk8.SlackBuild b/development/zulu-openjdk8/zulu-openjdk8.SlackBuild
index 1de220c861..5d204a8b9d 100644
--- a/development/zulu-openjdk8/zulu-openjdk8.SlackBuild
+++ b/development/zulu-openjdk8/zulu-openjdk8.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for zulu-openjdk8
# Copyright (c) 2017-2018, Sébastien Ballet <slacker6896 at gmail.com>
+# Copyright (c) 2022-2024, Andrew Clemons, Tokyo Japan
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,26 +26,20 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=zulu-openjdk8
-VERSION=${VERSION:-8.0.232}
-ZULUVERSION=${ZULUVERSION:-8.42.0.23}
+VERSION=${VERSION:-8.0.402}
+ZULUVERSION=${ZULUVERSION:-8.76.0.17}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# The name of azul's zulu openjdk source archive has the syntax below :
-#
-# zulu<ZULU_VERSION>-jdk<JDK_VERSION>-linux_x64
-#
-# Note: The archive's name is also the name of the top directory found
-# in this archive.
-#
-SRCNAM=zulu${ZULUVERSION}-ca-jdk${VERSION}-linux_x64
-
-ARCH=${ARCH:-$(uname -m)}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i686 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -54,14 +49,29 @@ TMP=${TMP:-/tmp/SBo}
PKG=${TMP}/package-${PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
-if [ "${ARCH}" = "x86_64" ] ; then
- LIB_ARCH=amd64
+if [ "$ARCH" = "i686" ]; then
+ ZULU_ARCH=i686
+ LIBDIRSUFFIX=""
+ JVMLIBARCH="i386"
+elif [ "$ARCH" = "x86_64" ]; then
+ ZULU_ARCH=x64
LIBDIRSUFFIX="64"
+ JVMLIBARCH="amd64"
+elif [ "$ARCH" = "arm" ]; then
+ ZULU_ARCH=aarch32hf
+ LIBDIRSUFFIX=""
+ JVMLIBARCH="aarch32"
+elif [ "$ARCH" = "aarch64" ]; then
+ ZULU_ARCH=aarch64
+ LIBDIRSUFFIX="64"
+ JVMLIBARCH="aarch64"
else
echo "Architecture ${ARCH} is not supported."
exit 1
fi
+SRCNAM=zulu${ZULUVERSION}-ca-jdk${VERSION}-linux_$ZULU_ARCH
+
set -e
rm -rf $PKG
@@ -80,14 +90,24 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if [ "$ARCH" = "aarch64" ] ; then
+ find $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/bin -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs patchelf --set-interpreter /lib64/ld-linux-aarch64.so.1 2> /dev/null || true
+fi
+
+find $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM -type f -name "*.so" -exec chmod +x {} \; 2> /dev/null || true
+
# Define whether or not a symlink to libjvm.so library must
# be created into /usr/lib${LIBDIRSUFFIX}. Can be set to "yes"
# or "no". Default to "yes"
#
if [ "${CREATE_LIBJVM_SYMLINK:-yes}" = "yes" ] ; then
- ln -sf \
- ${PRGNAM}/jre/lib/${LIB_ARCH}/server/libjvm.so \
- $PKG/usr/lib${LIBDIRSUFFIX}/libjvm.so
+ (
+ cd $PKG/usr/lib${LIBDIRSUFFIX}/
+ if [ -e $PRGNAM/jre/lib/${JVMLIBARCH}/server/libjvm.so ] ; then
+ ln -sf $PRGNAM/jre/lib/${JVMLIBARCH}/server/libjvm.so
+ fi
+ )
fi
mkdir -p ${PKG}/etc/profile.d