From: Kirill A. Korinsky Subject: Re: net/i2p, java/tanukiwrapper: jdk 11+ build problems To: ports Date: Fri, 01 Aug 2025 18:35:21 +0200 On Thu, 31 Jul 2025 18:52:17 +0200, Stuart Henderson wrote: > > If someone is interested in i2p, can you please take a look at getting > tanukiwrapper to build with MODJAVA_VER set to 11 or 11+? Currently with > that, it fails with > > [javac] error: Source option 1.4 is no longer supported. Use 6 or later. > [javac] error: Target option 1.4 is no longer supported. Use 1.6 or later. > Well, because fix of this issue is quite trivial, here a diff which fixes building on jdk11 and jdk21. Diff contains changes after make update-pathces. Ok? Index: Makefile =================================================================== RCS file: /cvs/ports/java/tanukiwrapper/Makefile,v diff -u -p -r1.27 Makefile --- Makefile 26 Sep 2023 11:47:58 -0000 1.27 +++ Makefile 1 Aug 2025 16:34:46 -0000 @@ -1,7 +1,7 @@ COMMENT= Tanuki Java Service Wrapper V= 3.5.49 -REVISION= 0 +REVISION= 1 DISTNAME= wrapper_${V}_src PKGNAME= java-tanukiwrapper-${V} CATEGORIES= java @@ -14,7 +14,7 @@ SITES= https://download.tanukisoftware. PERMIT_PACKAGE= Yes MODULES= java -MODJAVA_VER= 1.8 +MODJAVA_VER= 11+ MODJAVA_BUILD= ant .if ${MACHINE_ARCH} == "i386" Index: patches/patch-build_xml =================================================================== RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-build_xml,v diff -u -p -r1.7 patch-build_xml --- patches/patch-build_xml 8 Mar 2022 00:55:14 -0000 1.7 +++ patches/patch-build_xml 1 Aug 2025 16:34:46 -0000 @@ -29,7 +29,7 @@ Index: build.xml -@@ -1846,6 +1851,10 @@ wrapper.filter.action.999=NONE]]> +@@ -1844,6 +1849,10 @@ wrapper.filter.action.999=NONE]]> Index: patches/patch-default_properties =================================================================== RCS file: patches/patch-default_properties diff -N patches/patch-default_properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-default_properties 1 Aug 2025 16:34:46 -0000 @@ -0,0 +1,14 @@ +Compatibilty with JDK11+ + +Index: default.properties +--- default.properties.orig ++++ default.properties +@@ -28,7 +28,7 @@ build.compress = false + junit.failonerror = true + + # Minimum version of Java required to build the Wrapper +-javac.target.version=1.4 ++javac.target.version=1.8 + + # Location of java to build the pre-release + javac.dir=E:\\j2sdk1.4.2_19 Index: patches/patch-src_c_wrapper_c =================================================================== RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-src_c_wrapper_c,v diff -u -p -r1.6 patch-src_c_wrapper_c --- patches/patch-src_c_wrapper_c 8 Mar 2022 00:55:14 -0000 1.6 +++ patches/patch-src_c_wrapper_c 1 Aug 2025 16:34:46 -0000 @@ -12,7 +12,7 @@ Index: src/c/wrapper.c #include #include #else /* LINUX */ -@@ -5886,7 +5886,7 @@ int wrapperRunCommonInner() { +@@ -5895,7 +5895,7 @@ int wrapperRunCommonInner() { tz1 = tzname[0]; tz2 = tzname[1]; #endif @@ -21,7 +21,7 @@ Index: src/c/wrapper.c log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Timezone: %s (%s) Offset: %ld, hasDaylight: %d"), tz1, tz2, timezone, daylight); #else -@@ -6561,7 +6561,7 @@ int checkIfBinary(const TCHAR *filename) { +@@ -6573,7 +6573,7 @@ int checkIfBinary(const TCHAR *filename) { log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Magic number for file %s: 0x%02x%02x%02x%02x"), filename, head[0], head[1], head[2], head[3]); } @@ -30,7 +30,7 @@ Index: src/c/wrapper.c if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') { return 1; /*ELF */ #elif defined(AIX) -@@ -8282,7 +8282,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings, +@@ -8294,7 +8294,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings, /* See if the auto bits parameter is set. Ignored by all but the following platforms. */ @@ -39,7 +39,7 @@ Index: src/c/wrapper.c if (wrapperData->javaVersion->major < 9) { if (getBooleanProperty(properties, -@@ -8297,6 +8297,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings, +@@ -8309,6 +8309,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings, TEXT("wrapper.java.additional.auto_bits.solaris"), #elif defined(FREEBSD) TEXT("wrapper.java.additional.auto_bits.freebsd"), Index: patches/patch-src_c_wrapper_h =================================================================== RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-src_c_wrapper_h,v diff -u -p -r1.4 patch-src_c_wrapper_h --- patches/patch-src_c_wrapper_h 8 Mar 2022 00:55:14 -0000 1.4 +++ patches/patch-src_c_wrapper_h 1 Aug 2025 16:34:46 -0000 @@ -1,8 +1,9 @@ OpenBSD doesn't support timeb api ---- src/c/wrapper.h.orig Fri Jul 31 18:19:37 2020 -+++ src/c/wrapper.h Fri Jul 31 18:21:15 2020 -@@ -51,7 +51,12 @@ +Index: src/c/wrapper.h +--- src/c/wrapper.h.orig ++++ src/c/wrapper.h +@@ -52,7 +52,12 @@ #define DWORD unsigned long #endif Index: patches/patch-src_c_wrapper_unix_c =================================================================== RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-src_c_wrapper_unix_c,v diff -u -p -r1.5 patch-src_c_wrapper_unix_c --- patches/patch-src_c_wrapper_unix_c 8 Mar 2022 00:55:14 -0000 1.5 +++ patches/patch-src_c_wrapper_unix_c 1 Aug 2025 16:34:46 -0000 @@ -1,8 +1,9 @@ OpenBSD doesn't support timeb api add SI_ASYNCIO define ---- src/c/wrapper_unix.c.orig Fri Jul 31 18:22:16 2020 -+++ src/c/wrapper_unix.c Fri Jul 31 18:23:10 2020 +Index: src/c/wrapper_unix.c +--- src/c/wrapper_unix.c.orig ++++ src/c/wrapper_unix.c @@ -51,7 +51,6 @@ #include #include @@ -11,7 +12,7 @@ add SI_ASYNCIO define #include #include #include -@@ -466,8 +465,10 @@ const TCHAR* getSignalCodeDesc(int code) { +@@ -477,8 +476,10 @@ const TCHAR* getSignalCodeDesc(int code) { return TEXT("mesq state changed"); #endif