diff options
-rw-r--r-- | community/openjdk11/APKBUILD | 154 | ||||
-rw-r--r-- | community/openjdk11/arm.patch | 29 | ||||
-rw-r--r-- | community/openjdk11/fix-bootjdk-check.patch | 15 | ||||
-rw-r--r-- | community/openjdk11/x86.patch | 129 |
4 files changed, 78 insertions, 249 deletions
diff --git a/community/openjdk11/APKBUILD b/community/openjdk11/APKBUILD index cc2b3a130b..47ae807966 100644 --- a/community/openjdk11/APKBUILD +++ b/community/openjdk11/APKBUILD @@ -2,59 +2,57 @@ # Maintainer: Simon Frankenberger <simon-alpine@fraho.eu> pkgname=openjdk11 pkgver=11.0.6_p10 -_pkgver=${pkgver/_p/+} -pkgrel=0 +_pkgver=${pkgver/_p10/-ga} +pkgrel=1 pkgdesc="Oracle OpenJDK 11" url="https://hg.openjdk.java.net/jdk-updates/jdk11u" -arch="all !x86 !armhf !armv7" # openjdk10 is not yet available on 32 bit 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 -openjdk10-jdk -zip -alsa-lib-dev -cups-dev -elfutils-dev -fontconfig-dev -freetype-dev -giflib-dev -lcms2-dev -libexecinfo-dev -libffi-dev -libjpeg-turbo-dev -libx11-dev -libxext-dev -libxrandr-dev -libxrender-dev -libxt-dev -libxtst-dev -linux-headers -zlib-dev" + bash + gawk + grep + make + openjdk10-jdk + zip + alsa-lib-dev + cups-dev + elfutils-dev + fontconfig-dev + freetype-dev + giflib-dev + lcms2-dev + libexecinfo-dev + libffi-dev + libjpeg-turbo-dev + libx11-dev + libxext-dev + libxrandr-dev + libxrender-dev + libxt-dev + libxtst-dev + linux-headers + zlib-dev" depends="$pkgname-jmods $pkgname-demos $pkgname-doc $pkgname-jdk" # for the virtual openjdk11 package subpackages="$pkgname-jmods:_jmods:noarch -$pkgname-demos:_demos:noarch -$pkgname-doc:_doc:noarch -$pkgname-dbg:_dbg -$pkgname-jre:_jre -$pkgname-src:_src:noarch -$pkgname-jre-headless:_jre_headless -$pkgname-jdk:_jdk" -source="jdk-$_pkgver.tar.bz2::https://hg.openjdk.java.net/jdk-updates/jdk11u/archive/jdk-$_pkgver.tar.bz2 - -build.patch -aarch64.patch -arm.patch -ppc64le.patch -x86.patch -make-4.3.patch - -HelloWorld.java -TestECDSA.java -TestCryptoLevel.java -Alpine_Bug_10126.java + $pkgname-demos:_demos:noarch + $pkgname-doc:_doc:noarch + $pkgname-jre:_jre + $pkgname-src:_src:noarch + $pkgname-jre-headless:_jre_headless + $pkgname-jdk:_jdk" +source="jdk-$_pkgver.tar.gz::https://github.com/openjdk/jdk11u/archive/jdk-$_pkgver.tar.gz + + 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/jdk11u-jdk-$_pkgver" @@ -65,10 +63,10 @@ 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 # secfixes: @@ -96,8 +94,6 @@ prepare() { } build() { - cd "$builddir" - if [ $_run_jtreg -ne 0 ]; then _with_jtreg="--with-jtreg=/usr/share/java/jtreg" else @@ -106,11 +102,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}" + # --with-extra-cflags="$CFLAGS" + # --with-extra-cxxflags="$CXXFLAGS" + # --with-extra-ldflags="$LDFLAGS" # See also paragraph "Configure Control Variables" from "common/doc/building.md" - CFLAGS= CXXFLAGS= LDFLAGS= \ + # shellcheck disable=2097 disable=2098 + CFLAGS='' CXXFLAGS='' LDFLAGS='' \ bash ./configure \ --openjdk-target=$CHOST \ --prefix="$_java_home" \ @@ -128,7 +125,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 \ @@ -136,18 +133,16 @@ 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#*+} \ --with-vendor-name="Alpine" \ --with-vendor-url="https://alpinelinux.org/" \ - --with-vendor-bug-url="https://bugs.alpinelinux.org/projects/alpine/issues" \ - --with-vendor-vm-bug-url="https://bugs.alpinelinux.org/projects/alpine/issues" - MAKEFLAGS= make images + --with-vendor-bug-url="https://gitlab.alpinelinux.org/alpine/aports/issues" \ + --with-vendor-vm-bug-url="https://gitlab.alpinelinux.org/alpine/aports/issues" + MAKEFLAGS='' make images } check() { - cd "$builddir" - local _java_bin="./build/*-normal-server-release/images/jdk/bin" # 1) compile and run a simple hello world @@ -167,7 +162,7 @@ check() { $_java_bin/java Alpine_Bug_10126 # run the gtest unittest suites - 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. @@ -175,29 +170,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" } @@ -232,19 +218,6 @@ _doc() { mv "$_fromroot/man" "$_toroot" } -_dbg() { - pkgdesc="Oracle OpenJDK 11 (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 11 (JRE)" depends="$pkgname-jre-headless" @@ -317,13 +290,12 @@ _jdk() { mv "$_fromroot/include" "$_toroot" } -sha512sums="2c17182d3dd16dcf9ab527ce84ad1737946c80259ac227f9eddf385444471a78b3b112ba58cce0e30818bb35fcfdbb1436e063aac1af69e7b68a83540a31cebf jdk-11.0.6+10.tar.bz2 +sha512sums="2a75f9323a242cf8585b06c79594dbd381ad72897e215c7d567819a68559ec6207a73f4aaf26a48de96f9b132148ea2f28ea7171d6642219b60f8cc5c3a6779f jdk-11.0.6-ga.tar.gz 66a9f2736da87de09d7bcc136771ab760bdba7847f3a23b2aa4efbc2e55ac8b49510c6d7afdf3f8d046c6e3fe9dca0d4cb0b5a38d7a3aebaf86fa0e3cc635eac build.patch 8c0f1f8d2a78ebb30a8460bc0ea9cd2349cea98819df1577bf7de19a1dd82d06a593f36b4e17c282ed53d23f00163e387e3dd1f3c9e5a092726e78c3aa710370 aarch64.patch -d2903a5b3b9f82c4888416580f0b93888bf21ae0dac0ce6e926607a82a9e53b7e10e13f07a984f65dc116e81f58cd3844d6156088534c0059be8f6ee68e19a43 arm.patch 592bf6c1be99879735f0b2484d7d286be049170f5fb7de8526b452cde732e97f2b9b5b0af0073ec0a525bd52ce9f207a7dcace9d9d83a950eee38b11d6f5ad8d ppc64le.patch -89e681da2de0bcb5131e2512d1280ce8da684ede5b38379c6325cd9f57e78a4bdde3abfa0a0a496889411dd57264312094973ce2da301293d0826114a3ef09d3 x86.patch a819eb321b925d626f26d0095603cf44040edc5e9d7f5d2f51a54ddc544d2933d0fa3c766645e8eea2cbdf57066f677d8c013e8bfea1ae943e4605441703c89f make-4.3.patch +68cb40368122a6e8c83273cbd81b811546f7986a45260a74f0a9536591a98c78902fe089813963ea0b7fdead178a3d737b421de8883eeff779ab2f702b15bc10 fix-bootjdk-check.patch d1767dddd8e0956e25c0f77ed45c6fc86a1191bae1704a6dc33be490fd20eaa50461fe5c2a3349512059d555651e2eb41437dd3c1096c351e8ee68b4534a2579 HelloWorld.java 27e91edef89d26c0c5b9a813e2045f8d2b348745a506ae37b34b660fa7093da9a4e0e676ea41dc4a5c901bce02e5304d95e90f68d6c99cbf461b2da40a7a9853 TestECDSA.java b02dff8d549f88317bb4c741a9e269e8d59eef990197d085388fc49c7423a4eb9367dbe1e02bffb10e7862f5980301eb58d4494e177d0e8f60af6b05c7fbbe60 TestCryptoLevel.java diff --git a/community/openjdk11/arm.patch b/community/openjdk11/arm.patch deleted file mode 100644 index b2be6b3f4d..0000000000 --- a/community/openjdk11/arm.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- old/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp -+++ new/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp -@@ -71,7 +71,6 @@ - # include <pwd.h> - # include <poll.h> - # include <ucontext.h> --# include <fpu_control.h> - # include <asm/ptrace.h> - - #define SPELL_REG_SP "sp" -@@ -104,6 +103,18 @@ - #define ARM_REGS_IN_CONTEXT 31 - - #else -+ -+// Stupid hack as the origin if below doesnt compile with gcc 8.2.0: -+// -+// os_linux_arm.cpp:114:5: error: missing binary operator before token "(" -+// #if NGREG == 16 -+// ^~~~~ -+// -+// The NGREG is 18, so force it to that value. -+#ifdef NGREG -+# undef NGREG -+#endif -+#define NGREG 18 - - #if NGREG == 16 - // These definitions are based on the observation that until diff --git a/community/openjdk11/fix-bootjdk-check.patch b/community/openjdk11/fix-bootjdk-check.patch new file mode 100644 index 0000000000..04a1c94ff9 --- /dev/null +++ b/community/openjdk11/fix-bootjdk-check.patch @@ -0,0 +1,15 @@ +The alpine builders print out a warning about sched_getaffinity() not working. +This causes the version check for the boot jdk to fail. +Patch the command to determine the version number to ignore any errors and warnings. + +--- old/make/autoconf/boot-jdk.m4 ++++ new/make/autoconf/boot-jdk.m4 +@@ -74,7 +74,7 @@ + BOOT_JDK_FOUND=no + else + # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? +- BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1` ++ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $GREP version | $HEAD -n 1` + + # Extra M4 quote needed to protect [] in grep expression. + [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`] diff --git a/community/openjdk11/x86.patch b/community/openjdk11/x86.patch deleted file mode 100644 index 1a5bf4328e..0000000000 --- a/community/openjdk11/x86.patch +++ /dev/null @@ -1,129 +0,0 @@ ---- old/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp -+++ new/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp -@@ -90,6 +90,126 @@ - #define SPELL_REG_FP "ebp" - #endif // AMD64 - -+// ============================================================================== -+// Taken from glibc 2.28 -+// source: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86/fpu_control.h;h=4cb98c5679b2897ff4e5826d228cba6be589e24d;hb=3c03baca37fdcb52c3881e653ca392bba7a99c2b -+// ============================================================================== -+#ifndef AMD64 -+/* FPU control word bits. x86 version. -+ Copyright (C) 1993-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Olaf Flebbe. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ <http://www.gnu.org/licenses/>. */ -+ -+#ifndef _FPU_CONTROL_H -+#define _FPU_CONTROL_H 1 -+ -+/* Note that this file sets on x86-64 only the x87 FPU, it does not -+ touch the SSE unit. */ -+ -+/* Here is the dirty part. Set up your 387 through the control word -+ * (cw) register. -+ * -+ * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 -+ * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM -+ * -+ * IM: Invalid operation mask -+ * DM: Denormalized operand mask -+ * ZM: Zero-divide mask -+ * OM: Overflow mask -+ * UM: Underflow mask -+ * PM: Precision (inexact result) mask -+ * -+ * Mask bit is 1 means no interrupt. -+ * -+ * PC: Precision control -+ * 11 - round to extended precision -+ * 10 - round to double precision -+ * 00 - round to single precision -+ * -+ * RC: Rounding control -+ * 00 - rounding to nearest -+ * 01 - rounding down (toward - infinity) -+ * 10 - rounding up (toward + infinity) -+ * 11 - rounding toward zero -+ * -+ * IC: Infinity control -+ * That is for 8087 and 80287 only. -+ * -+ * The hardware default is 0x037f which we use. -+ */ -+ -+#include <features.h> -+ -+/* masking of interrupts */ -+#define _FPU_MASK_IM 0x01 -+#define _FPU_MASK_DM 0x02 -+#define _FPU_MASK_ZM 0x04 -+#define _FPU_MASK_OM 0x08 -+#define _FPU_MASK_UM 0x10 -+#define _FPU_MASK_PM 0x20 -+ -+/* precision control */ -+#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */ -+#define _FPU_DOUBLE 0x200 -+#define _FPU_SINGLE 0x0 -+ -+/* rounding control */ -+#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ -+#define _FPU_RC_DOWN 0x400 -+#define _FPU_RC_UP 0x800 -+#define _FPU_RC_ZERO 0xC00 -+ -+#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ -+ -+ -+/* The fdlibm code requires strict IEEE double precision arithmetic, -+ and no interrupts for exceptions, rounding to nearest. */ -+ -+#define _FPU_DEFAULT 0x037f -+ -+/* IEEE: same as above. */ -+#define _FPU_IEEE 0x037f -+ -+/* Type of the control word. */ -+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); -+ -+/* Macros for accessing the hardware control word. "*&" is used to -+ work around a bug in older versions of GCC. __volatile__ is used -+ to support combination of writing the control register and reading -+ it back. Without __volatile__, the old value may be used for reading -+ back under compiler optimization. -+ -+ Note that the use of these macros is not sufficient anymore with -+ recent hardware nor on x86-64. Some floating point operations are -+ executed in the SSE/SSE2 engines which have their own control and -+ status register. */ -+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) -+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw)) -+ -+/* Default control word set at startup. */ -+extern fpu_control_t __fpu_control; -+ -+#endif /* fpu_control.h */ -+ -+#endif // AMD64 -+// ============================================================================== -+// ============================================================================== -+// ============================================================================== -+ - address os::current_stack_pointer() { - #ifdef SPARC_WORKS - register void *esp; |