# Description: OpenJDK 13 (minimal pkg for bootstrapping) # URL: https://openjdk.java.net/ # Maintainer: # Depends on: alsa-lib cups fontconfig giflib krb5 lcms2 libxslt nss unzip xorg-libxrandr xorg-libxt xorg-libxtst zip name=openjdk13-boot version=13.0.5.1+1 _boot_ver=20210207 _cert_ver=20200215 _jdkhash=7f0467e5aa8e release=1 source=(https://crux.ster.zone/downloads/java/openjdk-$version.tar.bz2 https://crux.ster.zone/downloads/java/openjdk12-boot-$_boot_ver.tar.xz https://crux.ster.zone/downloads/java/java_cacerts-${_cert_ver}) build() { if [ -e '/usr/bin/ccache' ]; then PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//') PKGMK_JDK13+=' --enable-ccache' fi OLD_PATH=$PATH export JAVA_HOME=$SRC/openjdk12-boot export PATH=$JAVA_HOME/bin:$OLD_PATH unset CFLAGS unset CXXFLAGS unset LDFLAGS unset MAKEFLAGS export _CFLAGS+=' -fcommon' export _CXXFLAGS+=' -fcommon' [ -z $JOBS ] && JOBS=$(nproc) mkdir $SRC/{build-boot,build} cd $SRC/build-boot local _COMMON_OPTIONS=" --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" LC_ALL=C \ /bin/bash $SRC/jdk13u-$_jdkhash/configure $PKGMK_JDK13 \ $_COMMON_OPTIONS \ --prefix=$SRC/build-boot/images/jdk \ --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 export JAVA_HOME=$SRC/build-boot/images/jdk export PATH=$JAVA_HOME/bin:$OLD_PATH cd $SRC/build LC_ALL=C \ /bin/bash $SRC/jdk13u-$_jdkhash/configure $PKGMK_JDK13 \ $_COMMON_OPTIONS \ --prefix=/$name \ --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/legal cp -r images/jdk $PKG/$name }