From a3bb520e7b6aed727403a82db4c281f85f3f9ac9 Mon Sep 17 00:00:00 2001 From: ryoon Date: Fri, 12 Mar 2021 17:43:04 +0000 Subject: openjdk11: Fix NIO behavior * Fix www/apache-tomcat9 breakage. * And enable GNU extension for the latest NetBSD-current to avoid RE errors. --- lang/openjdk11/Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lang/openjdk11') diff --git a/lang/openjdk11/Makefile b/lang/openjdk11/Makefile index aaa56acec0f..3c854c4aa1a 100644 --- a/lang/openjdk11/Makefile +++ b/lang/openjdk11/Makefile @@ -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 @@ CONFIGURE_ARGS+= --with-default-make-target=product-images # 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= make/data/fontconfig/bsd.fontconfig.properties 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 -- cgit v1.2.3