pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/openjdk11 openjdk11: Fix NIO behavior



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dcee43d5cda6
branches:  trunk
changeset: 448708:dcee43d5cda6
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Fri Mar 12 17:43:04 2021 +0000

description:
openjdk11: Fix NIO behavior

* Fix www/apache-tomcat9 breakage.
* And enable GNU extension for the latest NetBSD-current to avoid RE errors.

diffstat:

 lang/openjdk11/Makefile |  18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diffs (45 lines):

diff -r 6a5dabbf1385 -r dcee43d5cda6 lang/openjdk11/Makefile
--- a/lang/openjdk11/Makefile   Fri Mar 12 15:28:51 2021 +0000
+++ b/lang/openjdk11/Makefile   Fri Mar 12 17:43:04 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.30 2021/02/01 15:51:55 ryoon Exp $
+# $NetBSD: Makefile,v 1.31 2021/03/12 17:43:04 ryoon Exp $
 
 DISTNAME=      openjdk-jdk11u-${GITHUB_TAG:C/\+/-/}
 PKGNAME=       openjdk11-1.${GITHUB_TAG:C/\+/./:C/jdk-([.0-9]+).*/\1/}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=battleblow/}
 GITHUB_PROJECT=        openjdk-jdk11u
@@ -66,9 +67,14 @@
 # It is intentional to use CONFIGURE_ARGS instead of CONFIGURE_ENV here.
 CONFIGURE_ARGS+=       USER=pkgsrc
 
+.include "../../mk/bsd.prefs.mk"
+
 # Avoid build errors when JAVA_HOME and CLASSPATH are defined by user.
 MAKE_ENV+=     JAVA_HOME=
 MAKE_ENV+=     CLASSPATH=
+.if !empty(MACHINE_PLATFORM:MNetBSD-9.99.8[1-9]-*)
+ALL_ENV+=      SED="sed -g"
+.endif
 
 BUILD_OPSYS=                   ${OPSYS:C/.*BSD/bsd/:S/DragonFly/bsd/:S/SunOS/solaris/:S/Linux/linux/}
 BUILD_ARCH=                    ${MACHINE_ARCH:S/i386/x86/:S/sparc64/sparcv9/:C/^e?arm.*$/arm/}
@@ -116,6 +122,16 @@
 SUBST_FILES.fontpaths+=                src/java.desktop/unix/native/common/awt/fontpath.c
 SUBST_VARS.fontpaths=          PREFIX BUILDLINK_PREFIX.fontconfig
 
+.if ${OPSYS} == "NetBSD"
+# NetBSD's EVFILT_* are different from FreeBSD/OpenBSD's values.
+SUBST_CLASSES+=                        kqueue
+SUBST_STAGE.kqueue=            pre-configure
+SUBST_MESSAGE.kqueue=          fixing kqueue filter values
+SUBST_FILES.kqueue=            src/java.base/bsd/classes/sun/nio/ch/KQueue.java
+SUBST_SED.kqueue=              -e 's/static final int EVFILT_READ  = -1;/static final int EVFILT_READ  = 0;/'
+SUBST_SED.kqueue+=             -e 's/static final int EVFILT_WRITE = -2;/static final int EVFILT_WRITE = 1;/'
+.endif
+
 PLIST_VARS+=                   aot internal_vm_compiler jvmci
 .if ${MACHINE_ARCH} == "x86_64"
 PLIST.aot=                     yes



Home | Main Index | Thread Index | Old Index