JAVA_VERSION???

Steve Kargl sgk at troutmask.apl.washington.edu
Fri Jun 16 14:43:19 UTC 2017


On Fri, Jun 16, 2017 at 02:17:03PM +0200, Mathieu Arnold wrote:
> Le 16/06/2017 à 01:45, Steve Kargl a écrit :
> > Is this the expected behavior?
> >
> > % cd ports/math/octave
> > % make fetch
> > octave-4.0.3_5: Makefile error: "1.7+" is not a valid value for JAVA_VERSION. It should be one or more of: 1.6 1.7 1.8 (with an optional "+" suffix.)
> > % grep JAVA_VERSION Makefile
> > JAVA_VERSION=   1.7+
> 
> 
> Not really. What OSVERSION are you running?
> 
> What is the content of the _JAVA_VERSION_LIST and
> _JAVA_VERSION_LIST_REGEXP variables ?
> 

I'm running a month old freebsd-current.

% uname -a
FreeBSD troutmask.apl.washington.edu 12.0-CURRENT FreeBSD 12.0-CURRENT
#0 r318546: Fri May 19 12:51:04 PDT 2017

% cd /usr/ports/math/octave
% make -d v fetch |& grep JAVA_VERSION
# JAVA_VERSION		List of space-separated suitable java versions for the
# JAVA_PORT_VERSION	The version of the JDK port. (e.g. '1.6')
# To retrieve the Major version number from JAVA_PORT_VERSION (e.g. "1.6"):
#		-> ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}
.		if defined(JAVA_VERSION)
SUB_LIST+=		JAVA_VERSION="${JAVA_VERSION}"
__JAVA_VERSION_LIST=	1.6 1.7 1.8
_JAVA_VERSION_LIST=		${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
# 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
# Error checking: JAVA_VERSION
.if !defined(_JAVA_VERSION_LIST_REGEXP)
.	for v in ${_JAVA_VERSION_LIST}
.		if defined(_JAVA_VERSION_LIST_REGEXP)
_JAVA_VERSION_LIST_REGEXP:=		${_JAVA_VERSION_LIST_REGEXP}\|
_JAVA_VERSION_LIST_REGEXP:=		${_JAVA_VERSION_LIST_REGEXP}$v
	@test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_VERSION_LIST_REGEXP}" || \
	(${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})) || true
.		if defined(JAVA_VERSION)
_JAVA_VERSION=	${JAVA_VERSION:S/1.6+/1.6 1.7+/:S/1.7+/1.7 1.8+/:S/1.8+/1.8/}
_JAVA_VERSION=	${__JAVA_VERSION_LIST}
A_JAVA_PORT_VERSION=		${A_JAVA_PORT_INFO:MVERSION=*:C/VERSION=([0-9])\.([0-9])(.*)/\1.\2/}
.for ver in ${A_JAVA_PORT_VERSION}
.if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}}
JAVA_PORT_VERSION=		${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
	@${ECHO_CMD} "JAVA_VERSION=                   ${JAVA_VERSION}	(${_JAVA_VERSION})"
	@${ECHO_CMD} "JAVA_PORT_VERSION=              ${JAVA_PORT_VERSION}"
Global:JAVA_VERSION = 1.7+
Global:SUB_LIST =  JAVASHAREDIR="${JAVASHAREDIR}"  JAVAJARDIR="${JAVAJARDIR}"  JAVALIBDIR="${JAVALIBDIR}" JAVA_VERSION="${JAVA_VERSION}"
Global:__JAVA_VERSION_LIST = 1.6 1.7 1.8
Global:_JAVA_VERSION_LIST = ${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
Applying[__JAVA_VERSION_LIST] :S to "1.6 1.7 1.8"
Result[__JAVA_VERSION_LIST] of :S is "1.6+ 1.7+ 1.8+"
Global:_JAVA_VERSION_LIST_REGEXP = 
Global:_JAVA_VERSION_LIST_REGEXP = 1.6
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|1.6+
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|1.6+\|
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|1.6+\|1.7+
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|1.6+\|1.7+\|
Global:_JAVA_VERSION_LIST_REGEXP = 1.6\|1.7\|1.8\|1.6+\|1.7+\|1.8+
Global:_JAVA_VERSION = ${JAVA_VERSION:S/1.6+/1.6 1.7+/:S/1.7+/1.7 1.8+/:S/1.8+/1.8/}
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7+"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7 1.8+"
Applying[JAVA_VERSION] :S to "1.7 1.8+"
Result[JAVA_VERSION] of :S is "1.7 1.8"
Applying[_JAVA_VERSION] :M to "1.7 1.8"
Pattern[_JAVA_VERSION] for [1.7 1.8] is [1.8]
Result[_JAVA_VERSION] of :M is "1.8"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7+"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7 1.8+"
Applying[JAVA_VERSION] :S to "1.7 1.8+"
Result[JAVA_VERSION] of :S is "1.7 1.8"
Applying[_JAVA_VERSION] :M to "1.7 1.8"
Pattern[_JAVA_VERSION] for [1.7 1.8] is [1.7]
Result[_JAVA_VERSION] of :M is "1.7"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7+"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7 1.8+"
Applying[JAVA_VERSION] :S to "1.7 1.8+"
Result[JAVA_VERSION] of :S is "1.7 1.8"
Applying[_JAVA_VERSION] :M to "1.7 1.8"
Pattern[_JAVA_VERSION] for [1.7 1.8] is [1.6]
Result[_JAVA_VERSION] of :M is ""
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7+"
Applying[JAVA_VERSION] :S to "1.7+"
Result[JAVA_VERSION] of :S is "1.7 1.8+"
Applying[JAVA_VERSION] :S to "1.7 1.8+"
Result[JAVA_VERSION] of :S is "1.7 1.8"
Applying[_JAVA_VERSION] :M to "1.7 1.8"
Pattern[_JAVA_VERSION] for [1.7 1.8] is [1.8]
Result[_JAVA_VERSION] of :M is "1.8"
Global:SUB_LIST =  JAVASHAREDIR="${JAVASHAREDIR}"  JAVAJARDIR="${JAVAJARDIR}"  JAVALIBDIR="${JAVALIBDIR}" JAVA_VERSION="${JAVA_VERSION}" PREFIX=${PREFIX} LOCALBASE=${LOCALBASE}  DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR}  WWWDIR=${WWWDIR} ETCDIR=${ETCDIR}
octave-4.2.1: Makefile error: "1.7+" is not a valid value for JAVA_VERSION. It should be one or more of: 1.6 1.7 1.8 (with an optional "+" suffix.)

-- 
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow


More information about the freebsd-ports mailing list