Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147480736
D48201.id148422.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D48201.id148422.diff
View Options
diff --git a/Mk/bsd.java.mk b/Mk/Uses/java.mk
rename from Mk/bsd.java.mk
rename to Mk/Uses/java.mk
--- a/Mk/bsd.java.mk
+++ b/Mk/Uses/java.mk
@@ -1,29 +1,24 @@
#-*- tab-width: 4; -*-
# ex:ts=4
#
-# bsd.java.mk - Support for Java-based ports.
+# Provide support for Java (java)
#
+# Feature: java
+# Usage: USES= java
+#
+# It takes no arguments.
#
# For FreeBSD committers:
# Please send all suggested changes to the maintainer instead of committing
# them yourself.
#
-
-.if !defined(Java_Include)
-
-Java_Include= bsd.java.mk
-Java_Include_MAINTAINER= java@FreeBSD.org
-
#-------------------------------------------------------------------------------
# Variables that each port can define:
#
-# USE_JAVA Should be defined to the remaining variables to have any
-# effect
-#
# JAVA_VERSION List of space-separated suitable java versions for the
# port. An optional "+" allows you to specify a range of
# versions. (allowed values: 8[+] 11[+] 17[+] 18[+] 19[+]
-# 20[+] 21[+])
+# 20[+] 21[+] 22[+])
#
# JAVA_OS List of space-separated suitable JDK port operating systems
# for the port. (allowed values: native linux)
@@ -125,13 +120,15 @@
# Stage 4: Add any dependencies if necessary
# Stage 5: Define all settings for the port to use
#
+# MAINTAINER: java@FreeBSD.org
-. if defined(USE_JAVA)
+.if !defined(_INCLUDE_USES_JAVA_MK)
-. if !defined(JAVA_VERSION) && empty(USE_JAVA:C/[0-9]*[\.]*[0-9]*[+]*//)
-JAVA_VERSION=${USE_JAVA}
-. endif
+_INCLUDE_USES_JAVA_MK= yes
+. if !empty(java_ARGS)
+IGNORE= USES=java does not take arguments
+. endif
#-------------------------------------------------------------------------------
# Stage 1: Define constants
#
@@ -160,7 +157,7 @@
. endif
# The complete list of Java versions, os and vendors supported.
-__JAVA_VERSION_LIST= 8 11 17 18 19 20 21
+__JAVA_VERSION_LIST= 8 11 17 18 19 20 21 22
_JAVA_VERSION_LIST= ${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
_JAVA_OS_LIST= native linux
_JAVA_VENDOR_LIST= openjdk oracle
@@ -181,6 +178,8 @@
VERSION=20 OS=native VENDOR=openjdk
_JAVA_PORT_NATIVE_OPENJDK_JDK_21_INFO= PORT=java/openjdk21 HOME=${LOCALBASE}/openjdk21 \
VERSION=21 OS=native VENDOR=openjdk
+_JAVA_PORT_NATIVE_OPENJDK_JDK_22_INFO= PORT=java/openjdk22 HOME=${LOCALBASE}/openjdk22 \
+ VERSION=22 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
@@ -201,6 +200,7 @@
JAVA_PORT_NATIVE_OPENJDK_JDK_19 \
JAVA_PORT_NATIVE_OPENJDK_JDK_20 \
JAVA_PORT_NATIVE_OPENJDK_JDK_21 \
+ JAVA_PORT_NATIVE_OPENJDK_JDK_22 \
JAVA_PORT_LINUX_ORACLE_JDK_8
_JAVA_PORTS_ALL= ${JAVA_PREFERRED_PORTS} \
JAVA_PORT_NATIVE_OPENJDK_JDK_${JAVA_DEFAULT} \
@@ -215,7 +215,6 @@
# suitable
#
-# From here, the port is using bsd.java.mk v2.0
# Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS}
. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS
@@ -275,7 +274,7 @@
. undef _JAVA_PORTS_INSTALLED
. undef _JAVA_PORTS_POSSIBLE
. if defined(JAVA_VERSION)
-_JAVA_VERSION= ${JAVA_VERSION:S/^8+/8 11+/:S/^11+/11 17+/:S/^17+/17 18+/:S/^18+/18 19+/:S/^19+/19 20+/:S/^20+/20 21+/:S/^21+/21/}
+_JAVA_VERSION= ${JAVA_VERSION:S/^8+/8 11+/:S/^11+/11 17+/:S/^17+/17 18+/:S/^18+/18 19+/:S/^19+/19 20+/:S/^20+/20 21+/:S/^21+/21 22+/:S/^22+/22/}
. else
_JAVA_VERSION= ${__JAVA_VERSION_LIST}
. endif
@@ -389,7 +388,7 @@
# Ant support: default do-build target
. if defined(USE_ANT)
-DESTDIRNAME?= -Dfreebsd.ports.destdir
+DESTDIRNAME= -Dfreebsd.ports.destdir
ANT?= ${LOCALBASE}/bin/ant
MAKE_ENV+= JAVA_HOME=${JAVA_HOME}
BUILD_DEPENDS+= ${ANT}:devel/apache-ant
@@ -477,5 +476,4 @@
@${ECHO_CMD} "JAVAC= ${JAVAC}"
@${ECHO_CMD} "JAVA_CLASSES= ${JAVA_CLASSES}"
-. endif
.endif
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -363,9 +363,6 @@
# - Legal values are: 24
# If set to an unknown value, the port is marked BROKEN.
##
-# USE_JAVA - If set, this port relies on the Java language.
-# Implies inclusion of bsd.java.mk. (Also see
-# that file for more information on USE_JAVA_*).
# USE_OCAML - If set, this port relies on the OCaml language.
# Implies inclusion of bsd.ocaml.mk. (Also see
# that file for more information on USE_OCAML*).
@@ -1414,10 +1411,6 @@
.sinclude "${odir}/Mk/bsd.overlay.mk"
. endfor
-. if defined(USE_JAVA)
-.include "${PORTSDIR}/Mk/bsd.java.mk"
-. endif
-
. if defined(USE_OCAML)
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
. endif
@@ -1938,10 +1931,6 @@
.sinclude "${odir}/Mk/bsd.overlay.mk"
. endfor
-. if defined(USE_JAVA)
-.include "${PORTSDIR}/Mk/bsd.java.mk"
-. endif
-
. if defined(USE_OCAML)
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
. endif
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -210,7 +210,7 @@
XORG_CAT CARGO_USE_GITHUB CARGO_USE_GITLAB CARGO_GIT_SUBDIR \
USE_RUBY USE_RUBY_EXTCONF USE_RUBY_SETUP RUBY_NO_BUILD_DEPENDS \
RUBY_NO_RUN_DEPENDS USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN \
- USE_OPENLDAP WANT_OPENLDAP_VER
+ USE_OPENLDAP WANT_OPENLDAP_VER USE_JAVA
SANITY_DEPRECATED= MLINKS \
USE_MYSQL WANT_MYSQL_VER \
PYDISTUTILS_INSTALLNOSINGLE
@@ -307,6 +307,7 @@
USE_RUBY_SETUP_ALT= USES=ruby:setup
RUBY_NO_BUILD_DEPENDS_ALT= USES=ruby:run
RUBY_NO_RUN_DEPENDS_ALT= USES=ruby:build
+USE_JAVA_ALT= USES=java
.for a in ${SANITY_DEPRECATED}
. if defined(${a})
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 8:12 AM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29565334
Default Alt Text
D48201.id148422.diff (5 KB)
Attached To
Mode
D48201: Mk/**java.mk: Convert bsd.java.mk to USES
Attached
Detach File
Event Timeline
Log In to Comment