From owner-freebsd-ports@freebsd.org  Fri Jun 16 14:43:19 2017
Return-Path: <owner-freebsd-ports@freebsd.org>
Delivered-To: freebsd-ports@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCECCC0AA3A
 for <freebsd-ports@mailman.ysv.freebsd.org>;
 Fri, 16 Jun 2017 14:43:19 +0000 (UTC)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu
 [128.95.76.21])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "troutmask", Issuer "troutmask" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id B60D7828BD;
 Fri, 16 Jun 2017 14:43:19 +0000 (UTC)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: from troutmask.apl.washington.edu (localhost [127.0.0.1])
 by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id v5GEhIk1011305
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Fri, 16 Jun 2017 07:43:18 -0700 (PDT)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: (from sgk@localhost)
 by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id v5GEhIg2011304;
 Fri, 16 Jun 2017 07:43:18 -0700 (PDT) (envelope-from sgk)
Date: Fri, 16 Jun 2017 07:43:18 -0700
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Mathieu Arnold <mat@FreeBSD.org>
Cc: freebsd-ports@freebsd.org
Subject: Re: JAVA_VERSION???
Message-ID: <20170616144318.GA11287@troutmask.apl.washington.edu>
Reply-To: sgk@troutmask.apl.washington.edu
References: <20170615234533.GA2871@troutmask.apl.washington.edu>
 <582b49d8-5910-35b5-40ed-307475830a64@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <582b49d8-5910-35b5-40ed-307475830a64@FreeBSD.org>
User-Agent: Mutt/1.7.2 (2016-11-26)
X-BeenThere: freebsd-ports@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports/>
List-Post: <mailto:freebsd-ports@freebsd.org>
List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jun 2017 14:43:19 -0000

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