Date: Sat, 10 Aug 2019 19:28:19 +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: r508503 - in head/java/javavmwrapper: . files src Message-ID: <201908101928.x7AJSJLH054199@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glewis Date: Sat Aug 10 19:28:18 2019 New Revision: 508503 URL: https://svnweb.freebsd.org/changeset/ports/508503 Log: Fixes to pkg-install and version handling * In pkg-install, fix the exclusion of the bootstrap directories. [1] * In pkg-install, fix the find expression so it actually finds jdks if there are multiple present. [1] * When determining the VM version, be better about ensuring we end up with only a number. PR: 239705 [1] Submitted by: John Hein <jcfyecrayz@liamekaens.com> [1] Modified: head/java/javavmwrapper/Makefile head/java/javavmwrapper/files/pkg-install.in (contents, props changed) head/java/javavmwrapper/src/javavmwrapper.sh Modified: head/java/javavmwrapper/Makefile ============================================================================== --- head/java/javavmwrapper/Makefile Sat Aug 10 19:25:34 2019 (r508502) +++ head/java/javavmwrapper/Makefile Sat Aug 10 19:28:18 2019 (r508503) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= javavmwrapper -PORTVERSION= 2.7.2 +PORTVERSION= 2.7.3 CATEGORIES= java MASTER_SITES= # none DISTFILES= # none Modified: head/java/javavmwrapper/files/pkg-install.in ============================================================================== --- head/java/javavmwrapper/files/pkg-install.in Sat Aug 10 19:25:34 2019 (r508502) +++ head/java/javavmwrapper/files/pkg-install.in Sat Aug 10 19:28:18 2019 (r508503) @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/java/javavmwrapper/files/pkg-install.in,v 1.3 2006-06-03 17:32:24 glewis Exp $ +# $FreeBSD$ LOCALBASE=%%LOCALBASE%% @@ -10,16 +10,19 @@ if [ "x${2}" != "xPOST-INSTALL" ]; then fi # Ensure all JDKs and JREs are installed -_excl_dirs='bootstrap-openjdk' +jdirs=$(cd "${LOCALBASE}" && find *jdk* *jre* -depth 0 -type d 2> /dev/null) +set -o noglob +_excl_dirs='bootstrap-openjdk.*' _find_expr='-depth 2 -regex .*/bin/java' for dir in ${_excl_dirs}; do _find_expr="${_find_expr} ! -regex ${dir}/bin/java" done -for jvm in `cd "${LOCALBASE}" && find *jdk* *jre* ${_find_expr} 2> /dev/null`; do +for jvm in `cd "${LOCALBASE}" && find $jdirs ${_find_expr} 2> /dev/null`; do if [ -x "${LOCALBASE}/${jvm}" ]; then "${PKG_PREFIX}"/bin/registervm "${LOCALBASE}/${jvm}" > /dev/null 2>&1 fi done +set +o noglob # Ensure all VMs are configured correctly "${PKG_PREFIX}"/bin/checkvms Modified: head/java/javavmwrapper/src/javavmwrapper.sh ============================================================================== --- head/java/javavmwrapper/src/javavmwrapper.sh Sat Aug 10 19:25:34 2019 (r508502) +++ head/java/javavmwrapper/src/javavmwrapper.sh Sat Aug 10 19:28:18 2019 (r508503) @@ -175,12 +175,16 @@ sortConfiguration () { _VM=`basename "${_VM}"` # 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]||' -e 's|-jre||' \ - 2>/dev/null` - _VERSION=`echo ${_VM} | sed -e 's|[^0-9]*||' -e 's|1\.||' \ - -e 's|\.[0-9]||' -e 's|-jre||' \ - 2>/dev/null` + VERSION=`echo ${VM} | sed -e 's|[^0-9]*||' \ + -e 's|1\.\([0-9][0-9]*\)|\1|' \ + -e 's|\([0-9][0-9]*\)\.[0-9]|\1|' \ + -e 's|[^0-9]*\([0-9][0-9]*\)[^0-9]*|\1|' + 2>/dev/null` + _VERSION=`echo ${_VM} | sed -e 's|[^0-9]*||' \ + -e 's|1\.\([0-9][0-9]*\)|\1|' \ + -e 's|\([0-9][0-9]*\)\.[0-9]|\1|' \ + -e 's|[^0-9]*\([0-9][0-9]*\)[^0-9]*|\1|' + 2>/dev/null` if [ "${VERSION}" -gt "${_VERSION}" ]; then _JAVAVMS="${_JAVAVMS}:${JAVAVM}:${_JAVAVM}" JAVAVM=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908101928.x7AJSJLH054199>