aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2019-07-26 21:47:09 +0000
committerGreg Lewis <glewis@FreeBSD.org>2019-07-26 21:47:09 +0000
commit587ee3db5229d8193407499570a7e8a792e0856b (patch)
tree3a34444f6ec7ebb834871cd73f7036152d7d2942 /java
parentc2f56bce41e6962e99f43009016aa8e458bd1b2c (diff)
downloadports-587ee3db5229d8193407499570a7e8a792e0856b.tar.gz
ports-587ee3db5229d8193407499570a7e8a792e0856b.zip
Sort VMs by version numerically
* VMs were sorted by VM version by lexicographically sorting the version as a string. Switch to numeric sorting now that there are versions like 10, 11, and 12 so that the intended sort order (most recent first) is preserved. * Bump minor version.
Notes
Notes: svn path=/head/; revision=507376
Diffstat (limited to 'java')
-rw-r--r--java/javavmwrapper/Makefile2
-rw-r--r--java/javavmwrapper/src/javavmwrapper.sh10
2 files changed, 7 insertions, 5 deletions
diff --git a/java/javavmwrapper/Makefile b/java/javavmwrapper/Makefile
index 69f34c8589b9..585455da3501 100644
--- a/java/javavmwrapper/Makefile
+++ b/java/javavmwrapper/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= javavmwrapper
-PORTVERSION= 2.7.1
+PORTVERSION= 2.7.2
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none
diff --git a/java/javavmwrapper/src/javavmwrapper.sh b/java/javavmwrapper/src/javavmwrapper.sh
index 140d9b5976ac..e0277eb41e4a 100644
--- a/java/javavmwrapper/src/javavmwrapper.sh
+++ b/java/javavmwrapper/src/javavmwrapper.sh
@@ -176,14 +176,16 @@ sortConfiguration () {
# Consistent version numbering for various install directory names
# including 'openjdk6', 'jdk1.6.0', 'linux-sun-jdk1.6.0', etc.
VERSION=`echo ${VM} | sed -e 's|[^0-9]*||' -e 's|1\.||' \
- -e 's|\.[0-9]||' 2>/dev/null`
+ -e 's|\.[0-9]||' -e 's|-jre||' \
+ 2>/dev/null`
_VERSION=`echo ${_VM} | sed -e 's|[^0-9]*||' -e 's|1\.||' \
- -e 's|\.[0-9]||' 2>/dev/null`
- if [ "${VERSION}" \> "${_VERSION}" ]; then
+ -e 's|\.[0-9]||' -e 's|-jre||' \
+ 2>/dev/null`
+ if [ "${VERSION}" -gt "${_VERSION}" ]; then
_JAVAVMS="${_JAVAVMS}:${JAVAVM}:${_JAVAVM}"
JAVAVM=
continue
- elif [ "${VERSION}" \< "${_VERSION}" ]; then
+ elif [ "${VERSION}" -lt "${_VERSION}" ]; then
_JAVAVMS="${_JAVAVMS}:${_JAVAVM}"
continue
else