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

Collapse All | Expand All

(-)Mk/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})
(-)databases/hbase/Makefile (-1 / +1 lines)
Lines 55-61 Link Here
55
55
56
.include <bsd.port.pre.mk>
56
.include <bsd.port.pre.mk>
57
57
58
.if ${JAVA_PORT_VERSION:M1.8.*}
58
.if ${JAVA_PORT_VERSION:M*8*}
59
JDK18_PROFILE=	,build-with-jdk8
59
JDK18_PROFILE=	,build-with-jdk8
60
JDK18_SOURCE=	-DcompileSource=1.8
60
JDK18_SOURCE=	-DcompileSource=1.8
61
.endif
61
.endif
(-)databases/mysql-connector-java51/Makefile (-2 / +2 lines)
Lines 47-53 Link Here
47
	@${DO_NADA}
47
	@${DO_NADA}
48
48
49
do-build-DOCS-on:
49
do-build-DOCS-on:
50
.if ${JAVA_PORT_VERSION:M1.8.*}
50
.if ${JAVA_PORT_VERSION:M*8*}
51
	@${ECHO_MSG} "NOTE>>> Generating javadoc is broken with JDK 1.8+"
51
	@${ECHO_MSG} "NOTE>>> Generating javadoc is broken with JDK 1.8+"
52
.else
52
.else
53
	@${MKDIR} ${JAVADOCDIR} && (cd ${SRCDIR};               \
53
	@${MKDIR} ${JAVADOCDIR} && (cd ${SRCDIR};               \
Lines 67-73 Link Here
67
	@for extradoc in ${EXTRADOCS} ; do                          \
67
	@for extradoc in ${EXTRADOCS} ; do                          \
68
	  ${INSTALL_DATA} ${INSTALL_WRKSRC}/$$extradoc ${STAGEDIR}${DOCSDIR} ; \
68
	  ${INSTALL_DATA} ${INSTALL_WRKSRC}/$$extradoc ${STAGEDIR}${DOCSDIR} ; \
69
	done
69
	done
70
.if ${JAVA_PORT_VERSION:N1.8.*}
70
.if ${JAVA_PORT_VERSION:N*8*}
71
	@${MKDIR} ${STAGEDIR}${APIDOCSDIR}
71
	@${MKDIR} ${STAGEDIR}${APIDOCSDIR}
72
	@cd ${JAVADOCDIR} && ${COPYTREE_SHARE} . ${APIDOCSDIR}
72
	@cd ${JAVADOCDIR} && ${COPYTREE_SHARE} . ${APIDOCSDIR}
73
.endif
73
.endif
(-)devel/luajava/Makefile (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
.include <bsd.port.pre.mk>
23
.include <bsd.port.pre.mk>
24
24
25
.if ${JAVA_PORT_VERSION} == 1.7
25
.if ${JAVA_PORT_VERSION:M*7*}
26
PLIST_SUB+=	JDK17=""
26
PLIST_SUB+=	JDK17=""
27
.else
27
.else
28
PLIST_SUB+=	JDK17="@comment "
28
PLIST_SUB+=	JDK17="@comment "
(-)dns/dnsjava/Makefile (-2 / +2 lines)
Lines 23-34 Link Here
23
23
24
.include <bsd.port.pre.mk>
24
.include <bsd.port.pre.mk>
25
25
26
.if ${JAVA_PORT_VERSION} == "1.6.0"
26
.if ${JAVA_PORT_VERSION:M*6*}
27
PLIST_SUB+=	JDK6=""
27
PLIST_SUB+=	JDK6=""
28
.else
28
.else
29
PLIST_SUB+=	JDK6="@comment "
29
PLIST_SUB+=	JDK6="@comment "
30
.endif
30
.endif
31
.if ${JAVA_PORT_VERSION} == "1.8.0"
31
.if ${JAVA_PORT_VERSION:M*8*}
32
PLIST_SUB+=	JDK8=""
32
PLIST_SUB+=	JDK8=""
33
.else
33
.else
34
PLIST_SUB+=	JDK8="@comment "
34
PLIST_SUB+=	JDK8="@comment "
(-)games/jin/Makefile (-1 / +2 lines)
Lines 25-31 Link Here
25
MAKE_ARGS+=	-lib ${JAVAJARDIR}/bsh.jar
25
MAKE_ARGS+=	-lib ${JAVAJARDIR}/bsh.jar
26
26
27
SUB_FILES=	${PORTNAME}
27
SUB_FILES=	${PORTNAME}
28
SUB_LIST=	JINJAR=${JINJAR:Q} JAVA_VERSION=${JAVA_PORT_VERSION:R}
28
SUB_LIST=	JINJAR=${JINJAR:Q} \
29
		JAVA_VERSION=${JAVA_PORT_VERSION:R:C/^([^1])/1.\1/}
29
30
30
DATADIR=	${JAVASHAREDIR}/${PORTNAME}
31
DATADIR=	${JAVASHAREDIR}/${PORTNAME}
31
32
(-)graphics/jogl/Makefile (-4 / +4 lines)
Lines 51-70 Link Here
51
51
52
.include <bsd.port.pre.mk>
52
.include <bsd.port.pre.mk>
53
53
54
.if ${JAVA_PORT_VERSION:M1.6.*}
54
.if ${JAVA_PORT_VERSION:M*6*}
55
PLIST_SUB+=	JDK6=""
55
PLIST_SUB+=	JDK6=""
56
PLIST_SUB+=	JDK7="@comment "
56
PLIST_SUB+=	JDK7="@comment "
57
.endif
57
.endif
58
.if ${JAVA_PORT_VERSION:M1.7.*}
58
.if ${JAVA_PORT_VERSION:M*7*}
59
PLIST_SUB+=	JDK6="@comment "
59
PLIST_SUB+=	JDK6="@comment "
60
PLIST_SUB+=	JDK7=""
60
PLIST_SUB+=	JDK7=""
61
.endif
61
.endif
62
.if ${JAVA_PORT_VERSION:M1.8.*}
62
.if ${JAVA_PORT_VERSION:M*8*}
63
PLIST_SUB+=	JDK6="@comment "
63
PLIST_SUB+=	JDK6="@comment "
64
PLIST_SUB+=	JDK7="@comment "
64
PLIST_SUB+=	JDK7="@comment "
65
.endif
65
.endif
66
66
67
.if ${JAVA_PORT_VERSION:M1.8.*}
67
.if ${JAVA_PORT_VERSION:M*8*}
68
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-build.xml
68
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-build.xml
69
.endif
69
.endif
70
70

Return to bug 238758