Subject: Re: native java browser plugin
To: Geert Hendrickx <geert.hendrickx@ua.ac.be>
From: Bernd Ernesti <netbsd@lists.veego.de>
List: tech-pkg
Date: 08/10/2005 23:52:23
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Aug 09, 2005 at 05:27:43PM +0200, Geert Hendrickx wrote:
> Hi all, 
> 
> I have committed (optional but enabled by default) support for a native
> Java browser plugin in the wip/jdk14 package.  The option is jdk14-plugin,
> and requires devel/nspr as a build-time dependency (could also use the nspr
> dir of any installed mozilla/firefox package, but using the separate nspr
> package was easier and also more correct IMO).  

Here is a diff:

- pkglint was complaining about the PKGNAME, so I moved the version up
- there were some problems during deinstallation so I had to split PLIST
  into two files, one which contains the files and a second one which
  contains the @dirrm
  Just rename PLIST to PLIST.common and move the @dirrm lines into the
  new file PLIST.common_end.
  This is needed because the @dirrm would be executed while there are
  still some files left from the PLIST.jce or PLIST.plugin filelist.
  I also removed the '@exec ${MKDIR} %D/java/jdk-1.4.2/jre/lib/applet'
  line, while I did that.
- typo in options.mk: SCR instead of SRC and so PLIST.plugin wouldn't
  be included into the generated .PLIST
- removed the pre-build target and added a BUILDLINK_PASSTHRU_RPATHDIRS
  line, jlam told me about that trick.

That was only a build and an installation, nothing more at the moment.

Bernd


--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="jdk14.diff"

? PLIST.common
? PLIST.common_end
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/jdk14/Makefile,v
retrieving revision 1.18
diff -b -u -r1.18 Makefile
--- Makefile	10 Aug 2005 11:26:08 -0000	1.18
+++ Makefile	10 Aug 2005 21:43:06 -0000
@@ -1,5 +1,9 @@
 # $NetBSD$
 
+JDK_VERSION=    1.4.2
+JDK_PATCHSET_VERSION=   7
+SUN_LINUX_JDK_VERSION=  1.4.2
+
 DISTNAME=	j2sdk-1_4_2-src-scsl
 PKGNAME=	jdk14-${JDK_VERSION}.${JDK_PATCHSET_VERSION}
 CATEGORIES=	lang java
@@ -27,7 +31,7 @@
 USE_LANGUAGES=		c c++
 EXTRACT_CMD_OPTS.zip=	-q
 WRKSRC=			${WRKDIR}
-PLIST_SRC=      	PLIST
+PLIST_SRC=      	PLIST.common
 
 ONLY_FOR_PLATFORM=	NetBSD-[2-9]*-i386
 
@@ -77,10 +81,7 @@
 MAKE_ENV+=	LD_LIBRARY_PATH=
 
 BUILDLINK_PASSTHRU_DIRS+= ${JVM_HOME}
-
-JDK_VERSION=    1.4.2
-JDK_PATCHSET_VERSION=   7
-SUN_LINUX_JDK_VERSION=  1.4.2
+BUILDLINK_PASSTHRU_RPATHDIRS+=${JAVA_HOME}/jre/lib/i386/server
 
 SCSL_SRCFILE=	j2sdk-${JDK_VERSION:S/./_/g}-src-scsl.zip
 SCSL_BINFILE=	j2sdk-${JDK_VERSION:S/./_/g}-bin-scsl.zip
@@ -142,6 +143,8 @@
 
 .include "options.mk"
 
+PLIST_SRC+=      	PLIST.common_end
+
 post-extract:
 	${CHMOD} -R u+w ${WRKSRC}
 
@@ -153,9 +156,9 @@
 	${MKDIR} ${WRKSRC}/control/build/bsd-i586/lib/i386/server
 
 # XXX make directory so that -rpath won't fail
-pre-build:
-	${INSTALL_PROGRAM_DIR} ${JAVA_HOME}
-	${INSTALL_DATA_DIR} ${JAVA_HOME}/jre/lib/i386/server
+#pre-build:
+#	${INSTALL_PROGRAM_DIR} ${JAVA_HOME}
+#	${INSTALL_DATA_DIR} ${JAVA_HOME}/jre/lib/i386/server
 
 do-install:
 	${INSTALL_PROGRAM_DIR} ${JAVA_HOME}
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/jdk14/options.mk,v
retrieving revision 1.1
diff -b -u -r1.1 options.mk
--- options.mk	9 Aug 2005 14:59:12 -0000	1.1
+++ options.mk	10 Aug 2005 21:43:06 -0000
@@ -23,7 +23,7 @@
 .if !empty(PKG_OPTIONS:Mjdk14-plugin)
 .include "../../devel/nspr/buildlink3.mk"
 BUILDLINK_DEPMETHOD.nspr=	build
-PLIST_SCR+=			PLIST.plugin
+PLIST_SRC+=			PLIST.plugin
 .else
 MAKE_ENV+=			NO_PLUGIN=YES
 .endif

--17pEHd4RhPHOinZp--