2019-10-29 18:36:00 +01:00
|
|
|
# Template file for 'openjdk11'
|
|
|
|
_java_ver=11
|
|
|
|
_java_min_ver=0
|
|
|
|
_java_sec_ver=5
|
|
|
|
_jdk_update=10
|
|
|
|
_openjdk_version="openjdk-${_java_ver}"
|
|
|
|
|
|
|
|
|
|
|
|
pkgname=openjdk11
|
|
|
|
version="${_java_ver}.${_java_min_ver}.${_java_sec_ver}+${_jdk_update}"
|
2019-11-04 11:25:50 +01:00
|
|
|
revision=3
|
2019-10-29 18:36:00 +01:00
|
|
|
wrksrc="jdk${_java_ver}u-jdk-${version}"
|
|
|
|
build_style=gnu-configure
|
|
|
|
configure_args="
|
|
|
|
--disable-warnings-as-errors
|
|
|
|
--prefix=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/${pkgname}-${version}/usr/lib
|
|
|
|
--enable-unlimited-crypto
|
|
|
|
--with-zlib=system
|
|
|
|
--with-libjpeg=system
|
|
|
|
--with-giflib=system
|
|
|
|
--with-libpng=system
|
|
|
|
--with-lcms=system
|
|
|
|
--with-jtreg=no
|
|
|
|
--with-version-build=${version}
|
|
|
|
--with-vendor-name="Void"
|
|
|
|
--with-vendor-url="https://voidlinux.org/"
|
|
|
|
--with-vendor-bug-url="https://github.com/void-linux/void-packages/issues"
|
2019-11-04 11:25:50 +01:00
|
|
|
--with-vendor-vm-bug-url="https://github.com/void-linux/void-packages/issues""
|
2019-10-29 18:36:00 +01:00
|
|
|
make_build_args="images $(vopt_if docs docs)"
|
|
|
|
make_check_target="test-hotspot-gtest"
|
|
|
|
hostmakedepends="pkg-config automake autoconf cpio unzip zip ca-certificates
|
|
|
|
libressl zlib-devel make-ca"
|
|
|
|
makedepends="libXrender-devel libXtst-devel libXt-devel libXrandr-devel
|
|
|
|
giflib-devel libjpeg-turbo-devel cups-devel freetype-devel alsa-lib-devel
|
|
|
|
fontconfig-devel zlib-devel lcms2-devel"
|
|
|
|
provides="java-environment-${version}_1 java-runtime-${version}_1"
|
|
|
|
short_desc="OpenJDK Java Development Kit"
|
|
|
|
maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
|
|
|
|
license="GPL-2.0-or-later"
|
|
|
|
homepage="http://openjdk.java.net/"
|
|
|
|
distfiles="https://hg.openjdk.java.net/jdk-updates/jdk${_java_ver}u/archive/jdk-${version}.tar.gz"
|
|
|
|
checksum=a3bc19d278f68660f02610cbe1ce6c110a39a1aa53aeb90c6133a1cebf948462
|
|
|
|
shlib_provides="libawt.so libawt_xawt.so libjava.so libjli.so libjvm.so libjawt.so"
|
|
|
|
|
|
|
|
# Build is still parallel, but don't use -jN.
|
|
|
|
disable_parallel_build=yes
|
|
|
|
build_options="docs"
|
|
|
|
|
|
|
|
case "$XBPS_TARGET_LIBC" in
|
|
|
|
glibc) build_options_default+=" docs";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
hostmakedepends+=" openjdk11"
|
|
|
|
configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk11"
|
2019-11-04 11:25:50 +01:00
|
|
|
elif [ "$XBPS_ARCH" = "x86_64-musl" ]; then
|
|
|
|
hostmakedepends+=" alsa-lib freetype giflib lcms libXi libXrender libXtst"
|
|
|
|
distfiles+=" https://alpha.de.repo.voidlinux.org/distfiles/openjdk-11.0.0.5+10-${XBPS_ARCH}.tar.gz"
|
|
|
|
checksum+=" 037520d9eb077628e137d638f3084689610e8a2fbc9efe50e10823dbac7897a4"
|
|
|
|
configure_args+=" --with-boot-jdk=${XBPS_BUILDDIR}/${wrksrc}/openjdk11"
|
|
|
|
elif [ "$XBPS_ARCH" = "i686" ]; then
|
|
|
|
hostmakedepends+=" alsa-lib freetype giflib lcms libXi libXrender libXtst"
|
|
|
|
distfiles+=" https://alpha.de.repo.voidlinux.org/distfiles/openjdk-11.0.0.5+10-${XBPS_ARCH}.tar.gz"
|
|
|
|
checksum+=" 90f4f43431487c2560c5be5f5fac979b6e0ff34933eaef1c1e37cd4b0e8cfb63"
|
|
|
|
configure_args+=" --with-boot-jdk=${XBPS_BUILDDIR}/${wrksrc}/openjdk11"
|
|
|
|
elif [ "$XBPS_ARCH" = "x86_64" ]; then
|
2019-10-29 18:36:00 +01:00
|
|
|
hostmakedepends+=" openjdk11-bin"
|
|
|
|
configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk11-bin"
|
2019-11-04 11:25:50 +01:00
|
|
|
else
|
|
|
|
broken="No suitable bootstrap binary found"
|
2019-10-29 18:36:00 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
alternatives="
|
|
|
|
java:/usr/bin/java:/usr/lib/jvm/openjdk11/bin/java
|
|
|
|
java:/usr/bin/jjs:/usr/lib/jvm/openjdk11/bin/jjs
|
|
|
|
java:/usr/bin/keytool:/usr/lib/jvm/openjdk11/bin/keytool
|
|
|
|
java:/usr/bin/pack200:/usr/lib/jvm/openjdk11/bin/pack200
|
|
|
|
java:/usr/bin/rmid:/usr/lib/jvm/openjdk11/bin/rmid
|
|
|
|
java:/usr/bin/rmiregistry:/usr/lib/jvm/openjdk11/bin/rmiregistry
|
|
|
|
java:/usr/bin/unpack200:/usr/lib/jvm/openjdk11/bin/unpack200
|
|
|
|
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jaotc:/usr/lib/jvm/openjdk11/bin/jaotc
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jar:/usr/lib/jvm/openjdk11/bin/jar
|
|
|
|
jdk:/usr/bin/jarsigner:/usr/lib/jvm/openjdk11/bin/jarsigner
|
|
|
|
jdk:/usr/bin/java:/usr/lib/jvm/openjdk11/bin/java
|
|
|
|
jdk:/usr/bin/javac:/usr/lib/jvm/openjdk11/bin/javac
|
|
|
|
jdk:/usr/bin/javadoc:/usr/lib/jvm/openjdk11/bin/javadoc
|
|
|
|
jdk:/usr/bin/javap:/usr/lib/jvm/openjdk11/bin/javap
|
|
|
|
jdk:/usr/bin/jcmd:/usr/lib/jvm/openjdk11/bin/jcmd
|
|
|
|
jdk:/usr/bin/jconsole:/usr/lib/jvm/openjdk11/bin/jconsole
|
|
|
|
jdk:/usr/bin/jdb:/usr/lib/jvm/openjdk11/bin/jdb
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jdeprscan:/usr/lib/jvm/openjdk11/bin/jdeprscan
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jdeps:/usr/lib/jvm/openjdk11/bin/jdeps
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jhsdb:/usr/lib/jvm/openjdk11/bin/jhsdb
|
|
|
|
jdk:/usr/bin/jimage:/usr/lib/jvm/openjdk11/bin/jimage
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jinfo:/usr/lib/jvm/openjdk11/bin/jinfo
|
|
|
|
jdk:/usr/bin/jjs:/usr/lib/jvm/openjdk11/bin/jjs
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jlink:/usr/lib/jvm/openjdk11/bin/jlink
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jmap:/usr/lib/jvm/openjdk11/bin/jmap
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jmod:/usr/lib/jvm/openjdk11/bin/jmod
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jps:/usr/lib/jvm/openjdk11/bin/jps
|
|
|
|
jdk:/usr/bin/jrunscript:/usr/lib/jvm/openjdk11/bin/jrunscript
|
2019-11-04 11:25:50 +01:00
|
|
|
jdk:/usr/bin/jshell:/usr/lib/jvm/openjdk11/bin/jshell
|
2019-10-29 18:36:00 +01:00
|
|
|
jdk:/usr/bin/jstack:/usr/lib/jvm/openjdk11/bin/jstack
|
|
|
|
jdk:/usr/bin/jstat:/usr/lib/jvm/openjdk11/bin/jstat
|
|
|
|
jdk:/usr/bin/jstatd:/usr/lib/jvm/openjdk11/bin/jstatd
|
|
|
|
jdk:/usr/bin/keytool:/usr/lib/jvm/openjdk11/bin/keytool
|
|
|
|
jdk:/usr/bin/pack200:/usr/lib/jvm/openjdk11/bin/pack200
|
|
|
|
jdk:/usr/bin/rmic:/usr/lib/jvm/openjdk11/bin/rmic
|
|
|
|
jdk:/usr/bin/rmid:/usr/lib/jvm/openjdk11/bin/rmid
|
|
|
|
jdk:/usr/bin/rmiregistry:/usr/lib/jvm/openjdk11/bin/rmiregistry
|
|
|
|
jdk:/usr/bin/serialver:/usr/lib/jvm/openjdk11/bin/serialver
|
|
|
|
jdk:/usr/bin/unpack200:/usr/lib/jvm/openjdk11/bin/unpack200
|
|
|
|
"
|
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
chmod +x configure
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
|
|
rm -r src/jdk.hotspot.agent
|
|
|
|
fi
|
2019-11-04 11:25:50 +01:00
|
|
|
if [ -z $CROSS_BUILD ]; then
|
|
|
|
if [ "$XBPS_ARCH" = "x86_64-musl" ] || [ "$XBPS_ARCH" = "i686" ]; then
|
|
|
|
mv ${wrksrc}/../openjdk11 ${wrksrc}/openjdk11
|
|
|
|
fi
|
|
|
|
fi
|
2019-10-29 18:36:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
post_patch() {
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
|
|
for f in "${FILESDIR}"/musl_patches/*.patch; do
|
|
|
|
echo "Applying $f"
|
|
|
|
patch -Np1 -i "$f"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
|
|
|
|
CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
|
|
|
|
configure_args=${configure_args/--with-libtool-sysroot=\/usr\/[a-z0-9]*-linux-[a-z]*/}
|
|
|
|
if [ "$XBPS_CCACHE" ] && [ -z "$CROSS_BUILD" ]; then
|
|
|
|
configure_args+=" --enable-ccache"
|
|
|
|
CC="/usr/bin/cc"
|
|
|
|
CXX="/usr/bin/c++"
|
|
|
|
fi
|
|
|
|
./configure ${configure_args} --with-extra-cflags="$CFLAGS" --with-extra-cxxflags="$CXXFLAGS" --with-extra-ldflags="$LDFLAGS"
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
vmkdir /usr/lib/jvm
|
|
|
|
mv ${DESTDIR}/usr/lib/jvm/openjdk-${_java_ver}.${_java_min_ver}.${_java_sec_ver}-internal ${DESTDIR}/usr/lib/jvm/openjdk${_java_ver}
|
|
|
|
rm -rf ${DESTDIR}/usr/lib/bin
|
|
|
|
vmkdir usr/lib/jvm/$_openjdk_version/lib/security
|
2019-10-31 21:37:48 +01:00
|
|
|
make-ca -g -f --destdir "${PWD}/ca" -k "${DESTDIR}/usr/lib/jvm/openjdk${_java_ver}/bin/keytool"
|
|
|
|
mv ./ca/etc/pki/tls/java/cacerts ${DESTDIR}/usr/lib/jvm/openjdk${_java_ver}/lib/security/
|
|
|
|
chmod -R ugo+rw ./ca
|
|
|
|
rm -Rf ./ca
|
2019-11-04 11:25:50 +01:00
|
|
|
vmkdir etc/profile.d
|
|
|
|
cat >>${DESTDIR}/etc/profile.d/10_openjdk11.sh <<EOF
|
|
|
|
export JAVA_HOME=\${JAVA_HOME=/usr/lib/jvm/openjdk${_java_ver}}
|
|
|
|
EOF
|
2019-10-29 18:36:00 +01:00
|
|
|
vlicense ASSEMBLY_EXCEPTION
|
|
|
|
vlicense LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
openjdk11-doc_package() {
|
|
|
|
nostrip=yes
|
|
|
|
noverifyrdeps=yes
|
|
|
|
noshlibprovides=yes
|
|
|
|
short_desc+=" -- documentation"
|
|
|
|
pkg_install() {
|
|
|
|
cd ${wrksrc}
|
|
|
|
if [ "$build_option_docs" ]; then
|
|
|
|
vmkdir usr/share/doc/openjdk11
|
|
|
|
cp -a build/linux-*/images/docs/* ${PKGDESTDIR}/usr/share/doc/openjdk11
|
|
|
|
fi
|
|
|
|
vmove usr/lib/jvm/openjdk11/man/man1/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
openjdk11-src_package() {
|
|
|
|
nostrip=yes
|
|
|
|
noverifyrdeps=yes
|
|
|
|
noshlibprovides=yes
|
|
|
|
short_desc+=" -- sources"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/jvm/openjdk11/lib/src.zip"
|
|
|
|
}
|
|
|
|
}
|