Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2018 09:52:53 +0000 (UTC)
From:      Alex Dupre <ale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r488523 - in head/java/openjdk8: . files
Message-ID:  <201812270952.wBR9qrhJ083942@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ale
Date: Thu Dec 27 09:52:52 2018
New Revision: 488523
URL: https://svnweb.freebsd.org/changeset/ports/488523

Log:
  Add a WatchService implementation backed by kqueue,
  leveraging the libinotify wrapper.
  
  It's still possible to use the polling watchservice,
  by defining the following system property:
  
   sun.nio.fs.watchservice=polling

Added:
  head/java/openjdk8/files/patch-jdk-make-CompileJavaClasses.gmk   (contents, props changed)
  head/java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk   (contents, props changed)
  head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd   (contents, props changed)
  head/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java   (contents, props changed)
Modified:
  head/java/openjdk8/Makefile

Modified: head/java/openjdk8/Makefile
==============================================================================
--- head/java/openjdk8/Makefile	Thu Dec 27 09:50:56 2018	(r488522)
+++ head/java/openjdk8/Makefile	Thu Dec 27 09:52:52 2018	(r488523)
@@ -2,7 +2,7 @@
 
 PORTNAME=	openjdk
 PORTVERSION=	${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	java devel
 MASTER_SITES=	http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \
 		https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
@@ -46,7 +46,8 @@ BUILD_DEPENDS=	zip:archivers/zip \
 		autoconf>0:devel/autoconf \
 		${LOCALBASE}/include/cups/cups.h:print/cups \
 		bash:shells/bash
-LIB_DEPENDS=	libfreetype.so:print/freetype2
+LIB_DEPENDS=	libfreetype.so:print/freetype2 \
+		libinotify.so:devel/libinotify
 RUN_DEPENDS=	javavm:java/javavmwrapper \
 		dejavu>0:x11-fonts/dejavu
 
@@ -406,6 +407,7 @@ post-patch:
 	    ${WRKSRC}/configure \
 	    ${WRKSRC}/common/autoconf/toolchain.m4 \
 	    ${WRKSRC}/jdk/make/lib/Awt2dLibraries.gmk \
+	    ${WRKSRC}/jdk/make/lib/NioLibraries.gmk \
 	    ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \
 	    ${WRKSRC}/jdk/src/share/classes/sun/print/PSPrinterJob.java \
 	    ${WRKSRC}/jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java

Added: head/java/openjdk8/files/patch-jdk-make-CompileJavaClasses.gmk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-jdk-make-CompileJavaClasses.gmk	Thu Dec 27 09:52:52 2018	(r488523)
@@ -0,0 +1,18 @@
+--- ./jdk/make/CompileJavaClasses.gmk.orig	2018-12-13 14:57:18.491487000 +0100
++++ ./jdk/make/CompileJavaClasses.gmk	2018-12-13 14:58:08.484490000 +0100
+@@ -129,12 +129,12 @@
+       sun/nio/fs/LinuxFileSystem.java \
+       sun/nio/fs/LinuxFileSystemProvider.java \
+       sun/nio/fs/LinuxNativeDispatcher.java \
+-      sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
+-      sun/nio/fs/LinuxWatchService.java
++      sun/nio/fs/LinuxUserDefinedFileAttributeView.java
+ endif
+ 
+ ifeq (, $(filter $(OPENJDK_TARGET_OS), linux bsd))
+-  EXFILES += sun/nio/fs/MagicFileTypeDetector.java
++  EXFILES += sun/nio/fs/MagicFileTypeDetector.java \
++      sun/nio/fs/LinuxWatchService.java
+ endif
+ 
+ ifneq ($(OPENJDK_TARGET_OS), macosx)

Added: head/java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk	Thu Dec 27 09:52:52 2018	(r488523)
@@ -0,0 +1,14 @@
+--- ./jdk/make/lib/NioLibraries.gmk.orig	2018-12-13 14:21:04.047810000 +0100
++++ ./jdk/make/lib/NioLibraries.gmk	2018-12-13 14:48:16.288168000 +0100
+@@ -92,8 +92,11 @@
+       PollArrayWrapper.c \
+       UnixAsynchronousServerSocketChannelImpl.c \
+       UnixAsynchronousSocketChannelImpl.c \
++      LinuxWatchService.c \
+       UnixCopyFile.c \
+       UnixNativeDispatcher.c
++  BUILD_LIBNIO_CFLAGS += -I%%LOCALBASE%%/include
++  BUILD_LIBNIO_LDFLAGS += -L%%LOCALBASE%%/lib -linotify
+ endif
+ 
+ ifeq ($(OPENJDK_TARGET_OS), macosx)

Added: head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd	Thu Dec 27 09:52:52 2018	(r488523)
@@ -0,0 +1,17 @@
+--- ./jdk/make/mapfiles/libnio/mapfile-bsd.orig	2018-12-13 15:20:56.817147000 +0100
++++ ./jdk/make/mapfiles/libnio/mapfile-bsd	2018-12-13 15:22:41.507010000 +0100
+@@ -143,6 +143,14 @@
+ 		Java_sun_nio_fs_MagicFileTypeDetector_initialize0;
+ 		Java_sun_nio_fs_MagicFileTypeDetector_probe0;
+ 		Java_sun_nio_fs_UnixCopyFile_transfer;
++		Java_sun_nio_fs_LinuxWatchService_eventSize;
++		Java_sun_nio_fs_LinuxWatchService_eventOffsets;
++		Java_sun_nio_fs_LinuxWatchService_inotifyInit;
++		Java_sun_nio_fs_LinuxWatchService_inotifyAddWatch;
++		Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch;
++		Java_sun_nio_fs_LinuxWatchService_configureBlocking;
++		Java_sun_nio_fs_LinuxWatchService_socketpair;
++		Java_sun_nio_fs_LinuxWatchService_poll;
+ 		Java_sun_nio_fs_UnixNativeDispatcher_access0;
+ 		Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
+ 		Java_sun_nio_fs_UnixNativeDispatcher_chown0;

Added: head/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java	Thu Dec 27 09:52:52 2018	(r488523)
@@ -0,0 +1,15 @@
+--- ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystem.java.orig	2018-12-13 14:23:02.834223000 +0100
++++ ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystem.java	2018-12-13 17:34:09.359192000 +0100
+@@ -45,8 +45,10 @@
+     public WatchService newWatchService()
+         throws IOException
+     {
+-        // use polling implementation until we implement a BSD/kqueue one
+-        return new PollingWatchService();
++        if (System.getProperty("sun.nio.fs.watchservice", "").equals("polling"))
++            return new PollingWatchService();
++        else
++            return new LinuxWatchService(this); // use the linux inotify implementation that wraps the kqueue calls
+     }
+ 
+     // lazy initialization of the list of supported attribute views



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812270952.wBR9qrhJ083942>