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 |
.if "${A_VER:C/^([0-9])(\.)([0-9])(.*)$/\2/}" == "." |
228 |
_JAVA_VERSION_MIN= ${A_VER:C/^([0-9])\.([0-9])(.*)$/\2/} |
229 |
_CAN_USE_NEWER= ${A_VER:C/^([0-9])\.([0-9])(.*)$/\3/} |
230 |
.else |
231 |
_JAVA_VERSION_MIN= ${A_VER:C/^([0-9])(.*)$/\1/} |
232 |
_CAN_USE_NEWER= ${A_VER:C/^([0-9])(.*)$/\2/} |
233 |
.endif |
234 |
.endfor |
226 |
.if !defined(_JAVA_VERSION_LIST_REGEXP) |
235 |
.if !defined(_JAVA_VERSION_LIST_REGEXP) |
227 |
_JAVA_VERSION_LIST_REGEXP= ${_JAVA_VERSION_LIST:C/\+/\\+/:ts|} |
236 |
_JAVA_VERSION_LIST_REGEXP= ${_JAVA_VERSION_LIST:C/\+/\\+/:ts|} |
228 |
.endif |
237 |
.endif |
Lines 230-235
Link Here
|
230 |
check-makevars:: |
239 |
check-makevars:: |
231 |
@( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \ |
240 |
@( 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}) |
241 |
(${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}) |
|
|
242 |
# warn user if JAVA_DEFAULT is less than JAVA_VERSION_MIN and that would be using JAVA_VERSION_MIN instead for the port |
243 |
@( 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}) |
244 |
. if ${JAVA_DEFAULT} < ${_JAVA_VERSION_MIN} |
245 |
JAVA_DEFAULT= ${_JAVA_VERSION_MIN} |
246 |
. endif |
233 |
.endif |
247 |
.endif |
234 |
|
248 |
|
235 |
# Error checking: JAVA_VENDOR |
249 |
# Error checking: JAVA_VENDOR |
Lines 333-339
Link Here
|
333 |
. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} |
347 |
. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} |
334 |
. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) |
348 |
. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) |
335 |
_JAVA_PORT= $i |
349 |
_JAVA_PORT= $i |
|
|
350 |
_JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} |
351 |
JAVA_PORT_VERSION= ${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,} |
352 |
. 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 |
353 |
_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit= 1 |
|
|
354 |
. endif |
337 |
. endif |
355 |
. endif |
338 |
. endfor |
356 |
. endfor |
339 |
# If no installed JDK port fits, then pick one from the list of possible ones |
357 |
# 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} |
359 |
. for i in ${_JAVA_PORTS_POSSIBLE} |
342 |
. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) |
360 |
. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) |
343 |
_JAVA_PORT= $i |
361 |
_JAVA_PORT= $i |
|
|
362 |
_JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} |
363 |
JAVA_PORT_VERSION= ${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,} |
364 |
. 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 |
365 |
_JAVA_PORTS_POSSIBLE_shortcircuit= 1 |
|
|
366 |
. endif |
345 |
. endif |
367 |
. endif |
346 |
. endfor |
368 |
. endfor |
347 |
. endif |
369 |
. endif |
348 |
|
370 |
|
349 |
_JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} |
|
|
350 |
JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,} |
371 |
JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,} |
351 |
JAVA_HOME= ${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,} |
372 |
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=,,} |
373 |
JAVA_PORT_OS= ${_JAVA_PORT_INFO:MOS=*:S,OS=,,} |
354 |
JAVA_PORT_VENDOR= ${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} |
374 |
JAVA_PORT_VENDOR= ${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} |
355 |
|
375 |
|
Lines 452-457
Link Here
|
452 |
@${ECHO_CMD} "JAVA_BUILD= ${JAVA_BUILD}" |
472 |
@${ECHO_CMD} "JAVA_BUILD= ${JAVA_BUILD}" |
453 |
@${ECHO_CMD} "JAVA_RUN= ${JAVA_RUN}" |
473 |
@${ECHO_CMD} "JAVA_RUN= ${JAVA_RUN}" |
454 |
@${ECHO_CMD} "JAVA_EXTRACT= ${JAVA_EXTRACT}" |
474 |
@${ECHO_CMD} "JAVA_EXTRACT= ${JAVA_EXTRACT}" |
|
|
475 |
@${ECHO_CMD} "JAVA_DEFAULT= ${JAVA_DEFAULT}" |
455 |
@${ECHO_CMD} |
476 |
@${ECHO_CMD} |
456 |
@${ECHO_CMD} "# JDK port dependency selection process:" |
477 |
@${ECHO_CMD} "# JDK port dependency selection process:" |
457 |
@${ECHO_CMD} "_JAVA_PORTS_POSSIBLE= ${_JAVA_PORTS_POSSIBLE}" |
478 |
@${ECHO_CMD} "_JAVA_PORTS_POSSIBLE= ${_JAVA_PORTS_POSSIBLE}" |
Lines 459-464
Link Here
|
459 |
@${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}" |
480 |
@${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}" |
460 |
@${ECHO_CMD} "_JAVA_PORT= ${_JAVA_PORT}" |
481 |
@${ECHO_CMD} "_JAVA_PORT= ${_JAVA_PORT}" |
461 |
@${ECHO_CMD} "_JAVA_PORT_INFO= ${_JAVA_PORT_INFO:S/\t/ /}" |
482 |
@${ECHO_CMD} "_JAVA_PORT_INFO= ${_JAVA_PORT_INFO:S/\t/ /}" |
|
|
483 |
@${ECHO_CMD} "_JAVA_VERSION_MIN= ${_JAVA_VERSION_MIN}" |
484 |
@${ECHO_CMD} "_CAN_USE_NEWER= ${_CAN_USE_NEWER}" |
462 |
@${ECHO_CMD} |
485 |
@${ECHO_CMD} |
463 |
@${ECHO_CMD} "# Selected JDK port:" |
486 |
@${ECHO_CMD} "# Selected JDK port:" |
464 |
@${ECHO_CMD} "JAVA_PORT= ${JAVA_PORT}" |
487 |
@${ECHO_CMD} "JAVA_PORT= ${JAVA_PORT}" |