diff options
author | adrianp <adrianp@pkgsrc.org> | 2008-10-24 23:19:04 +0000 |
---|---|---|
committer | adrianp <adrianp@pkgsrc.org> | 2008-10-24 23:19:04 +0000 |
commit | 7da815454b078988b3b8652f04a2668bf1b2ec93 (patch) | |
tree | 3317986dd59c1af53127aa259353f721f1721066 /lang | |
parent | e9d4fce22835309c835673ed7670057ceee74a16 (diff) | |
download | pkgsrc-7da815454b078988b3b8652f04a2668bf1b2ec93.tar.gz |
Remove the Darwin specific hacks in this so it can detect Java on other
OSes as well (e.g. OpenSolaris).
Diffstat (limited to 'lang')
-rw-r--r-- | lang/sun-jre6/builtin.mk | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lang/sun-jre6/builtin.mk b/lang/sun-jre6/builtin.mk index 04cdec52888..4c20ea95ede 100644 --- a/lang/sun-jre6/builtin.mk +++ b/lang/sun-jre6/builtin.mk @@ -1,10 +1,11 @@ -# $NetBSD: builtin.mk,v 1.1 2008/10/24 21:35:14 adrianp Exp $ +# $NetBSD: builtin.mk,v 1.2 2008/10/24 23:19:04 adrianp Exp $ BUILTIN_PKG:= sun-jre6 -BUILTIN_FIND_FILES_VAR:= JAVAVM6 +BUILTIN_FIND_FILES_VAR:= JAVAVM6 BUILTIN_FIND_FILES.JAVAVM6= \ - /System/Library/Frameworks/JavaVM.framework/Versions/1.6 + /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home \ + /usr/jdk/instances/jdk1.6.0 .include "../../mk/buildlink3/bsd.builtin.mk" @@ -28,8 +29,10 @@ MAKEVARS+= IS_BUILTIN.sun-jre6 .if !defined(BUILTIN_PKG.sun-jre6) && \ !empty(IS_BUILTIN.sun-jre6:M[yY][eE][sS]) && \ empty(JAVAVM6:M__nonexistent__) -BUILTIN_VERSION.sun-jre6!= \ - ${BASENAME} /System/Library/Frameworks/JavaVM.framework/Versions/1.6.* + +BUILTIN_VERSION.sun-jre6!= ${JAVAVM6}/bin/java -version 2>&1 | ${HEAD} -1 | \ + ${AWK} -F \" '{print $$2}' | ${AWK} -F _ '{print $$1}' + BUILTIN_PKG.sun-jre6= sun-jre6-${BUILTIN_VERSION.sun-jre6} .endif MAKEVARS+= BUILTIN_PKG.sun-jre6 @@ -68,7 +71,6 @@ MAKEVARS+= USE_BUILTIN.sun-jre6 CHECK_BUILTIN.sun-jre6?= no .if !empty(CHECK_BUILTIN.sun-jre6:M[nN][oO]) . if !empty(USE_BUILTIN.sun-jre6:M[yY][eE][sS]) -PKG_JAVA_HOME= \ - /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home +PKG_JAVA_HOME= ${JAVAVM6} . endif .endif |