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

Collapse All | Expand All

(-)Mk/bsd.default-versions.mk (+2 lines)
Lines 51-56 Link Here
51
.endif
51
.endif
52
# Possible values: 7, 8, 9, agpl
52
# Possible values: 7, 8, 9, agpl
53
GHOSTSCRIPT_DEFAULT?=	agpl
53
GHOSTSCRIPT_DEFAULT?=	agpl
54
# Allowed values: 7 8 11 12 13
55
JAVA_DEFAULT?=8
54
# Possible values: 0.6, 0.7, 1.0, 1.1
56
# Possible values: 0.6, 0.7, 1.0, 1.1
55
JULIA_DEFAULT?=		1.0
57
JULIA_DEFAULT?=		1.0
56
# Possible values: 2.0.6
58
# Possible values: 2.0.6
(-)Mk/bsd.java.mk (-2 / +20 lines)
Lines 223-228 Link Here
223
223
224
# Error checking: JAVA_VERSION
224
# Error checking: JAVA_VERSION
225
.if defined(JAVA_VERSION)
225
.if defined(JAVA_VERSION)
226
.for A_VER in ${JAVA_VERSION}
227
_JAVA_VERSION_MIN=              ${A_VER:C/^([0-9])\.([0-9])(.*)$/\2/}
228
_CAN_USE_NEWER=                 ${A_VER:C/^([0-9])\.([0-9])(.*)$/\3/}
229
.endfor
226
.if !defined(_JAVA_VERSION_LIST_REGEXP)
230
.if !defined(_JAVA_VERSION_LIST_REGEXP)
227
_JAVA_VERSION_LIST_REGEXP=	${_JAVA_VERSION_LIST:C/\+/\\+/:ts|}
231
_JAVA_VERSION_LIST_REGEXP=	${_JAVA_VERSION_LIST:C/\+/\\+/:ts|}
228
.endif
232
.endif
Lines 230-235 Link Here
230
check-makevars::
234
check-makevars::
231
	@( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \
235
	@( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \
232
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE})
236
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE})
237
# warn user if JAVA_DEFAULT is less than JAVA_VERSION_MIN and that would be using JAVA_VERSION_MIN instead for the port
238
	@( test ${JAVA_DEFAULT} < ${_JAVA_VERSION_MIN} && ( ${ECHO_CMD} "${JAVA_DEFAULT} is less than required port version ${_JAVA_VERSION_MIN}.  Using version the port's required version ${_JAVA_VERSION_MIN} instead."); ${TRUE})
239
.  if ${JAVA_DEFAULT} < ${_JAVA_VERSION_MIN}
240
JAVA_DEFAULT=     ${_JAVA_VERSION_MIN}
241
.  endif
233
.endif
242
.endif
234
243
235
# Error checking: JAVA_VENDOR
244
# Error checking: JAVA_VENDOR
Lines 333-339 Link Here
333
.                 for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE}
342
.                 for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE}
334
.                   if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit)
343
.                   if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit)
335
_JAVA_PORT=	$i
344
_JAVA_PORT=	$i
345
_JAVA_PORT_INFO:=               ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
346
JAVA_PORT_VERSION=		${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
347
.                     if ${JAVA_DEFAULT} == ${JAVA_PORT_VERSION} || (defined(_CAN_USE_NEWER) && "${_CAN_USE_NEWER}" == "" && ${_JAVA_VERSION_MIN} == ${JAVA_PORT_VERSION})
336
_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit=	1
348
_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit=	1
349
.                     endif
337
.                   endif
350
.                   endif
338
.                 endfor
351
.                 endfor
339
# If no installed JDK port fits, then pick one from the list of possible ones
352
# If no installed JDK port fits, then pick one from the list of possible ones
Lines 341-355 Link Here
341
.                 for i in ${_JAVA_PORTS_POSSIBLE}
354
.                 for i in ${_JAVA_PORTS_POSSIBLE}
342
.                   if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit)
355
.                   if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit)
343
_JAVA_PORT=	$i
356
_JAVA_PORT=	$i
357
_JAVA_PORT_INFO:=               ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
358
JAVA_PORT_VERSION=		${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
359
.                     if ${JAVA_DEFAULT} == ${JAVA_PORT_VERSION} || (defined(_CAN_USE_NEWER) && "${_CAN_USE_NEWER}" == "" && ${_JAVA_VERSION_MIN} == ${JAVA_PORT_VERSION})
344
_JAVA_PORTS_POSSIBLE_shortcircuit=	1
360
_JAVA_PORTS_POSSIBLE_shortcircuit=	1
361
.                     endif
345
.                   endif
362
.                   endif
346
.                 endfor
363
.                 endfor
347
.		endif
364
.		endif
348
365
349
_JAVA_PORT_INFO:=		${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
350
JAVA_PORT=				${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,}
366
JAVA_PORT=				${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,}
351
JAVA_HOME=				${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
367
JAVA_HOME=				${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
352
JAVA_PORT_VERSION=		${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
353
JAVA_PORT_OS=			${_JAVA_PORT_INFO:MOS=*:S,OS=,,}
368
JAVA_PORT_OS=			${_JAVA_PORT_INFO:MOS=*:S,OS=,,}
354
JAVA_PORT_VENDOR=		${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
369
JAVA_PORT_VENDOR=		${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
355
370
Lines 452-457 Link Here
452
	@${ECHO_CMD} "JAVA_BUILD=                     ${JAVA_BUILD}"
467
	@${ECHO_CMD} "JAVA_BUILD=                     ${JAVA_BUILD}"
453
	@${ECHO_CMD} "JAVA_RUN=                       ${JAVA_RUN}"
468
	@${ECHO_CMD} "JAVA_RUN=                       ${JAVA_RUN}"
454
	@${ECHO_CMD} "JAVA_EXTRACT=                   ${JAVA_EXTRACT}"
469
	@${ECHO_CMD} "JAVA_EXTRACT=                   ${JAVA_EXTRACT}"
470
	@${ECHO_CMD} "JAVA_DEFAULT=                   ${JAVA_DEFAULT}"
455
	@${ECHO_CMD}
471
	@${ECHO_CMD}
456
	@${ECHO_CMD} "# JDK port dependency selection process:"
472
	@${ECHO_CMD} "# JDK port dependency selection process:"
457
	@${ECHO_CMD} "_JAVA_PORTS_POSSIBLE=           ${_JAVA_PORTS_POSSIBLE}"
473
	@${ECHO_CMD} "_JAVA_PORTS_POSSIBLE=           ${_JAVA_PORTS_POSSIBLE}"
Lines 459-464 Link Here
459
	@${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}"
475
	@${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}"
460
	@${ECHO_CMD} "_JAVA_PORT=                     ${_JAVA_PORT}"
476
	@${ECHO_CMD} "_JAVA_PORT=                     ${_JAVA_PORT}"
461
	@${ECHO_CMD} "_JAVA_PORT_INFO=                ${_JAVA_PORT_INFO:S/\t/ /}"
477
	@${ECHO_CMD} "_JAVA_PORT_INFO=                ${_JAVA_PORT_INFO:S/\t/ /}"
478
	@${ECHO_CMD} "_JAVA_VERSION_MIN=              ${_JAVA_VERSION_MIN}"
479
	@${ECHO_CMD} "_CAN_USE_NEWER=                 ${_CAN_USE_NEWER}"
462
	@${ECHO_CMD}
480
	@${ECHO_CMD}
463
	@${ECHO_CMD} "# Selected JDK port:"
481
	@${ECHO_CMD} "# Selected JDK port:"
464
	@${ECHO_CMD} "JAVA_PORT=                      ${JAVA_PORT}"
482
	@${ECHO_CMD} "JAVA_PORT=                      ${JAVA_PORT}"

Return to bug 244942