130 lines
4.0 KiB
Plaintext
130 lines
4.0 KiB
Plaintext
# Description: OpenJDK 10 (minimal pkg for bootstrapping)
|
|
# URL: https://openjdk.java.net/
|
|
# Maintainer:
|
|
# Depends on: alsa-lib cups fontconfig freetype giflib krb5 lcms2 libffi libjpeg-turbo libpng libxslt nss unzip xorg-libxrender xorg-libxt xorg-libxtst zip
|
|
|
|
name=openjdk10-boot
|
|
version=10.0.2+13
|
|
_boot_ver=20210207
|
|
_cert_ver=20200215
|
|
_jdkhash=45b1d041a4ef
|
|
release=1
|
|
source=(https://hg.openjdk.java.net/jdk-updates/jdk10u/archive/openjdk-$version.tar.bz2
|
|
https://stygian.me/crux/distfiles/openjdk9-boot-$_boot_ver.tar.xz
|
|
https://stygian.me/crux/distfiles/java_cacerts-$_cert_ver
|
|
# https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/openjdk10-bootstrap/patches/fix-compiler-version-10%2B.patch
|
|
fix-compiler-version-10+.patch
|
|
make-4.3_breaks_build.patch)
|
|
|
|
build() {
|
|
patch -p1 -d $SRC/jdk10u-$_jdkhash -i $SRC/make-4.3_breaks_build.patch
|
|
patch -p1 -d $SRC/jdk10u-$_jdkhash -i $SRC/fix-compiler-version-10+.patch
|
|
|
|
# Make sure we do not have ccache masquerade directory in PATH.
|
|
# Use --enable-ccache instead of providing a wrapped compiler.
|
|
# NOTE: the check for usr/bin/ccache may be too specific, since it rules out
|
|
# local or opt installs.
|
|
if [ -e '/usr/bin/ccache' ]; then
|
|
PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
|
|
PKGMK_JDK10+=' --enable-ccache'
|
|
fi
|
|
|
|
unset JAVA_HOME
|
|
OLD_PATH=$PATH
|
|
export JAVA_HOME=$SRC/openjdk9-boot
|
|
export PATH=$JAVA_HOME/bin:$OLD_PATH
|
|
|
|
unset CFLAGS
|
|
unset CXXFLAGS
|
|
unset LDFLAGS
|
|
unset MAKEFLAGS
|
|
|
|
[ -z $JOBS ] && JOBS=$(nproc)
|
|
|
|
mkdir $SRC/build-boot
|
|
cd $SRC/build-boot
|
|
|
|
export _CFLAGS+=' -fcommon'
|
|
export _CXXFLAGS+=' -fcommon'
|
|
LC_ALL=C
|
|
/bin/bash ../jdk10u-$_jdkhash/configure $PKGMK_JDK10 \
|
|
--prefix=$SRC/build-boot/images/jdk \
|
|
--disable-hotspot-gtest \
|
|
--disable-precompiled-headers \
|
|
--disable-warnings-as-errors \
|
|
--enable-dtrace=no \
|
|
--enable-headless-only \
|
|
--enable-unlimited-crypto \
|
|
--with-native-debug-symbols=none \
|
|
--with-debug-level=release \
|
|
--with-stdc++lib=dynamic \
|
|
--with-jvm-variants=server \
|
|
--with-cacerts-file=$SRC/java_cacerts-$_cert_ver \
|
|
--with-jtreg=no \
|
|
--with-boot-jdk=$JAVA_HOME \
|
|
--with-version-opt="CRUX-r$release" \
|
|
--with-version-build="${version#*+}" \
|
|
--with-vendor-name="CRUX" \
|
|
--with-jobs=$JOBS \
|
|
--with-libjpeg=system \
|
|
--with-giflib=system \
|
|
--with-libpng=system \
|
|
--with-zlib=system \
|
|
--with-lcms=system \
|
|
--with-extra-cflags="$_CFLAGS" \
|
|
--with-extra-cxxflags="$_CXXFLAGS"
|
|
|
|
# NOTE: for debugging build issues: set LOG to debug, JOBS to 1.
|
|
LC_ALL=C \
|
|
make LOG=warn JOBS=$JOBS jdk-image
|
|
|
|
unset JAVA_HOME
|
|
export JAVA_HOME=$SRC/build-boot/images/jdk
|
|
export PATH=$JAVA_HOME/bin:$OLD_PATH
|
|
|
|
mkdir $SRC/build
|
|
cd $SRC/build
|
|
|
|
LC_ALL=C
|
|
/bin/bash ../jdk10u-$_jdkhash/configure $PKGMK_JDK10 \
|
|
--prefix=/$name \
|
|
--disable-hotspot-gtest \
|
|
--disable-precompiled-headers \
|
|
--disable-warnings-as-errors \
|
|
--enable-dtrace=no \
|
|
--enable-headless-only \
|
|
--enable-unlimited-crypto \
|
|
--with-native-debug-symbols=none \
|
|
--with-debug-level=release \
|
|
--with-stdc++lib=dynamic \
|
|
--with-jvm-variants=server \
|
|
--with-cacerts-file=$SRC/java_cacerts-$_cert_ver \
|
|
--with-jtreg=no \
|
|
--with-boot-jdk=$JAVA_HOME \
|
|
--with-version-opt="CRUX-r$release" \
|
|
--with-version-build="${version#*+}" \
|
|
--with-vendor-name="CRUX" \
|
|
--with-jobs=$JOBS \
|
|
--with-libjpeg=system \
|
|
--with-giflib=system \
|
|
--with-libpng=system \
|
|
--with-zlib=system \
|
|
--with-lcms=system \
|
|
--with-extra-cflags="$_CFLAGS" \
|
|
--with-extra-cxxflags="$_CXXFLAGS"
|
|
|
|
# NOTE: for debugging build issues: set LOG to debug, JOBS to 1.
|
|
LC_ALL=C \
|
|
make LOG=warn JOBS=$JOBS jdk-image
|
|
|
|
rm -r images/jdk/demo
|
|
rm -r images/jdk/jmods
|
|
rm -r images/jdk/lib/src.zip
|
|
rm -r images/jdk/lib/*.ja
|
|
rm -r images/jdk/man/ja
|
|
rm -r images/jdk/man/ja_JP*
|
|
rm -r images/jdk/legal
|
|
|
|
cp -r images/jdk $PKG/$name
|
|
}
|