diff options
author | tron <tron> | 2014-09-03 12:47:37 +0000 |
---|---|---|
committer | tron <tron> | 2014-09-03 12:47:37 +0000 |
commit | 9d198ffbd2ea2e964251982bbe4d0b8d4e1b70ce (patch) | |
tree | 52ce0249c26e897bcabe6afe33cdfda86a8fc286 /lang/sun-jre7 | |
parent | 63dc9e3a3afcc6e8ff438f04deddd1709fdd33f4 (diff) | |
download | pkgsrc-9d198ffbd2ea2e964251982bbe4d0b8d4e1b70ce.tar.gz |
Add support for Oracle Java 7 (manually installed via Mac OS X builtin
mechanism) under Mac OS X Mavericks.
Patches contributed by J. Lewis Muir via "pkgsrc-users" mailing list.
Diffstat (limited to 'lang/sun-jre7')
-rw-r--r-- | lang/sun-jre7/builtin.mk | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lang/sun-jre7/builtin.mk b/lang/sun-jre7/builtin.mk index 394914bedad..82fd44d7460 100644 --- a/lang/sun-jre7/builtin.mk +++ b/lang/sun-jre7/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.2 2013/10/16 16:47:29 richard Exp $ +# $NetBSD: builtin.mk,v 1.3 2014/09/03 12:47:37 tron Exp $ BUILTIN_PKG:= sun-jre7 @@ -10,6 +10,24 @@ BUILTIN_FIND_FILES.JAVAVM7= \ .include "../../mk/buildlink3/bsd.builtin.mk" ### +### On Darwin, if a suitable JRE has not already been found, try to find +### it in the standard JRE location. Normally, we would just add the +### standard JRE location path to BUILTIN_FIND_FILES.JAVAVM7 above, but +### unfortunately, the path contains a space, and the BUILTIN_FIND_FILES +### "subroutine" can't handle paths containing whitespace (because it +### iterates over the paths in a for-loop). So, we perform the check by +### hand. +### +.if ${OPSYS} == "Darwin" && \ + !empty(JAVAVM7:M__nonexistent__) +_JRE_HOME= \ + /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home +. if exists(${_JRE_HOME}) +JAVAVM7= ${_JRE_HOME} +. endif +.endif + +### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). ### @@ -30,7 +48,7 @@ MAKEVARS+= IS_BUILTIN.sun-jre7 !empty(IS_BUILTIN.sun-jre7:M[yY][eE][sS]) && \ empty(JAVAVM7:M__nonexistent__) -BUILTIN_VERSION.sun-jre7!= ${JAVAVM7}/bin/java -version 2>&1 | \ +BUILTIN_VERSION.sun-jre7!= ${JAVAVM7:Q}/bin/java -version 2>&1 | \ ${AWK} -F \" '{print $$2; exit}' | \ ${AWK} '{sub(/^1\./,"");sub(/_/,".");print $$1}' |