summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2008-10-25 18:06:31 +0000
committeradrianp <adrianp@pkgsrc.org>2008-10-25 18:06:31 +0000
commit8daf3dbc45a8da2c236857fdd816d2c73c19943b (patch)
tree904d7a96de0715412307a60cf483eed539f282a2
parent9f99fb4d58f1338dbc627368ac198a5bdd19f633 (diff)
downloadpkgsrc-8daf3dbc45a8da2c236857fdd816d2c73c19943b.tar.gz
Remove the Darwin specific hacks in this so it can detect Java on other
OSes as well (e.g. OpenSolaris).
-rw-r--r--lang/sun-jdk6/builtin.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/lang/sun-jdk6/builtin.mk b/lang/sun-jdk6/builtin.mk
index 4a3175e8a65..b87f7e70d9c 100644
--- a/lang/sun-jdk6/builtin.mk
+++ b/lang/sun-jdk6/builtin.mk
@@ -1,10 +1,11 @@
-# $NetBSD: builtin.mk,v 1.1 2008/10/24 21:40:00 adrianp Exp $
+# $NetBSD: builtin.mk,v 1.2 2008/10/25 18:06:31 adrianp Exp $
BUILTIN_PKG:= sun-jdk6
-BUILTIN_FIND_FILES_VAR:= JDK6
+BUILTIN_FIND_FILES_VAR:= JDK6
BUILTIN_FIND_FILES.JDK6= \
- /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/javac
+ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/javac\
+ /usr/jdk/instances/jdk1.6.0/bin/javac
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -28,8 +29,10 @@ MAKEVARS+= IS_BUILTIN.sun-jdk6
.if !defined(BUILTIN_PKG.sun-jdk6) && \
!empty(IS_BUILTIN.sun-jdk6:M[yY][eE][sS]) && \
empty(JDK6:M__nonexistent__)
-BUILTIN_VERSION.sun-jdk6!= \
- ${BASENAME} /System/Library/Frameworks/JavaVM.framework/Versions/1.6.*
+
+BUILTIN_VERSION.sun-jdk6!= ${JDK6} -version 2>&1 | ${HEAD} -1 | \
+ ${AWK} '{print $$2}'
+
BUILTIN_PKG.sun-jdk6= sun-jdk6-${BUILTIN_VERSION.sun-jdk6}
.endif
MAKEVARS+= BUILTIN_PKG.sun-jdk6