tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bootstrap.mk issues for openjdk7



I'm quite perplexed about the following, running on solaris.

In particular, as you can see I've ensured that the java version string is correctly generated, both sun-jre7 and sun-jdk7 are added to PREFER_NATIVE=, even added the oracle-binary-code-license to ACCEPTABLE_LICENSES+= and are all verified with show-var.

But for some reason when bootstrap.mk is executed it sees other than USE_BUILTIN.sun-jdk7=yes, even though show-var sees it fine.

richard@devzone:~/src/pkgsrc/lang/openjdk7$ git diff .  ../sun-jdk7/  
../sun-jre7/
diff --git a/lang/openjdk7/bootstrap.mk b/lang/openjdk7/bootstrap.mk
index dcfcb7f..959d626 100644
--- a/lang/openjdk7/bootstrap.mk
+++ b/lang/openjdk7/bootstrap.mk
@@ -85,9 +85,13 @@ DISTFILES+=          ${BOOT.common-20110811}
 EXTRACT_ONLY+=         ${BOOT.common-20110811}
 .endif

-.if ${OPSYS} == "SunOS"
-BUILD_DEPENDS+=                sun-jdk7-[0-9]*:../../lang/sun-jdk7
-JDK_BOOTDIR=           ${PREFIX}/java/sun-7
+.if !empty(MACHINE_PLATFORM:MSunOS*)
+.include "../../lang/sun-jdk7/buildlink3.mk"
+.      if !empty(USE_BUILTIN.sun-jdk7:M[yY][eE][sS])
+JDK_BOOTDIR=   ${JDK7:S/\/bin\/javac//}
+.      else
+JDK_BOOTDIR=   ${PREFIX}/java/sun-7
+.      endif
 MAKE_ENV+=             ALT_JDK_IMPORT_PATH=${JDK_BOOTDIR}
 .endif

diff --git a/lang/sun-jdk7/builtin.mk b/lang/sun-jdk7/builtin.mk
index 99a75af..9549b14 100644
--- a/lang/sun-jdk7/builtin.mk
+++ b/lang/sun-jdk7/builtin.mk
@@ -31,7 +31,7 @@ MAKEVARS+=    IS_BUILTIN.sun-jdk7
     empty(JDK7:M__nonexistent__)

 BUILTIN_VERSION.sun-jdk7!= ${JDK7} -version 2>&1 | ${HEAD} -1 | \
-       ${AWK} '{print $$2}'
+       ${AWK} '{print $$2}' | ${AWK} '{sub(/^1\./,"");sub(/_/,".");print $$1}'

 BUILTIN_PKG.sun-jdk7=  sun-jdk7-${BUILTIN_VERSION.sun-jdk7}
 .endif
diff --git a/lang/sun-jre7/builtin.mk b/lang/sun-jre7/builtin.mk
index 94b449f..77af3df 100644
--- a/lang/sun-jre7/builtin.mk
+++ b/lang/sun-jre7/builtin.mk
@@ -31,7 +31,7 @@ MAKEVARS+=    IS_BUILTIN.sun-jre7
     empty(JAVAVM7:M__nonexistent__)

 BUILTIN_VERSION.sun-jre7!= ${JAVAVM7}/bin/java -version 2>&1 | ${HEAD} -1 | \
-       ${AWK} -F \" '{print $$2}' | ${AWK} -F _ '{print $$1}'
+       ${AWK} -F \" '{print $$2}' | ${AWK} '{sub(/^1\./,"");sub(/_/,".");print 
$$1}'

 BUILTIN_PKG.sun-jre7=  sun-jre7-${BUILTIN_VERSION.sun-jre7}
 .endif
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=USE_BUILTIN.sun-jdk7
yes
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=USE_BUILTIN.sun-jre7
yes
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=BUILTIN_VERSION.sun-jdk7
7.0.40
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=BUILTIN_VERSION.sun-jre7
7.0.40
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=BUILTIN_PKG.sun-jdk7
sun-jdk7-7.0.40
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var 
VARNAME=BUILTIN_PKG.sun-jre7
sun-jre7-7.0.40
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var VARNAME=JDK7
/usr/jdk/instances/jdk1.7.0/bin/javac
richard@devzone:~/src/pkgsrc/lang/openjdk7$ bmake show-var VARNAME=JDK_BOOTDIR
/opt/local/java/sun-7

To not get bitten like with mit-krb5, I checked the buildlink3.mk respectively (which prescribe):
BUILDLINK_ABI_DEPENDS.sun-jdk7+=        sun-jdk7>=7.0.9
BUILDLINK_ABI_DEPENDS.sun-jre7+=        sun-jre7>=7.0.9

So with the version fixes above, these seem fine.

I'd really like to avoid re-installing sun-jdk7 in pkgsrc, only to build openjdk! I guess an inplace mechanism would work, but this should definitely work. Scratching my head on this one...

Any ideas, is there an execution order problem perhaps involving bootstrap.mk? That is perhaps the statement is being evaluated prior to the setting of BUILTIN_PKG.sun-jdk7?

Thanks in advance for any hints/advice...



Home | Main Index | Thread Index | Old Index