diff --git a/devel/jdk/11/Makefile b/devel/jdk/11/Makefile index 9d06b7b1429..43cdeed5818 100644 --- a/devel/jdk/11/Makefile +++ b/devel/jdk/11/Makefile @@ -1,18 +1,17 @@ -# $OpenBSD: Makefile,v 1.16 2020/03/20 16:44:22 naddy Exp $ +# $OpenBSD: Makefile,v 1.17 2020/04/22 15:05:17 kurt Exp $ ONLY_FOR_ARCHS= i386 amd64 aarch64 USE_WXNEEDED= Yes DPB_PROPERTIES= parallel COMMENT= OpenJDK Software Development Kit v${VERSION_STR} -BASE_VER= 11.0.6 +BASE_VER= 11.0.7 PATCH_VER= 10 -BSD_PORT_REL= 1 +BSD_PORT_REL= 2 VERSION_STR= ${BASE_VER}+${PATCH_VER}-${BSD_PORT_REL} PACKAGE_VER= ${BASE_VER}.${PATCH_VER}.${BSD_PORT_REL} PKGNAME= jdk-${PACKAGE_VER} PKGSTEM= jdk-11 -REVISION= 0 EPOCH= 0 DIST_SUBDIR= jdk @@ -176,21 +175,28 @@ do-install: # and a copy of the system shared libs needed to run it. # The parts deleted are not needed for bootstrap and would # require more system shared libs to be saved. +BOOTJDK_TAR= openjdk-jdk11u-bootjdk-${MACHINE_ARCH}-$$(date +%Y%m%d).tar.gz build-bootjdk: build - @rm -rf ${WRKTMP} - @mkdir -p ${WRKTMP}/bootjdk - @mkdir -p ${WRKTMP}/bootjdk-libs - @cd ${IMAGEDIR} && tar -cf - * | tar -C ${WRKTMP}/bootjdk -xf - - @cd ${WRKTMP}/bootjdk && rm -rf demo jmods man sample - @cd ${WRKTMP}/bootjdk/lib && rm libsplashscreen.so libinstrument.so libjsound.so \ + @${_PBUILD} rm -rf ${WRKTMP} + @${_PBUILD} mkdir -p ${WRKTMP}/bootjdk + @${_PBUILD} mkdir -p ${WRKTMP}/bootjdk-libs + @cd ${IMAGEDIR} && \ + tar -cf - * | \ + ${_PBUILD} tar -C ${WRKTMP}/bootjdk -xf - + @cd ${WRKTMP}/bootjdk && \ + ${_PBUILD} rm -rf demo jmods man sample + @cd ${WRKTMP}/bootjdk/lib && \ + ${_PBUILD} rm libsplashscreen.so libinstrument.so libjsound.so \ libawt_xawt.so liblcms.so libfontmanager.so libjdwp.so libjavajpeg.so - @find ${WRKTMP}/bootjdk/lib ${WRKTMP}/bootjdk/bin -exec \ - sh -c 'file {} | grep -q ELF && strip -S {}' \; + @find ${WRKTMP}/bootjdk/lib ${WRKTMP}/bootjdk/bin \ + -exec sh -c 'file {} | grep -q ELF && \ + ${_PBUILD} strip -S {}' \; @LD_LIBRARY_PATH="${WRKTMP}/bootjdk/lib" \ find ${WRKTMP}/bootjdk -type f -perm -500 -exec ldd {} + 2>/dev/null | \ grep rlib | cut -d"/" -f 2-20 | sort -u | grep -v "\.so$$" | \ - xargs -I % cp /% ${WRKTMP}/bootjdk-libs - @cd ${WRKTMP} && tar czf openjdk-jdk11u-bootjdk-${MACHINE_ARCH}-$$(date +%Y%m%d).tar.gz bootjdk* - @echo "New bootjdk is located at ${WRKTMP}/openjdk-jdk11u-bootjdk-${MACHINE_ARCH}-$$(date +%Y%m%d).tar.gz" + xargs -I % ${_PBUILD} cp /% ${WRKTMP}/bootjdk-libs + @cd ${WRKTMP} && \ + ${_PBUILD} tar czf ${BOOTJDK_TAR} bootjdk* + @echo "New bootjdk is located at ${WRKTMP}/${BOOTJDK_TAR}" .include diff --git a/devel/jdk/11/distinfo b/devel/jdk/11/distinfo index 2fcaacbd9ee..fb30951a991 100644 --- a/devel/jdk/11/distinfo +++ b/devel/jdk/11/distinfo @@ -1,8 +1,8 @@ -SHA256 (jdk/jdk-11.0.6+10-1.tar.gz) = BiRQl0t98+xxKLA2G6scRw+bfMRUKncwT0xes7R1Km8= +SHA256 (jdk/jdk-11.0.7+10-2.tar.gz) = mYuqp1x5PzM+1WH+GDWcx4He6a7dDjHdq5cOHPFNT8c= SHA256 (jdk/openjdk-jdk11u-bootjdk-aarch64-20200225.tar.gz) = ids081WM5yXCFQ3bu/Sni32Nhs/fe9hBVfTeg14hMxc= SHA256 (jdk/openjdk-jdk11u-bootjdk-amd64-20200225.tar.gz) = zt2x5jCsxQ0BgqyHtBH5dLBzt5l/5KBAQh9mp1eiVis= SHA256 (jdk/openjdk-jdk11u-bootjdk-i386-20200225.tar.gz) = jMZ1ZKktR/xvX1oQV8OrPuMYWLoBoAdjEAxfpDS+HWo= -SIZE (jdk/jdk-11.0.6+10-1.tar.gz) = 117035292 +SIZE (jdk/jdk-11.0.7+10-2.tar.gz) = 117654998 SIZE (jdk/openjdk-jdk11u-bootjdk-aarch64-20200225.tar.gz) = 103465813 SIZE (jdk/openjdk-jdk11u-bootjdk-amd64-20200225.tar.gz) = 113727367 SIZE (jdk/openjdk-jdk11u-bootjdk-i386-20200225.tar.gz) = 102190977 diff --git a/devel/jdk/11/patches/patch-make_common_MakeBase_gmk b/devel/jdk/11/patches/patch-make_common_MakeBase_gmk deleted file mode 100644 index 872cf876b55..00000000000 --- a/devel/jdk/11/patches/patch-make_common_MakeBase_gmk +++ /dev/null @@ -1,29 +0,0 @@ -$OpenBSD: patch-make_common_MakeBase_gmk,v 1.1 2020/02/01 15:06:24 naddy Exp $ - -gmake 4.3 changed the handling of include file open failures -https://hg.openjdk.java.net/jdk/jdk/rev/0743e1d49930 - -Index: make/common/MakeBase.gmk ---- make/common/MakeBase.gmk.orig -+++ make/common/MakeBase.gmk -@@ -974,15 +974,16 @@ DependOnVariableFileName = \ - # Param 2 - (optional) name of file to store value in - DependOnVariableHelper = \ - $(strip \ -- $(eval -include $(call DependOnVariableFileName, $1, $2)) \ -+ $(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \ -+ $(if $(wildcard $($1_filename)), $(eval include $($1_filename))) \ - $(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\ -- $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \ -+ $(call MakeDir, $(dir $($1_filename))) \ - $(if $(findstring $(LOG_LEVEL), trace), \ - $(info NewVariable $1: >$(strip $($1))<) \ - $(info OldVariable $1: >$(strip $($1_old))<)) \ - $(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \ -- $(call DependOnVariableFileName, $1, $2))) \ -- $(call DependOnVariableFileName, $1, $2) \ -+ $($1_filename))) \ -+ $($1_filename) \ - ) - - # Main macro diff --git a/devel/jdk/11/patches/patch-make_common_NativeCompilation_gmk b/devel/jdk/11/patches/patch-make_common_NativeCompilation_gmk index abe25c6f879..e91c655bafe 100644 --- a/devel/jdk/11/patches/patch-make_common_NativeCompilation_gmk +++ b/devel/jdk/11/patches/patch-make_common_NativeCompilation_gmk @@ -1,4 +1,4 @@ -$OpenBSD: patch-make_common_NativeCompilation_gmk,v 1.1 2019/12/17 14:22:30 kurt Exp $ +$OpenBSD: patch-make_common_NativeCompilation_gmk,v 1.2 2020/04/22 15:05:18 kurt Exp $ Keep full bin/lib with debug in debuginfo file so it can be restored later in post-build. This results in jmod's without debuginfo so we @@ -7,7 +7,7 @@ get the debug package without bloating the size of the jdk package. Index: make/common/NativeCompilation.gmk --- make/common/NativeCompilation.gmk.orig +++ make/common/NativeCompilation.gmk -@@ -813,9 +813,7 @@ define SetupNativeCompilationBody +@@ -943,9 +943,7 @@ define SetupNativeCompilationBody # Setup the command line creating debuginfo files, to be run after linking. # It cannot be run separately since it updates the original target file $1_CREATE_DEBUGINFO_CMDS := \ diff --git a/devel/jdk/11/patches/patch-src_hotspot_os_posix_os_posix_cpp b/devel/jdk/11/patches/patch-src_hotspot_os_posix_os_posix_cpp new file mode 100644 index 00000000000..ea733d4c600 --- /dev/null +++ b/devel/jdk/11/patches/patch-src_hotspot_os_posix_os_posix_cpp @@ -0,0 +1,33 @@ +$OpenBSD: patch-src_hotspot_os_posix_os_posix_cpp,v 1.1 2020/04/22 15:05:18 kurt Exp $ + +OpenBSD doesn't have utmpx.h + +Index: src/hotspot/os/posix/os_posix.cpp +--- src/hotspot/os/posix/os_posix.cpp.orig ++++ src/hotspot/os/posix/os_posix.cpp +@@ -46,7 +46,9 @@ + #include + #include + #include ++#ifndef __OpenBSD__ + #include ++#endif + + // Todo: provide a os::get_max_process_id() or similar. Number of processes + // may have been configured, can be read more accurately from proc fs etc. +@@ -398,6 +400,7 @@ void os::Posix::print_load_average(outputStream* st) { + st->cr(); + } + ++#ifndef __OpenBSD__ + // boot/uptime information; + // unfortunately it does not work on macOS and Linux because the utx chain has no entry + // for reboot at least on my test machines +@@ -417,6 +420,7 @@ void os::Posix::print_uptime_info(outputStream* st) { + os::print_dhm(st, "OS uptime:", (long) (currsec-bootsec)); + } + } ++#endif + + + void os::Posix::print_rlimit_info(outputStream* st) { diff --git a/devel/jdk/11/patches/patch-src_hotspot_share_runtime_globals_hpp b/devel/jdk/11/patches/patch-src_hotspot_share_runtime_globals_hpp index 38960849d10..4d95da56ece 100644 --- a/devel/jdk/11/patches/patch-src_hotspot_share_runtime_globals_hpp +++ b/devel/jdk/11/patches/patch-src_hotspot_share_runtime_globals_hpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-src_hotspot_share_runtime_globals_hpp,v 1.2 2019/07/23 11:55:42 kurt Exp $ +$OpenBSD: patch-src_hotspot_share_runtime_globals_hpp,v 1.3 2020/04/22 15:05:18 kurt Exp $ Reduce CompressedClassSpaceSize from 1G to 256M by default. Index: src/hotspot/share/runtime/globals.hpp --- src/hotspot/share/runtime/globals.hpp.orig +++ src/hotspot/share/runtime/globals.hpp -@@ -1807,7 +1807,7 @@ define_pd_global(uint64_t,MaxRAM, 1 +@@ -1810,7 +1810,7 @@ define_pd_global(uint64_t,MaxRAM, 1 "Maximum size of Metaspaces (in bytes)") \ constraint(MaxMetaspaceSizeConstraintFunc,AfterErgo) \ \ diff --git a/devel/jdk/11/patches/patch-src_java_base_unix_native_libnio_ch_FileDispatcherImpl_c b/devel/jdk/11/patches/patch-src_java_base_unix_native_libnio_ch_FileDispatcherImpl_c deleted file mode 100644 index 882d0f0f3ad..00000000000 --- a/devel/jdk/11/patches/patch-src_java_base_unix_native_libnio_ch_FileDispatcherImpl_c +++ /dev/null @@ -1,18 +0,0 @@ -$OpenBSD: patch-src_java_base_unix_native_libnio_ch_FileDispatcherImpl_c,v 1.1 2020/02/26 02:17:12 kurt Exp $ - -Don't throw IOException if the close(2) failure was due to ECONNRESET - -https://github.com/battleblow/openjdk-jdk11u/commit/e0adb3c7fef6777e23c3b746a2a9d3db50bfebb8.patch - -Index: src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c ---- src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c.orig -+++ src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c -@@ -291,7 +291,7 @@ Java_sun_nio_ch_FileDispatcherImpl_release0(JNIEnv *en - static void closeFileDescriptor(JNIEnv *env, int fd) { - if (fd != -1) { - int result = close(fd); -- if (result < 0) -+ if (result < 0 && errno != ECONNRESET) - JNU_ThrowIOExceptionWithLastError(env, "Close failed"); - } - } diff --git a/devel/jdk/11/pkg/PLIST b/devel/jdk/11/pkg/PLIST index 54c1ca05350..8c1d5b881ce 100644 --- a/devel/jdk/11/pkg/PLIST +++ b/devel/jdk/11/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.4 2020/01/18 00:18:36 kurt Exp $ +@comment $OpenBSD: PLIST,v 1.5 2020/04/22 15:05:18 kurt Exp $ @option no-default-conflict @option is-branch @conflict jdk->=11v0,<12v0 @@ -320,7 +320,6 @@ jdk-11/legal/java.desktop/LICENSE jdk-11/legal/java.desktop/colorimaging.md jdk-11/legal/java.desktop/harfbuzz.md jdk-11/legal/java.desktop/mesa3d.md -jdk-11/legal/java.desktop/opengl.md jdk-11/legal/java.desktop/xwd.md jdk-11/legal/java.instrument/ jdk-11/legal/java.instrument/ADDITIONAL_LICENSE_INFO