View | Details | Raw Unified | Return to bug 238758 | Differences between
and this patch

Collapse All | Expand All

(-)bsd.java.mk (-25 / +37 lines)
Lines 25-37 Link Here
25
#
25
#
26
# JAVA_VERSION		List of space-separated suitable java versions for the
26
# JAVA_VERSION		List of space-separated suitable java versions for the
27
#					port. An optional "+" allows you to specify a range of
27
#					port. An optional "+" allows you to specify a range of
28
#					versions. (allowed values: 1.6[+] 1.7[+] 1.8[+])
28
#					versions. (allowed values: 6[+] 7[+] 8[+] 9[+] 10[+]
29
#					11[+] 12[+])
29
#
30
#
30
# JAVA_OS			List of space-separated suitable JDK port operating systems
31
# JAVA_OS			List of space-separated suitable JDK port operating systems
31
#					for the port. (allowed values: native linux)
32
#					for the port. (allowed values: native linux)
32
#
33
#
33
# JAVA_VENDOR		List of space-separated suitable JDK port vendors for the
34
# JAVA_VENDOR		List of space-separated suitable JDK port vendors for the
34
#					port. (allowed values: openjdk oracle sun)
35
#					port. (allowed values: openjdk oracle)
35
#
36
#
36
# JAVA_BUILD		When set, it means that the selected JDK port should be
37
# JAVA_BUILD		When set, it means that the selected JDK port should be
37
#					added to build dependencies for the port.
38
#					added to build dependencies for the port.
Lines 54-64 Link Here
54
#
55
#
55
# JAVA_PORT			The name of the JDK port. (e.g. 'java/openjdk6')
56
# JAVA_PORT			The name of the JDK port. (e.g. 'java/openjdk6')
56
#
57
#
57
# JAVA_PORT_VERSION	The version of the JDK port. (e.g. '1.6')
58
# JAVA_PORT_VERSION	The version of the JDK port. (e.g. '6')
58
#
59
#
59
# JAVA_PORT_OS		The operating system used by the JDK port. (e.g. 'linux')
60
# JAVA_PORT_OS		The operating system used by the JDK port. (e.g. 'linux')
60
#
61
#
61
# JAVA_PORT_VENDOR	The vendor of the JDK port. (e.g. 'sun')
62
# JAVA_PORT_VENDOR	The vendor of the JDK port. (e.g. 'openjdk')
62
#
63
#
63
# JAVA_PORT_OS_DESCRIPTION		Description of the operating system used by the
64
# JAVA_PORT_OS_DESCRIPTION		Description of the operating system used by the
64
#								JDK port. (e.g. 'Linux')
65
#								JDK port. (e.g. 'Linux')
Lines 76-82 Link Here
76
#					'/usr/local/openjdk6/bin/jar' or '/usr/local/bin/fastjar')
77
#					'/usr/local/openjdk6/bin/jar' or '/usr/local/bin/fastjar')
77
#
78
#
78
# APPLETVIEWER		Path to the appletviewer utility. (e.g.
79
# APPLETVIEWER		Path to the appletviewer utility. (e.g.
79
#					'/usr/local/linux-jdk1.7.0/bin/appletviewer')
80
#					'/usr/local/linux-jdk1.8.0/bin/appletviewer')
80
#
81
#
81
# JAVA				Path to the java executable. Use this for executing Java
82
# JAVA				Path to the java executable. Use this for executing Java
82
#					programs. (e.g. '/usr/local/openjdk6/bin/java')
83
#					programs. (e.g. '/usr/local/openjdk6/bin/java')
Lines 130-135 Link Here
130
131
131
.	if defined(USE_JAVA)
132
.	if defined(USE_JAVA)
132
133
134
.		if !defined(JAVA_VERSION) && empty(USE_JAVA:C/[0-9]*[\.]*[0-9]*[+]*//)
135
JAVA_VERSION=${USE_JAVA}
136
.		endif
133
137
134
#-------------------------------------------------------------------------------
138
#-------------------------------------------------------------------------------
135
# Stage 1: Define constants
139
# Stage 1: Define constants
Lines 159-186 Link Here
159
.		endif
163
.		endif
160
164
161
# The complete list of Java versions, os and vendors supported.
165
# The complete list of Java versions, os and vendors supported.
162
__JAVA_VERSION_LIST=	1.6 1.7 1.8 1.9
166
__JAVA_VERSION_LIST=	6 7 8 9 10 11 12
163
_JAVA_VERSION_LIST=		${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
167
_JAVA_VERSION_LIST=		${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
164
_JAVA_OS_LIST=			native linux
168
_JAVA_OS_LIST=			native linux
165
_JAVA_VENDOR_LIST=		openjdk oracle sun
169
_JAVA_VENDOR_LIST=		openjdk oracle
166
170
167
# Set all meta-information about JDK ports:
171
# Set all meta-information about JDK ports:
168
# port location, corresponding JAVA_HOME, JDK version, OS, vendor
172
# port location, corresponding JAVA_HOME, JDK version, OS, vendor
169
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_6_INFO=		PORT=java/openjdk6			HOME=${LOCALBASE}/openjdk6 \
173
_JAVA_PORT_NATIVE_OPENJDK_JDK_6_INFO=		PORT=java/openjdk6			HOME=${LOCALBASE}/openjdk6 \
170
											VERSION=1.6.0	OS=native	VENDOR=openjdk
174
											VERSION=6	OS=native	VENDOR=openjdk
171
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_7_INFO=		PORT=java/openjdk7			HOME=${LOCALBASE}/openjdk7 \
175
_JAVA_PORT_NATIVE_OPENJDK_JDK_7_INFO=		PORT=java/openjdk7			HOME=${LOCALBASE}/openjdk7 \
172
											VERSION=1.7.0	OS=native	VENDOR=openjdk
176
											VERSION=7	OS=native	VENDOR=openjdk
173
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_8_INFO=		PORT=java/openjdk8			HOME=${LOCALBASE}/openjdk8 \
177
_JAVA_PORT_NATIVE_OPENJDK_JDK_8_INFO=		PORT=java/openjdk8			HOME=${LOCALBASE}/openjdk8 \
174
											VERSION=1.8.0	OS=native	VENDOR=openjdk
178
											VERSION=8	OS=native	VENDOR=openjdk
175
_JAVA_PORT_LINUX_ORACLE_JDK_1_8_INFO=		PORT=java/linux-oracle-jdk18	HOME=${LOCALBASE}/linux-oracle-jdk1.8.0 \
179
_JAVA_PORT_NATIVE_OPENJDK_JDK_11_INFO=		PORT=java/openjdk11			HOME=${LOCALBASE}/openjdk11 \
176
											VERSION=1.8.0	OS=linux	VENDOR=oracle
180
											VERSION=11	OS=native	VENDOR=openjdk
177
_JAVA_PORT_LINUX_ORACLE_JDK_1_9_INFO=		PORT=java/linux-oracle-jdk9	HOME=${LOCALBASE}/linux-oracle-jdk9 \
181
_JAVA_PORT_NATIVE_OPENJDK_JDK_12_INFO=		PORT=java/openjdk12			HOME=${LOCALBASE}/openjdk12 \
178
											VERSION=1.9.0	OS=linux	VENDOR=oracle
182
											VERSION=12	OS=native	VENDOR=openjdk
183
_JAVA_PORT_LINUX_ORACLE_JDK_8_INFO=		PORT=java/linux-oracle-jdk18	HOME=${LOCALBASE}/linux-oracle-jdk1.8.0 \
184
											VERSION=8	OS=linux	VENDOR=oracle
185
_JAVA_PORT_LINUX_ORACLE_JDK_9_INFO=		PORT=java/linux-oracle-jdk9	HOME=${LOCALBASE}/linux-oracle-jdk9 \
186
											VERSION=9	OS=linux	VENDOR=oracle
187
_JAVA_PORT_LINUX_ORACLE_JDK_10_INFO=		PORT=java/linux-oracle-jdk10	HOME=${LOCALBASE}/linux-oracle-jdk10 \
188
											VERSION=10	OS=linux	VENDOR=oracle
179
189
180
# Verbose description for each VENDOR
190
# Verbose description for each VENDOR
181
_JAVA_VENDOR_openjdk=		"OpenJDK BSD Porting Team"
191
_JAVA_VENDOR_openjdk=		"OpenJDK BSD Porting Team"
182
_JAVA_VENDOR_oracle=		Oracle
192
_JAVA_VENDOR_oracle=		Oracle
183
_JAVA_VENDOR_sun=			Sun
184
193
185
# Verbose description for each OS
194
# Verbose description for each OS
186
_JAVA_OS_native=	Native
195
_JAVA_OS_native=	Native
Lines 187-197 Link Here
187
_JAVA_OS_linux=		Linux
196
_JAVA_OS_linux=		Linux
188
197
189
# List all JDK ports in order of preference
198
# List all JDK ports in order of preference
190
__JAVA_PORTS_ALL=	JAVA_PORT_NATIVE_OPENJDK_JDK_1_8 \
199
__JAVA_PORTS_ALL=	JAVA_PORT_NATIVE_OPENJDK_JDK_8  \
191
					JAVA_PORT_NATIVE_OPENJDK_JDK_1_7 \
200
					JAVA_PORT_NATIVE_OPENJDK_JDK_11 \
192
					JAVA_PORT_NATIVE_OPENJDK_JDK_1_6 \
201
					JAVA_PORT_NATIVE_OPENJDK_JDK_12 \
193
					JAVA_PORT_LINUX_ORACLE_JDK_1_8 \
202
					JAVA_PORT_NATIVE_OPENJDK_JDK_7  \
194
					JAVA_PORT_LINUX_ORACLE_JDK_1_9
203
					JAVA_PORT_NATIVE_OPENJDK_JDK_6  \
204
					JAVA_PORT_LINUX_ORACLE_JDK_8    \
205
					JAVA_PORT_LINUX_ORACLE_JDK_9    \
206
					JAVA_PORT_LINUX_ORACLE_JDK_10
195
_JAVA_PORTS_ALL=	${JAVA_PREFERRED_PORTS} \
207
_JAVA_PORTS_ALL=	${JAVA_PREFERRED_PORTS} \
196
					${__JAVA_PORTS_ALL}
208
					${__JAVA_PORTS_ALL}
197
209
Lines 264-270 Link Here
264
.		undef _JAVA_PORTS_INSTALLED
276
.		undef _JAVA_PORTS_INSTALLED
265
.		undef _JAVA_PORTS_POSSIBLE
277
.		undef _JAVA_PORTS_POSSIBLE
266
.		if defined(JAVA_VERSION)
278
.		if defined(JAVA_VERSION)
267
_JAVA_VERSION=	${JAVA_VERSION:S/1.6+/1.6 1.7+/:S/1.7+/1.7 1.8+/:S/1.8+/1.8 1.9+/:S/1.9+/1.9/}
279
_JAVA_VERSION=	${JAVA_VERSION:S/1.6+/1.6 1.7+/:S/1.7+/1.7 1.8+/:S/1.8+/1.8 1.9+/:S/1.9+/1.9 10+/:S/1.6/6/:S/1.7/7/:S/1.8/8/:S/1.9/9/:S/6+/6 7+/:S/7+/7 8+/:S/8+/8 9+/:S/9+/9 10+/:S/10+/10 11+/:S/11+/11 12+/:S/12+/12/}
268
.		else
280
.		else
269
_JAVA_VERSION=	${__JAVA_VERSION_LIST}
281
_JAVA_VERSION=	${__JAVA_VERSION_LIST}
270
.		endif
282
.		endif
Lines 282-288 Link Here
282
.		for A_JAVA_PORT in ${_JAVA_PORTS_ALL}
294
.		for A_JAVA_PORT in ${_JAVA_PORTS_ALL}
283
A_JAVA_PORT_INFO:=			${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
295
A_JAVA_PORT_INFO:=			${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
284
A_JAVA_PORT_HOME=			${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
296
A_JAVA_PORT_HOME=			${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
285
A_JAVA_PORT_VERSION=		${A_JAVA_PORT_INFO:MVERSION=*:C/VERSION=([0-9])\.([0-9])(.*)/\1.\2/}
297
A_JAVA_PORT_VERSION=		${A_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
286
A_JAVA_PORT_OS=				${A_JAVA_PORT_INFO:MOS=*:S,OS=,,}
298
A_JAVA_PORT_OS=				${A_JAVA_PORT_INFO:MOS=*:S,OS=,,}
287
A_JAVA_PORT_VENDOR=			${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
299
A_JAVA_PORT_VENDOR=			${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
288
.if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE})
300
.if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE})

Return to bug 238758