git: 457c22788cad - main - devel/luajava: pin to openjdk8

From: Ronald Klop <ronald_at_FreeBSD.org>
Date: Mon, 29 Dec 2025 18:18:41 UTC
The branch main has been updated by ronald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=457c22788cad99fe422082d27969043f16de1a03

commit 457c22788cad99fe422082d27969043f16de1a03
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2025-12-11 19:46:13 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2025-12-29 18:18:24 +0000

    devel/luajava: pin to openjdk8
    
    Compiliing with jdk21 gives an error in javadoc which is fixed by making the patch-Makefile more generic so all jdk versions use '-Xdoclint:none'.
    
    With the doclint option jdk11 and newer give an error on missing javah executable. I can't quickly fix this, so let's pin the port to openjdk8.
    
    With this patch we can set JAVA_DEFAULT=21 and this port will still use openjdk8 to builld.
    
    PR:     291579
    Approved-By:    maintainer timeout
---
 devel/luajava/Makefile             |  1 +
 devel/luajava/files/patch-Makefile | 15 ++++-----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/devel/luajava/Makefile b/devel/luajava/Makefile
index 0e975560f360..359aaced2b5f 100644
--- a/devel/luajava/Makefile
+++ b/devel/luajava/Makefile
@@ -9,6 +9,7 @@ COMMENT=	Lua scripting tool for Java
 WWW=		http://www.keplerproject.org/luajava/
 
 USES=		gmake dos2unix java lua:51
+JAVA_VERSION=	8
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=	yes
 
diff --git a/devel/luajava/files/patch-Makefile b/devel/luajava/files/patch-Makefile
index 4b1b1f134c8e..6dc82243a7c2 100644
--- a/devel/luajava/files/patch-Makefile
+++ b/devel/luajava/files/patch-Makefile
@@ -1,18 +1,11 @@
---- Makefile.orig	2015-09-10 23:58:50.499075000 -0700
-+++ Makefile	2015-09-11 00:01:10.958396000 -0700
-@@ -55,7 +55,14 @@
+--- Makefile.orig	2025-12-11 16:03:19 UTC
++++ Makefile
+@@ -55,7 +55,7 @@ apidoc:
  # Create the API Documentation
  #
  apidoc:
 -	$(JDK)/bin/javadoc -public -classpath src/java/ -quiet -d "doc/us/API" $(DOC_CLASSES)
-+	case $(JDK) in \
-+		*openjdk8*) \
-+			$(JDK)/bin/javadoc -Xdoclint:none -public -classpath src/java/ -quiet -d "doc/us/API" $(DOC_CLASSES) \
-+			;; \
-+		*) \
-+			$(JDK)/bin/javadoc -public -classpath src/java/ -quiet -d "doc/us/API" $(DOC_CLASSES) \
-+			;; \
-+	esac
++	$(JDK)/bin/javadoc -Xdoclint:none -public -classpath src/java/ -quiet -d "doc/us/API" $(DOC_CLASSES)
  
  #
  # Build .c files.