Subject: Fw: sun-jre141 sun-jdk141 firefox-java mozilla-java and
To: None <>
From: Robert Lillack <>
List: tech-pkg
Date: 05/24/2004 16:44:09
I just "found" that mail on the bugs list but it was sent there
directly and I think *this* is a better place for discussion.
Sadly the originator did use a real email address.

Cheers, Rob.

Date: 24 May 2004 05:45:06 -0000
From: "BSD For Ever" <bsd4ever@nospam.lan>
To: <>
Subject: sun-jre141 sun-jdk141 firefox-java mozilla-java and libjavaglue141

i386-current users, here are some packages that will allow you to enable
Sun's Java Virtual Machine plugin (the binary plugin for Linux) on NetBSD
*native* mozilla-based apps (mozilla, firefox). I read once in Sun's web
pages that users having problems with 1.4.2 could try the latest 1.4.1.x.
And then I was lucky enough to write a hack to make it work with native

All you need is devel/libjavaglue141, lang/sun-jre141 and www/firefox-java
and/or www/mozilla-java and/or mail/thunderbird-java as well as the usual
Linux compat settings.

lang/sun-jdk141 is provided for those willing to build their own applets.

All these packages are working well on my NetBSD-1.6U kernel and I am able
to run Java applets with both firefox and mozilla. I did all sorts of tests
to make sure the packaging was OK (building packages, deleting them,
re-installing them from binary, computing check-sums after each kind of
install...). Well, I can say the packaging rocks.
However, I have only tested all this  on i386-1.6U.

BTW, here is what "ldd" yelds once libjavaglue141 and
sun-jre141 are installed (thanks to /etc/ :
ldd /usr/pkg/java/sun-1.4.1/plugin/i386/ns610/   
	-lX11.6 => /usr/X11R6/lib/
	-lICE.6 => /usr/X11R6/lib/
	-lSM.6 => /usr/X11R6/lib/
	-lXt.6 => /usr/X11R6/lib/
	-ldl.2 => /usr/lib/
	-lm.6 => /usr/lib/
	-lm.6 => /usr/lib/
	-lc.6 => /usr/pkg/lib/

If you want to download all these packages in a single tarball:
cd /tmp
cd /usr
cd pkgsrc
tar xzf /tmp/all.tgz

Alternatively, you can download each one separately :
cd /tmp
cd /usr
cd pkgsrc/devel
tar xzf /tmp/libjavaglue141.tgz
cd ../lang
tar xzf /tmp/sun-jre141.tgz
tar xzf /tmp/sun-jdk141.tgz
cd ../www
tar xzf /tmp/firefox-java.tgz
tar xzf /tmp/mozilla-java.tgz
cd ../mail
tar xzf /tmp/thunderbird-java.tgz

Although thunderbird's Open JVM Integration support is disabled by
default, I have packaged thunderbird-java in case someone wants to
try it. Replacing "--disable-oji" by "--enable-oji" in
just after issuing a "make extract" and before the "make" is not
enough. I did build it successfully but there is no way to enable
Java in the prefs. Anyway, having OJI support in a mailer is not
that interesting so maybe we can forget about thunderbird-java.

FYI, the "big" tarball is 16188 bytes long, and its contents are :
tar tzvf /tmp/all.tgz | sed 's/.\{20\}\(.\{10\}\).\{18\}/\1/'
       388 devel/libjavaglue141/DESCR
       423 devel/libjavaglue141/MESSAGE.NetBSD
       717 devel/libjavaglue141/Makefile
        70 devel/libjavaglue141/PLIST
       177 devel/libjavaglue141/files/Makefile
       227 devel/libjavaglue141/files/javaglue141.c
       989 devel/libjavaglue141/files/
        75 lang/sun-jre141/DESCR
       562 lang/sun-jre141/MESSAGE.NetBSD
      1423 lang/sun-jre141/Makefile
      2168 lang/sun-jre141/Makefile.common
     24738 lang/sun-jre141/PLIST
       786 lang/sun-jre141/
       703 lang/sun-jre141/
       142 lang/sun-jre141/distinfo
        75 lang/sun-jdk141/DESCR
       559 lang/sun-jdk141/MESSAGE.NetBSD
       677 lang/sun-jdk141/Makefile
     61752 lang/sun-jdk141/PLIST
       807 lang/sun-jdk141/
       724 lang/sun-jdk141/
       144 lang/sun-jdk141/distinfo
       612 lang/sun-jdk141/files/common
        92 www/firefox-java/DESCR
       895 www/firefox-java/Makefile
       176 www/firefox-java/PLIST
        88 www/mozilla-java/DESCR
       895 www/mozilla-java/Makefile
       176 www/mozilla-java/PLIST
        96 mail/thunderbird-java/DESCR
       917 mail/thunderbird-java/Makefile
       184 mail/thunderbird-java/PLIST

Sorry for my not using send-pr to submit all these new packages.
I hope this won't need too much rewriting in case it is accepted in
pkgsrc. I have carefully packaged sun-jre141, sun-jdk141, firefox-java,
mozilla-java and thunderbird-java but the makefiles in libjavaglue141
are not very pretty although they work perfectly.
BTW, both sun-jre141 and sun-jdk141 reflect the recent changes made to
the existing sun-jre14 and sun-jdk14 packages.

Last remark: It is not necessary to update pkgsrc/mk/ to
build, install and use sun-jre141 and sun-jdk141, but I'm inserting a
"diff -b -u" in case someone is interested.

--- pkgsrc/mk/	Sat May  8 21:10:02 2004
+++ pkgsrc/mk/	Mon May 24 05:43:49 2004
@@ -195,6 +195,8 @@
 BUILDLINK_DEPENDS.sun-jre13?=		sun-jre13-[0-9]*
 BUILDLINK_DEPENDS.sun-jdk14?=		sun-jdk14-[0-9]*
 BUILDLINK_DEPENDS.sun-jre14?=		sun-jre14-[0-9]*
+BUILDLINK_DEPENDS.sun-jdk141?=		sun-jdk141-[0-9]*
+BUILDLINK_DEPENDS.sun-jre141?=		sun-jre141-[0-9]*
 BUILDLINK_DEPENDS.blackdown-jdk13?=	blackdown-jdk13-[0-9]*
 BUILDLINK_DEPENDS.blackdown-jre13?=	blackdown-jre13-[0-9]*
 BUILDLINK_DEPENDS.kaffe?=		kaffe>=1.1.4
@@ -205,6 +207,7 @@
 _JRE.jdk13=		jdk13
 _JRE.sun-jdk13=		sun-jre13
 _JRE.sun-jdk14=		sun-jre14
+_JRE.sun-jdk141=	sun-jre141
 _JRE.blackdown-jdk13=	blackdown-jre13
 _JRE.kaffe=		kaffe
 _JRE.wonka=		wonka
@@ -231,6 +234,11 @@
 _JDK_PKGSRCDIR=		../../lang/sun-jdk14
 _JRE_PKGSRCDIR=		../../lang/sun-jre14
+.elif ${_PKG_JVM} == "sun-jdk141"
+_JDK_PKGSRCDIR=		../../lang/sun-jdk141
+_JRE_PKGSRCDIR=		../../lang/sun-jre141
+_JAVA_HOME_DEFAULT=	${LOCALBASE}/java/sun-1.4.1
 .elif ${_PKG_JVM} == "blackdown-jdk13"
 _JDK_PKGSRCDIR=		../../lang/blackdown-jdk13

That's all.
Many thanks for the pkgsrc system and, of course, for NetBSD.
P.S. pkgsrc-wip has a package to build a newer JRE/JDK from source.

  +- Robert Lillack ------------------ -+
 /  Max Planck Institute for Mathematics in the Sciences  /
+- Leipzig, Germany ----------- phone: +49-341-9959-693 -+