git: aad15015e504 - main - Mk/bsd.java.mk: Add support for openjdk18 and 18[+] as a version

From: Greg Lewis <glewis_at_FreeBSD.org>
Date: Sat, 16 Apr 2022 14:52:34 UTC
The branch main has been updated by glewis:

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

commit aad15015e50470c4bf40e788348354db7cb73d27
Author:     Greg Lewis <glewis@FreeBSD.org>
AuthorDate: 2022-04-16 14:48:10 +0000
Commit:     Greg Lewis <glewis@FreeBSD.org>
CommitDate: 2022-04-16 14:52:19 +0000

    Mk/bsd.java.mk: Add support for openjdk18 and 18[+] as a version
---
 Mk/bsd.java.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk
index 188d7714dbe4..f7eb3fe6192b 100644
--- a/Mk/bsd.java.mk
+++ b/Mk/bsd.java.mk
@@ -24,7 +24,7 @@ Java_Include_MAINTAINER=	java@FreeBSD.org
 # JAVA_VERSION		List of space-separated suitable java versions for the
 #					port. An optional "+" allows you to specify a range of
 #					versions. (allowed values: 7[+] 8[+] 11[+] 12[+] 13[+]
-#					14[+] 15[+] 16[+] 17[+])
+#					14[+] 15[+] 16[+] 17[+] 18[+])
 #
 # JAVA_OS			List of space-separated suitable JDK port operating systems
 #					for the port. (allowed values: native linux)
@@ -161,7 +161,7 @@ SUB_LIST+=		JAVA_OS="${JAVA_OS}"
 .		endif
 
 # The complete list of Java versions, os and vendors supported.
-__JAVA_VERSION_LIST=	7 8 11 12 13 14 15 16 17
+__JAVA_VERSION_LIST=	7 8 11 12 13 14 15 16 17 18
 _JAVA_VERSION_LIST=		${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
 _JAVA_OS_LIST=			native linux
 _JAVA_VENDOR_LIST=		openjdk oracle
@@ -186,6 +186,8 @@ _JAVA_PORT_NATIVE_OPENJDK_JDK_16_INFO=		PORT=java/openjdk16			HOME=${LOCALBASE}/
 											VERSION=16	OS=native	VENDOR=openjdk
 _JAVA_PORT_NATIVE_OPENJDK_JDK_17_INFO=		PORT=java/openjdk17			HOME=${LOCALBASE}/openjdk17 \
 											VERSION=17	OS=native	VENDOR=openjdk
+_JAVA_PORT_NATIVE_OPENJDK_JDK_18_INFO=		PORT=java/openjdk18			HOME=${LOCALBASE}/openjdk18 \
+											VERSION=18	OS=native	VENDOR=openjdk
 _JAVA_PORT_LINUX_ORACLE_JDK_8_INFO=		PORT=java/linux-oracle-jdk18	HOME=${LOCALBASE}/linux-oracle-jdk1.8.0 \
 											VERSION=8	OS=linux	VENDOR=oracle
 
@@ -207,6 +209,7 @@ __JAVA_PORTS_ALL=	\
 					JAVA_PORT_NATIVE_OPENJDK_JDK_14 \
 					JAVA_PORT_NATIVE_OPENJDK_JDK_15 \
 					JAVA_PORT_NATIVE_OPENJDK_JDK_16 \
+					JAVA_PORT_NATIVE_OPENJDK_JDK_18 \
 					JAVA_PORT_NATIVE_OPENJDK_JDK_7  \
 					JAVA_PORT_LINUX_ORACLE_JDK_8
 _JAVA_PORTS_ALL=	${JAVA_PREFERRED_PORTS} \
@@ -282,7 +285,7 @@ JAVA_RUN=	jre
 .		undef _JAVA_PORTS_INSTALLED
 .		undef _JAVA_PORTS_POSSIBLE
 .		if defined(JAVA_VERSION)
-_JAVA_VERSION=	${JAVA_VERSION:S/1.7+/1.7 1.8+/:S/1.8+/1.8 11+/:S/1.7/7/:S/1.8/8/:S/7+/7 8+/:S/8+/8 11+/:S/11+/11 12+/:S/12+/12 13+/:S/13+/13 14+/:S/14+/14 15+/:S/15+/15 16+/:S/16+/16 17+/:S/17+/17/}
+_JAVA_VERSION=	${JAVA_VERSION:S/1.7+/1.7 1.8+/:S/1.8+/1.8 11+/:S/1.7/7/:S/1.8/8/:S/7+/7 8+/:S/8+/8 11+/:S/11+/11 12+/:S/12+/12 13+/:S/13+/13 14+/:S/14+/14 15+/:S/15+/15 16+/:S/16+/16 17+/:S/17+/17 18+/:S/18+/18/}
 .		else
 _JAVA_VERSION=	${__JAVA_VERSION_LIST}
 .		endif