Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2019 18:35:05 +0000 (UTC)
From:      Greg Lewis <glewis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r507366 - in head/java/javavmwrapper: . src
Message-ID:  <201907261835.x6QIZ5eX077894@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glewis
Date: Fri Jul 26 18:35:05 2019
New Revision: 507366
URL: https://svnweb.freebsd.org/changeset/ports/507366

Log:
  Support for newer Java versions
  
  * Switch the internal fallback logic (which is only run when the ports
    system is absent) to use modern Java versioning (e.g. 9 rather than 1.9)
  * Add in support for specifying 10+, 11+ and 12+ as requested versions.
  * Bump version to 2.7
  
  Notes:
  
  * The fallback logic doesn't support the idea of a default version the way
    bsd.java.mk does.  This was already the case.
  * The sorting of VMs in the configuration file doesn't numerically sort
    versions 10 and higher correctly yet.  This will be addressed shortly.
  * Manual pages need updating.
  * The fallback logic is only used if bsd.java.mk is absent.  This should
    be a no-op if it is present.
  
  PR:		223304

Modified:
  head/java/javavmwrapper/Makefile
  head/java/javavmwrapper/src/javavmwrapper.sh

Modified: head/java/javavmwrapper/Makefile
==============================================================================
--- head/java/javavmwrapper/Makefile	Fri Jul 26 18:09:44 2019	(r507365)
+++ head/java/javavmwrapper/Makefile	Fri Jul 26 18:35:05 2019	(r507366)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	javavmwrapper
-PORTVERSION=	2.6
+PORTVERSION=	2.7
 CATEGORIES=	java
 MASTER_SITES=	# none
 DISTFILES=	# none

Modified: head/java/javavmwrapper/src/javavmwrapper.sh
==============================================================================
--- head/java/javavmwrapper/src/javavmwrapper.sh	Fri Jul 26 18:09:44 2019	(r507365)
+++ head/java/javavmwrapper/src/javavmwrapper.sh	Fri Jul 26 18:35:05 2019	(r507366)
@@ -500,24 +500,45 @@ setJavaHome() {
         _JAVAVM_VERSION=
         for version in ${JAVA_VERSION}; do
             case "${version}" in
-                1.6+)
-                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 1.6 1.7 1.8 1.9"
+                *6+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 6 7 8 9 10 11 12"
                     ;;
-                1.7+)
-                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 1.7 1.8 1.9"
+                *7+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 7 8 9 10 11 12"
                     ;;
-                1.8+)
-                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 1.8 1.9"
+                *8+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 8 9 10 11 12"
                     ;;
-                1.9+)
-                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 1.9"
+                *9+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 9 10 11 12"
                     ;;
+                10+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 10 11 12"
+                    ;;
+                11+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 11 12"
+                    ;;
+                12+)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 12"
+                    ;;
+                1.6)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 6"
+                    ;;
+                1.7)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 7"
+                    ;;
+                1.8)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 8"
+                    ;;
+                1.9)
+                    _JAVAVM_VERSION="${_JAVAVM_VERSION} 9"
+                    ;;
                 *)
                     _JAVAVM_VERSION="${_JAVAVM_VERSION} ${version}"
                     ;;
             esac
         done
-        JAVA_VERSION=`echo "${_JAVAVM_VERSION}" | sort | uniq`
+        JAVA_VERSION=`echo "${_JAVAVM_VERSION}" | sort -n | uniq`
     fi
 
     # Finally try to run one of the ${_JAVAVM_VMS}
@@ -528,8 +549,8 @@ setJavaHome() {
         # Respect JAVA_VERSION
         if [ -n "${JAVA_VERSION}" ]; then
             _JAVAVM_VERSION=`echo ${_JAVAVM_VM} | \
-                sed -e 's|^[^0-9]*\([0-9]\)\.\([0-9]\)\.[0-9]$|\1.\2|' \
-                    -e 's|^[^0-9]*\([0-9]\)$|1.\1|'`
+                sed -e 's|^[^0-9]*\([0-9]\)\.\([0-9]\)\.[0-9]$|\2|' \
+                    -e 's|^[^0-9]*\([0-9][0-9]*\)$|\1|'`
             for _JAVAVM_REQUESTED_VERSION in ${JAVA_VERSION}; do
                 if [ "${_JAVAVM_VERSION}" = "${_JAVAVM_REQUESTED_VERSION}" ]; then
                     _JAVAVM_VERSION=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907261835.x6QIZ5eX077894>