132 lines
3.8 KiB
Bash
132 lines
3.8 KiB
Bash
# Template file for 'openjdk14-bootstrap'
|
|
_java_ver=14
|
|
_java_min_ver=0
|
|
_java_sec_ver=2
|
|
_jdk_update=12
|
|
_jdk_home="usr/lib/jvm/openjdk${_java_ver}"
|
|
_base_version="${_java_ver}.${_java_min_ver}.${_java_sec_ver}"
|
|
|
|
pkgname=openjdk14-bootstrap
|
|
version="${_base_version}+${_jdk_update}"
|
|
revision=1
|
|
wrksrc="jdk${_java_ver}u-jdk-${version}"
|
|
build_style=gnu-configure
|
|
configure_args="--disable-warnings-as-errors
|
|
--prefix=${XBPS_DESTDIR}/${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-debug-level=release
|
|
--with-jobs=${XBPS_ORIG_MAKEJOBS}
|
|
--with-version-pre=
|
|
--with-version-build=${_jdk_update}
|
|
--with-version-opt=void-r${revision}
|
|
--with-vendor-name=Void
|
|
--with-vendor-url=https://voidlinux.org/
|
|
--with-vendor-bug-url=https://github.com/void-linux/void-packages/issues
|
|
--with-vendor-vm-bug-url=https://github.com/void-linux/void-packages/issues
|
|
--with-boot-jdk=/usr/lib/jvm/openjdk13"
|
|
make_build_args="images"
|
|
make_check_target="test-hotspot-gtest"
|
|
hostmakedepends="pkg-config automake autoconf cpio tar unzip zip ca-certificates
|
|
openssl zlib-devel which make-ca openjdk13-bootstrap"
|
|
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 openjdk13-bootstrap"
|
|
provides="java-environment-${version}_1 java-runtime-${version}_1"
|
|
short_desc="OpenJDK Java Development Kit (bootstrap version 14)"
|
|
maintainer="classabbyamp <void@placeviolette.net>"
|
|
license="GPL-2.0-only WITH Classpath-exception-2.0"
|
|
homepage="http://openjdk.java.net/"
|
|
distfiles="https://hg.openjdk.java.net/jdk-updates/jdk${_java_ver}u/archive/jdk-${version}.tar.gz"
|
|
checksum=dfb3607f1b675458f29a185a40f1dbbf896439cf33b3aa0f3d89df297e604935
|
|
nocross=yes
|
|
|
|
# Build is still parallel, but don't use -jN.
|
|
disable_parallel_build=yes
|
|
|
|
# no hotspot JIT for ppc32
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc64*) ;;
|
|
ppc*) _use_zero=yes ;;
|
|
esac
|
|
|
|
if [ -n "$_use_zero" ]; then
|
|
makedepends+=" libffi-devel"
|
|
configure_args+=" --with-jvm-variants=zero"
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc*) configure_args+=" --with-boot-jdk-jvmargs=-XX:ThreadStackSize=2560";;
|
|
esac
|
|
fi
|
|
|
|
if [ -n "$XBPS_DEBUG_PKGS" ]; then
|
|
configure_args+=" --with-native-debug-symbols=internal"
|
|
fi
|
|
|
|
post_extract() {
|
|
chmod +x configure
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
rm -r src/jdk.hotspot.agent
|
|
fi
|
|
}
|
|
|
|
post_patch() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*)
|
|
for f in "${FILESDIR}"/i686_patches/*.patch; do
|
|
msg_normal "Applying ${f#$FILESDIR/}\n"
|
|
patch -lNp1 -i "$f"
|
|
done
|
|
;;
|
|
esac
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
for f in "${FILESDIR}"/musl_patches/*.patch; do
|
|
msg_normal "Applying ${f#$FILESDIR/}\n"
|
|
patch -lNp1 -i "$f"
|
|
done
|
|
fi
|
|
}
|
|
|
|
do_configure() {
|
|
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
|
|
CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
|
|
|
|
# force ELFv2 for ppc64 just in case
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc64*)
|
|
CFLAGS+=" -DABI_ELFv2"
|
|
CXXFLAGS+=" -DABI_ELFv2"
|
|
;;
|
|
esac
|
|
|
|
# compatibility with GCC 10.x
|
|
CFLAGS+=" -fcommon -fno-lifetime-dse"
|
|
CXXFLAGS+=" -fcommon -fno-lifetime-dse"
|
|
|
|
configure_args=${configure_args/--with-libtool-sysroot=\/usr\/[a-z0-9]*-linux-[a-z]*/}
|
|
if [ "$XBPS_CCACHE" ]; then
|
|
configure_args+=" --enable-ccache"
|
|
fi
|
|
CC="/usr/bin/cc"
|
|
CXX="/usr/bin/c++"
|
|
./configure ${configure_args} \
|
|
--with-extra-cflags="$CFLAGS" \
|
|
--with-extra-cxxflags="$CXXFLAGS" \
|
|
--with-extra-ldflags="$LDFLAGS" \
|
|
READELF=$READELF AR=$AR STRIP=$STRIP NM=$NM \
|
|
OBJDUMP=$OBJDUMP OBJCOPY=$OBJCOPY
|
|
}
|
|
|
|
post_install() {
|
|
mv ${DESTDIR}/usr/lib/jvm/openjdk-${_base_version} ${DESTDIR}/$_jdk_home
|
|
rm -rf ${DESTDIR}/usr/lib/bin
|
|
rm -f $DESTDIR/$_jdk_home/lib/src.zip
|
|
vlicense ASSEMBLY_EXCEPTION
|
|
vlicense LICENSE
|
|
}
|