aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk9/APKBUILD
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2020-03-25 08:05:09 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-03-25 12:41:13 +0000
commitd15675a7a0fc230ab4d248c581a64156b82ee123 (patch)
treeab70276a7f9125c9b148a69170a2f259cf737d32 /community/openjdk9/APKBUILD
parent5cb479411e9b004b218542f128e5c0aff4705528 (diff)
downloadaports-d15675a7a0fc230ab4d248c581a64156b82ee123.tar.bz2
aports-d15675a7a0fc230ab4d248c581a64156b82ee123.tar.xz
community/openjdk9: Cleanup and unify with other openjdk aports
Diffstat (limited to 'community/openjdk9/APKBUILD')
-rw-r--r--community/openjdk9/APKBUILD193
1 files changed, 92 insertions, 101 deletions
diff --git a/community/openjdk9/APKBUILD b/community/openjdk9/APKBUILD
index 924a7e9698..09fdf81fc4 100644
--- a/community/openjdk9/APKBUILD
+++ b/community/openjdk9/APKBUILD
@@ -3,75 +3,75 @@
pkgname=openjdk9
pkgver=9.0.4_p12
_pkgver=${pkgver/_p/+}
-pkgrel=1
+pkgrel=2
pkgdesc="Oracle OpenJDK 9"
url="https://hg.openjdk.java.net/jdk-updates/jdk9u"
-arch="all !x86 !armhf !armv7" # build fails on 32bit arches
-license="GPL-2.0 with Classpath"
+arch="all !x86 !armhf !armv7" # oracle dropped support for 32 bit
+license="GPL-2.0-with-classpath-exception"
makedepends="autoconf
-bash
-gawk
-grep
-make
-openjdk8
-zip
-alsa-lib-dev
-cups-dev
-freetype-dev
-giflib-dev
-lcms2-dev
-elfutils-dev
-libexecinfo-dev
-libffi-dev
-libjpeg-turbo-dev
-libx11-dev
-libxext-dev
-libxrender-dev
-libxt-dev
-libxtst-dev
-linux-headers
-zlib-dev
-"
-depends="$pkgname-jmods $pkgname-demos $pkgname-doc $pkgname-dbg $pkgname-jdk" # for the virtual openjdk9 package
+ bash
+ gawk
+ grep
+ make
+ openjdk8
+ zip
+ alsa-lib-dev
+ cups-dev
+ freetype-dev
+ giflib-dev
+ lcms2-dev
+ elfutils-dev
+ libexecinfo-dev
+ libffi-dev
+ libjpeg-turbo-dev
+ libx11-dev
+ libxext-dev
+ libxrender-dev
+ libxt-dev
+ libxtst-dev
+ linux-headers
+ zlib-dev"
+depends="$pkgname-jmods $pkgname-demos $pkgname-doc $pkgname-jdk" # for the virtual openjdk9 package
subpackages="$pkgname-jmods:_jmods:noarch
-$pkgname-demos:_demos:noarch
-$pkgname-doc:_doc:noarch
-$pkgname-dbg:_dbg
-$pkgname-jre:_jre
-$pkgname-src:_src
-$pkgname-jre-headless:_jre_headless
-$pkgname-jdk:_jdk
-"
+ $pkgname-demos:_demos:noarch
+ $pkgname-doc:_doc:noarch
+ $pkgname-jre:_jre
+ $pkgname-src:_src
+ $pkgname-jre-headless:_jre_headless
+ $pkgname-jdk:_jdk"
source="jdk-$_pkgver-root.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-corba.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/corba/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-hotspot.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/hotspot/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-jaxp.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxp/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-jaxws.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxws/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-jdk.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jdk/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-langtools.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/langtools/archive/jdk-$_pkgver.tar.bz2
-jdk-$_pkgver-nashorn.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/nashorn/archive/jdk-$_pkgver.tar.bz2
-
-2019-01-05_config.sub::https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;h=3b4c7624b68d2d7f84618e1b5fa2badd43a48325;hb=286a38db91ea2dce1749ab7d1d9ea5ae344a16c1
-build.patch
-aarch64.patch
-arm.patch
-ppc64le.patch
-x86.patch
-
-HelloWorld.java
+ jdk-$_pkgver-corba.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/corba/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-hotspot.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/hotspot/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-jaxp.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxp/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-jaxws.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxws/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-jdk.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/jdk/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-langtools.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/langtools/archive/jdk-$_pkgver.tar.bz2
+ jdk-$_pkgver-nashorn.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk9u/nashorn/archive/jdk-$_pkgver.tar.bz2
+
+ build.patch
+ aarch64.patch
+ ppc64le.patch
+ make-4.3.patch
+ fix-bootjdk-check.patch
+
+ HelloWorld.java
+ TestECDSA.java
+ TestCryptoLevel.java
+ Alpine_Bug_10126.java
"
builddir="$srcdir/jdk9u-jdk-$_pkgver"
_java_home="/usr/lib/jvm/java-9-openjdk"
+
ldpath="$_java_home/lib:$_java_home/lib/jli:$_java_home/lib/server"
sonameprefix="$pkgname:"
# enable running the JTReg tests in check?
# see comment in that function for explanation
-_run_jtreg=0
+_run_jtreg=${_run_jtreg:-0}
if [ $_run_jtreg -ne 0 ]; then
makedepends="$makedepends java-jtreg"
- checkdepends="$checkdepends ttf-freefont xvfb"
+ checkdepends="$checkdepends ttf-freefont xvfb-run"
fi
@@ -94,8 +94,9 @@ unpack() {
prepare() {
default_prepare
- # update the config.sub file to detect alpine
- cp $srcdir/2019-01-05_config.sub common/autoconf/build-aux/autoconf-config.sub
+ # update autoconf files to detect alpine
+ update_config_sub
+ update_config_guess
# remove not compilable module (hotspot jdk.hotspot.agent)
# this needs libthread_db which is only provided by glibc
@@ -105,8 +106,6 @@ prepare() {
}
build() {
- cd "$builddir"
-
if [ $_run_jtreg -ne 0 ]; then
_with_jtreg="--with-jtreg=/usr/share/java/jtreg"
else
@@ -115,11 +114,12 @@ build() {
# CFLAGS, CXXFLAGS and LDFLAGS are ignored as shown by a warning
# in the output of ./configure unless used like such:
- # --with-extra-cflags="${CFLAGS}"
- # --with-extra-cxxflags="${CXXFLAGS}"
- # --with-extra-ldflags="${LDFLAGS}"
- # See also paragraph "Configure Control Variables from "jdk9-${_hg_tag}/common/doc/building.md
- CFLAGS= CXXFLAGS= LDFLAGS= \
+ # --with-extra-cflags="$CFLAGS"
+ # --with-extra-cxxflags="$CXXFLAGS"
+ # --with-extra-ldflags="$LDFLAGS"
+ # See also paragraph "Configure Control Variables" from "common/doc/building.md"
+ # shellcheck disable=2097 disable=2098
+ CFLAGS='' CXXFLAGS='' LDFLAGS='' \
bash ./configure \
--openjdk-target=$CHOST \
--prefix="$_java_home" \
@@ -137,7 +137,7 @@ build() {
--with-lcms=system \
--with-jobs=${JOBS:-4} \
--with-test-jobs=${JOBS:-4} \
- --with-native-debug-symbols=external \
+ --with-native-debug-symbols=none \
$_with_jtreg \
--disable-warnings-as-errors \
--disable-precompiled-headers \
@@ -145,23 +145,33 @@ build() {
--with-jvm-variants=server \
--with-debug-level=release \
--with-version-pre= \
- --with-version-opt=alpine-r${pkgrel} \
+ --with-version-opt="alpine-r$pkgrel" \
--with-version-build=${_pkgver#*+}
-
- MAKEFLAGS= make jdk-image
+ MAKEFLAGS='' make jdk-image
}
check() {
- cd "$builddir"
+ local _java_bin="./build/*-normal-server-release/images/jdk/bin"
+
+ # 1) compile and run a simple hello world
+ $_java_bin/javac -d . "$srcdir"/HelloWorld.java
+ $_java_bin/java HelloWorld
+
+ # 2) compile and run a testcase for unlimited policy
+ $_java_bin/javac -d . "$srcdir"/TestCryptoLevel.java
+ $_java_bin/java -cp . --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel
- # compile and run a simple hello world
- cp "$srcdir/HelloWorld.java" .
- ./build/*-normal-server-release/images/jdk/bin/javac HelloWorld.java
- ./build/*-normal-server-release/images/jdk/bin/java HelloWorld
+ # 3) compile and run a testcase for ECDSA signatures
+ $_java_bin/javac -d . "$srcdir"/TestECDSA.java
+ $_java_bin/java TestECDSA
+
+ # 4) compile and run testcase for bug 10126
+ $_java_bin/javac -d . "$srcdir"/Alpine_Bug_10126.java
+ $_java_bin/java Alpine_Bug_10126
# run the gtest unittest suites
# they don't take long, DO NOT DISABLE THEM!
- MAKEFLAGS= make test-hotspot-gtest
+ MAKEFLAGS='' make test-hotspot-gtest
# The jtreg tests take very, very long to finish and show some failures (9 - 12 on my machine, varying between runs)
# I think these are not critical and can be safely ignored.
@@ -169,28 +179,20 @@ check() {
# When updating this aport please let them run at least once on your machine to see if the failure count changes.
if [ $_run_jtreg -ne 0 ]; then
_logfile=$( mktemp -p "$builddir" )
- if [ -z "$DISPLAY" ]; then
- Xvfb :99 &
- _xvfb_pid=$!
- DISPLAY=:99
- fi
- MAKEFLAGS= DISPLAY=$DISPLAY make \
+ MAKEFLAGS='' xvfb-run make \
run-test-tier1 \
run-test-tier2 \
run-test-tier3 \
| tee "$_logfile"
msg "---------------------------------------"
msg "The build log can be found at $_logfile"
- if [ -n "$_xvfb_pid" ]; then
- kill $_xvfb_pid
- fi
+ # abort the build so you may take a look at the logfile
false
+ return 1
fi
}
package() {
- cd "$builddir"
-
mkdir -p "$pkgdir/$_java_home"
cp -r build/*-normal-server-release/images/jdk/* "$pkgdir/$_java_home"
}
@@ -225,19 +227,6 @@ _doc() {
mv "$_fromroot/man" "$_toroot"
}
-_dbg() {
- pkgdesc="Oracle OpenJDK 9 (debug)"
- depends="$pkgname-jdk"
- _fromroot="$pkgdir/$_java_home"
- _toroot="$subpkgdir/$_java_home"
-
- mkdir -p "$_toroot/lib/server"
- mkdir -p "$_toroot/lib/jli"
- mv "$_fromroot"/lib/server/*.debuginfo "$_toroot"/lib/server
- mv "$_fromroot"/lib/jli/*.debuginfo "$_toroot"/lib/jli
- mv "$_fromroot"/lib/*.debuginfo "$_toroot"/lib
-}
-
_jre() {
pkgdesc="Oracle OpenJDK 9 (JRE)"
depends="$pkgname-jre-headless"
@@ -257,7 +246,7 @@ _jre() {
_src() {
- pkgdesc="OpenJDK $_majorver Source Bundle"
+ pkgdesc="Oracle OpenJDK 9 (sources)"
depends="$pkgname-jre-headless"
mkdir -p "$subpkgdir/$_java_home"/lib
mv "$pkgdir"/$_java_home/lib/src.zip \
@@ -325,10 +314,12 @@ sha512sums="cef3655ae7db657e6c81aa86587e451e58896bb6ee786495f6d757096334435b6a4d
259228d3f439dde239e38cdebb8c3bbb83804ab141d87a9c236310707de9c58cd78cd80ceb4c17755cc1048071f24462839988112c2698f7ec1453a8810610f2 jdk-9.0.4+12-jdk.tar.bz2
ef3c70be906a4b0dd9c9195c88da045909ee3ef144941fb7b4495ed66b4162f481095cad87626d2bd38e5a62134b440223cd008dd6123b6b43c00e338610a692 jdk-9.0.4+12-langtools.tar.bz2
848c6ece418e250561572ad704baeb565580098cfc5f849d4e1a3b41b916aae3487eb4d8d0b319f3a503d122ec064ed4de0678d06821c9a2bdb09c990e589c97 jdk-9.0.4+12-nashorn.tar.bz2
-74e3d868d766e605921542969dd2f646a8adec1b82181aaeb02b623a524cb9011e44c261d4e13ab24268c79c6bc1d260e62d41a928b1b402b186dc5676272e36 2019-01-05_config.sub
386490c3be4c9aa9dc4b73911bc0b97298ff8b1a50e53bd601f4d2a7b3e469f5b8e70e446b2bbe6876854302a373522b4819fde24c85eafc00f9524268096615 build.patch
3cc00d9b81377fdffb7f5b3f732a35cebd2575825d85df88330740903dd98de30fe75e69229811d52f2ef192c1df0715c2696edf31f64c8d7de4b502a16792e4 aarch64.patch
-fa9fcc0c2f0972435b078669175c44f7d5d3cc29fbecb3e053d196c041ef0ff3feee8ec189a86fce0b35c5fd647ff71963a15e1e6fa50775cc2b6fa35d2ccf0a arm.patch
7244d0dfdb78d2f03ea992ef770ed888e2bd48f49e58438e7f0a763633c9aa8fc27b953d82c023f8f99ff23009a15031c99b2ef5550d277c63db684cd984ce8e ppc64le.patch
-427c525e184e2a74f511aad8192dd411fe7fcc4e7a4dc03a3496fb030cec0177b3b520cbdd1c7700f6761a15ff2e5cce59c93d7079b744954122f684d34ce723 x86.patch
-d1767dddd8e0956e25c0f77ed45c6fc86a1191bae1704a6dc33be490fd20eaa50461fe5c2a3349512059d555651e2eb41437dd3c1096c351e8ee68b4534a2579 HelloWorld.java"
+8460dde4d40d57254f14e995090bc4255ee7662d18c19f127d56a1d12d53ec56731574a784ed5d68e89aef1133da760f30ae0982389cf1512ccab1d5f62c4b75 make-4.3.patch
+a132df211c86aed5af8564cb584b4ee69ce07f3186f5f6ca4b5c1af4355c47f060534d0fd65e9415b0082de2c4912de63a776fff63241b8f3b20951fb45f9f73 fix-bootjdk-check.patch
+d1767dddd8e0956e25c0f77ed45c6fc86a1191bae1704a6dc33be490fd20eaa50461fe5c2a3349512059d555651e2eb41437dd3c1096c351e8ee68b4534a2579 HelloWorld.java
+27e91edef89d26c0c5b9a813e2045f8d2b348745a506ae37b34b660fa7093da9a4e0e676ea41dc4a5c901bce02e5304d95e90f68d6c99cbf461b2da40a7a9853 TestECDSA.java
+b02dff8d549f88317bb4c741a9e269e8d59eef990197d085388fc49c7423a4eb9367dbe1e02bffb10e7862f5980301eb58d4494e177d0e8f60af6b05c7fbbe60 TestCryptoLevel.java
+cc466f64fcc8762cf6e3c1f5739be6425209b27aa58acff4e7eb126003d61fa18266f0e79e57e9d84224654010185ab45dc0a8043543dea227258458a00a1eb1 Alpine_Bug_10126.java"