diff options
author | glewis <glewis@FreeBSD.org> | 2004-11-13 00:12:48 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2004-11-13 00:12:48 +0800 |
commit | 96bff4cb81a790e5513a0b3d14d686e172f7b29d (patch) | |
tree | dde1b459ef28819bb70221eef74a4cb68a86e22c /java/javavmwrapper | |
parent | 38007be3e9990667959a80ccac72cf66bcfadd2d (diff) | |
download | freebsd-ports-graphics-96bff4cb81a790e5513a0b3d14d686e172f7b29d.tar.gz freebsd-ports-graphics-96bff4cb81a790e5513a0b3d14d686e172f7b29d.tar.zst freebsd-ports-graphics-96bff4cb81a790e5513a0b3d14d686e172f7b29d.zip |
. javavmwrapper uses PATH to make sure it gets the system version of
utilities. Unfortunately this overrides any PATH that may have been
set by the user and hence affects the ability of java to execute
external programmes. So, save the PATH before setting it and then
restore it immediately before executing java.
. Bump PORTREVISION for this fix.
Reported by: Christian Laursen <xi@borderworlds.dk>
Diffstat (limited to 'java/javavmwrapper')
-rw-r--r-- | java/javavmwrapper/Makefile | 1 | ||||
-rw-r--r-- | java/javavmwrapper/src/javavmwrapper.sh | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/java/javavmwrapper/Makefile b/java/javavmwrapper/Makefile index 6f69805e8ca..64a455aacf9 100644 --- a/java/javavmwrapper/Makefile +++ b/java/javavmwrapper/Makefile @@ -9,6 +9,7 @@ PORTNAME= javavmwrapper PORTVERSION= 2.0 +PORTREVISION= 1 CATEGORIES= java MASTER_SITES= # none DISTFILES= # none diff --git a/java/javavmwrapper/src/javavmwrapper.sh b/java/javavmwrapper/src/javavmwrapper.sh index b6447448911..b3685bd7e17 100644 --- a/java/javavmwrapper/src/javavmwrapper.sh +++ b/java/javavmwrapper/src/javavmwrapper.sh @@ -29,6 +29,7 @@ # # MAINTAINER=java@FreeBSD.org +SAVE_PATH=${PATH} export PATH=/bin:/sbin:/usr/bin:/usr/sbin PREFIX="%%PREFIX%%" @@ -42,6 +43,9 @@ MAKE=/usr/bin/make tryJavaCommand () { # Check for the command being executable and exec it if so. if [ -x "${1}" ]; then + if [ ! -z "${SAVE_PATH}" ]; then + export PATH=${SAVE_PATH} + fi exec "${@}" fi |