From 9d198ffbd2ea2e964251982bbe4d0b8d4e1b70ce Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 3 Sep 2014 12:47:37 +0000 Subject: 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. --- lang/sun-jre7/builtin.mk | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'lang/sun-jre7/builtin.mk') 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 @@ -9,6 +9,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. 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}' -- cgit v1.2.3