java/65335: [PATCH] java/jdk14: use bsd.java.mk for JDK bootstrap

java/65335: [PATCH] java/jdk14: use bsd.java.mk for JDK bootstrap

Post by herve.quir » Sat, 10 Apr 2004 04:40:10


System: FreeBSD arabica.esil.univ-mrs.fr 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Fri Feb 27 11:36:17 CET 2004

This was one of my plans with bsd.java.mk 2.0 so here it is. This patch moves
all the JDK bootstrap picking logic from the port to bsd.java.mk. I had to
modify bsd.java.mk itself so there's also a patch for it.

It's just a "draft" for now (things haven't been removed but just commented
out).

I realize that maybe I should have patched java/jdk13 instead as Greg is the
maintainer and is more aware of the internals of bsd.java.mk but I noticed this
port (java/jdk14) would not bootstrap with a native JDK if a linux one was
installed. So Greg, if you wish to work on your maintained JDK port instead,
please tell me and I will provide a patch as well.

As I said above, this is still "work-in-progress" as more testing needs to be
done. Especially building with IBM JDKs... There was a discussion a long ago on
XXXX@XXXXX.COM regarding building this IBM bootstrapping but I can't
find it in the archives. Anyway, IIRC it was regarding JDK 1.3

The main problem encountered was cyclic dependency issues but this has been
fixed.

If someone feels like having time to spare (and CPU to burn), please help
yourself and try the patch ;) I will do tests on my own anyway but this will
take time obviously.

java/jdk14 Port maintainer ( XXXX@XXXXX.COM ) is cc'd.
java/jdk13 Port maintainer ( XXXX@XXXXX.COM ) is cc'd.
bsd.java.mk maintainer ( XXXX@XXXXX.COM ) is cc'd.

Generated with FreeBSD Port Tools 0.50


$ cd /usr/portsjava/linux-sun-jdk14
$ make install

[...]

$ cd /usr/ports/java/jdk14
$ make install

[...]

$ cd /usr/ports/java/jdk14
$ make build-depends-list
/usr/ports/archivers/unzip
/usr/ports/archivers/zip
/usr/ports/devel/gmake
/usr/ports/devel/m4
/usr/ports/devel/nspr
/usr/ports/java/linux-sun-jdk14
/usr/ports/x11-toolkits/open-motif

IMHO, 'java/linux-sun-jdk14' should not be used as 'java/jdk14' is already
there for bootstrapping.


--- jdk-1.4.2p6_4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/java/jdk14.original/Makefile /usr/ports/java/jdk14/Makefile
--- /usr/ports/java/jdk14.original/Makefile Thu Apr 8 20:19:11 2004
+++ /usr/ports/java/jdk14/Makefile Thu Apr 8 20:50:39 2004
@@ -29,54 +29,62 @@
RUN_DEPENDS+= ${X11BASE}/lib/X11/fonts/URW/fonts.dir:${PORTSDIR}/x11-fonts/urwfonts
.endif

+USE_JAVA= yes
+JAVA_VERSION= 1.4
+JAVA_BUILD= jdk
+
WRKSRC= ${WRKDIR}/control/make

JDK_VERSION= 1.4.2
JDK_PATCHSET_VERSION= 6
LATEST_LINK= jdk14

-SUN_LINUX_JDK_VERSION= 1.4.2
-
-.if !defined(WITH_LINUX_BOOTSTRAP)
-NATIVE_BOOTSTRAP_JDKS= ${LOCALBASE}/jdk1.4.2 \
- ${LOCALBASE}/jdk1.4.1
-.endif
-
-LINUX_BOOTSTRAP_JDKS= ${LOCALBASE}/linux-sun-jdk1.4.2_03 \
- ${LOCALBASE}/linux-sun-jdk1.4.2_02 \
- ${LOCALBASE}/linux-sun-jdk1.4.2_01 \
- ${LOCALBASE}/linux-sun-jdk1.4.2 \
- ${LOCALBASE}/linux-sun-jdk1.4.1_02 \
- ${LOCALBASE}/linux-sun-jdk1.4.1_01 \
- ${LOCALBASE}/linux-sun-jdk1.4.1
+#SUN_LINUX_JDK_VERSION= 1.4.2
+#
+#.if !defined(WITH_LINUX_BOOTSTRAP)
+#NATIVE_BOOTSTRAP_JDKS= ${LOCALBASE}/jdk1.4.2 \
+# ${LOCALBASE}/jdk1.4.1
+#.endif
+#
+#LINUX_BOOTSTRAP_JDKS= ${LOCALBASE}/linux-sun-jdk1.4.2_03 \
+# ${LOCALBASE}/linux-sun-jdk1.4.2_02 \
+# ${LOCALBASE}/linux-sun-jdk1.4.2_01 \
+# ${LOCALBASE}/linux-sun-jdk1.4.2 \
+# ${LOCALBASE}/linux-sun-jdk1.4.1_02 \
+# ${LOCALBASE}/linux-sun-jdk1.4.1_01 \
+# ${LO