From tmclaugh@FreeBSD.org  Wed Nov 15 18:48:03 2006
Return-Path: <tmclaugh@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C666216A417;
	Wed, 15 Nov 2006 18:48:03 +0000 (UTC)
	(envelope-from tmclaugh@FreeBSD.org)
Received: from straycat.dhs.org (c-24-63-86-11.hsd1.ma.comcast.net [24.63.86.11])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D989543D73;
	Wed, 15 Nov 2006 18:47:55 +0000 (GMT)
	(envelope-from tmclaugh@FreeBSD.org)
Received: from bofh.straycat.dhs.org (bofh.straycat.dhs.org [192.168.2.68])
	by straycat.dhs.org (8.13.4/8.13.4) with ESMTP id kAFIlqwN001848;
	Wed, 15 Nov 2006 13:47:52 -0500 (EST)
Message-Id: <1163616473.26166@bofh.straycat.dhs.org>
Date: Wed, 15 Nov 2006 13:47:53 -0500
From: "Tom McLaughlin" <tmclaugh@FreeBSD.org>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Cc: freebsd-eclipse@FreeBSD.org
Subject: java/eclipse: Proper mozilla support via USE_GECKO
X-Send-Pr-Version: gtk-send-pr 0.4.7 
X-GNATS-Notify: dsledge@appriss.com

>Number:         105581
>Category:       ports
>Synopsis:       java/eclipse: Proper mozilla support via USE_GECKO
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tmclaugh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 15 18:50:02 GMT 2006
>Closed-Date:    Wed Jan 03 19:12:50 GMT 2007
>Last-Modified:  Wed Jan 03 19:12:50 GMT 2007
>Originator:     Tom McLaughlin
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:


System: FreeBSD 6.2-PRERELEASE #0: Wed Nov  1 21:15:30 EST 2006
    tom@bofh.straycat.dhs.org:/usr/obj/usr/src/sys/GENERIC_ULE



>Description:


Attached patch properly sets mozilla dependency via USE_GECKO.  It also
corrects some issues which will cause a build to fail if mozilla is not installed.
Currently only firefox and mozilla are listed as supported.  I also corrected the
icon installation.  It will potentially fail because the directory it is installing to may
not exist in some circumstances.

Could someone please test that the build still works when WITHOUT_MOZILLA is
set?  Else I'll do it when I have a clkean jail.  Thanks.


>How-To-Repeat:





>Fix:


--- eclipse-gecko.diff begins here ---
? work
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/java/eclipse/Makefile,v
retrieving revision 1.50
diff -u -r1.50 Makefile
--- Makefile	4 Nov 2006 02:06:49 -0000	1.50
+++ Makefile	15 Nov 2006 16:57:26 -0000
@@ -27,6 +27,10 @@
 USE_ZIP=	yes
 USE_GCC=	3.4+
 
+.if !defined(WITHOUT_MOZILLA)
+USE_GECKO=	firefox mozilla
+.endif
+
 USE_JAVA=	yes
 JAVA_VERSION=	1.5+
 JAVA_OS=	native
@@ -39,35 +43,32 @@
 
 ECLIPSE_WS=	gtk
 
-.if !defined(WITHOUT_MOZILLA)
-MAKE_MOZILLA=	make_mozilla
-.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
-BROWSER=	${WITH_MOZILLA}
-BUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
+.if defined(WITHOUT_GNOMEVFS)
+MAKE_GNOME=
+USE_GNOME=	gtk20 pkgconfig desktopfileutils
 .else
-BUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
-BROWSER=	mozilla
+MAKE_GNOME=	make_gnome
+USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
 .endif
+
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_MOZILLA)
+MAKE_MOZILLA=	make_mozilla
+BROWSER=	${GECKO}
 .else
 BROWSER=
 MAKE_MOZILLA=
 .endif
+
 .if defined(WITHOUT_CAIRO)
 MAKE_CAIRO=
 .else
-LIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
-MAKE_CAIRO=	make_cairo
+LIB_DEPENDS=    cairo.2:${PORTSDIR}/graphics/cairo
+MAKE_CAIRO=     make_cairo
 .endif
 
-.if defined(WITHOUT_GNOMEVFS)
-MAKE_GNOME=
-USE_GNOME=	gtk20 pkgconfig desktopfileutils
-.else
-MAKE_GNOME=	make_gnome
-USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
-.endif
-
-.include <bsd.port.pre.mk>
 
 .if (${ARCH} == "amd64")
 ECLIPSE_ARCH=	amd64
@@ -97,6 +98,9 @@
 	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/build.sh" ${FILESDIR}/post-patch-plugins-swt-gtk-build.sh
 	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/make_freebsd.mak" ${FILESDIR}/post-patch-plugins-swt-gtk-make_freebsd.mak
 	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/os_custom.h" ${FILESDIR}/post-patch-plugins-swt-gtk-os_custom.h
+	@${REINPLACE_CMD} -e 's|%%GECKO%%|${GECKO}|g' \
+		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh" \
+		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak"
 
 do-build:
 	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
@@ -118,6 +122,7 @@
 	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
 	  -e "s+%%PREFIX%%+${PREFIX}+g" \
 	${FILESDIR}/eclipse.desktop > ${WRKSRC}/eclipse.desktop.tmp
+	${MKDIR} ${PREFIX}/share/applications/ || ${TRUE}
 	${INSTALL_DATA} ${WRKSRC}/eclipse.desktop.tmp ${PREFIX}/share/applications/eclipse.desktop
 	${INSTALL_PROGRAM} ${WRKSRC}/launchertmp/eclipse ${PREFIX}/eclipse/eclipse
 	@-update-desktop-database
@@ -127,4 +132,5 @@
 	  | ${SED} -ne 's,^,@dirrm ,p' >> ${TMPPLIST}
 	@echo '@unexec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
 
+.include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk"
 .include <bsd.port.post.mk>
Index: files/post-patch-plugins-swt-gtk-build.sh
===================================================================
RCS file: /home/pcvs/ports/java/eclipse/files/post-patch-plugins-swt-gtk-build.sh,v
retrieving revision 1.1
diff -u -r1.1 post-patch-plugins-swt-gtk-build.sh
--- files/post-patch-plugins-swt-gtk-build.sh	4 Nov 2006 02:06:49 -0000	1.1
+++ files/post-patch-plugins-swt-gtk-build.sh	15 Nov 2006 16:57:26 -0000
@@ -68,9 +68,9 @@
 -		echo "    *** Mozilla embedding support will not be compiled."
 +if [ ${MAKE_MOZILLA} != "" ]; then
 +	if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
-+		if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
-+			GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
-+			GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
++		if [ x`pkg-config --exists %%GECKO%%-xpcom && echo YES` = "xYES" ]; then
++			GECKO_INCLUDES=`pkg-config --cflags %%GECKO%%-xpcom`
++			GECKO_LIBS=`pkg-config --libs %%GECKO%%-xpcom`
 +			export GECKO_INCLUDES
 +			export GECKO_LIBS
 +			MAKE_MOZILLA=make_mozilla
Index: files/post-patch-plugins-swt-gtk-make_freebsd.mak
===================================================================
RCS file: /home/pcvs/ports/java/eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak,v
retrieving revision 1.1
diff -u -r1.1 post-patch-plugins-swt-gtk-make_freebsd.mak
--- files/post-patch-plugins-swt-gtk-make_freebsd.mak	4 Nov 2006 02:06:49 -0000	1.1
+++ files/post-patch-plugins-swt-gtk-make_freebsd.mak	15 Nov 2006 16:57:27 -0000
@@ -4,9 +4,9 @@
  	-I. \
  	-I$(JAVA_HOME)/include \
  	-I$(JAVA_HOME)/include/freebsd \
-+	-I$(LOCALBASE)/include/mozilla \
-+	-I$(LOCALBASE)/include/mozilla/profdirserviceprovider \
-+	-I$(LOCALBASE)/include/mozilla/string \
++	-I$(LOCALBASE)/include/%%GECKO%% \
++	-I$(LOCALBASE)/include/%%GECKO%%/profdirserviceprovider \
++	-I$(LOCALBASE)/include/%%GECKO%%/string \
 +	-I$(LOCALBASE)/include/nspr \
  	${SWT_PTR_CFLAGS}
  MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
--- eclipse-gecko.diff ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->tmclaugh 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Nov 15 18:50:25 UTC 2006 
Responsible-Changed-Why:  
Submitter has GNATS access 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105581 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Nov 15 18:50:32 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105581 

From: David Sledge <dsledge@appriss.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Wed, 22 Nov 2006 15:32:47 -0500

 I have a few modifications to add/change on this patch. I will upload a 
 new diff when I have finished testing it.
 
 
 Edwin Groothuis wrote:
 > Maintainer of java/eclipse,
 >
 > Please note that PR ports/105581 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/105581
 >
 >   

From: David Sledge <dsledge@appriss.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Mon, 27 Nov 2006 15:14:01 -0500

 This is a multi-part message in MIME format.
 --------------090806060208020601020605
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 
 Here is the modified eclipse patch. Please commit it when able.
 
 --------------090806060208020601020605
 Content-Type: text/x-patch;
  name="eclipse.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="eclipse.diff"
 
 diff -ruN eclipse.bak/Makefile eclipse/Makefile
 --- eclipse.bak/Makefile	Mon Nov 27 15:07:41 2006
 +++ eclipse/Makefile	Mon Nov 27 12:59:46 2006
 @@ -7,7 +7,7 @@
  
  PORTNAME=	eclipse
  PORTVERSION=	3.2.1
 -#PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	java devel
  MASTER_SITES=	${MASTER_SITE_ECLIPSE}
  MASTER_SITE_SUBDIR=	R-${PORTVERSION}-200609210945
 @@ -27,6 +27,10 @@
  USE_ZIP=	yes
  USE_GCC=	3.4+
  
 +.if !defined(WITHOUT_MOZILLA)
 +USE_GECKO=	firefox mozilla seamonkey xulrunner
 +.endif
 +
  USE_JAVA=	yes
  JAVA_VERSION=	1.5+
  JAVA_OS=	native
 @@ -39,35 +43,32 @@
  
  ECLIPSE_WS=	gtk
  
 -.if !defined(WITHOUT_MOZILLA)
 -MAKE_MOZILLA=	make_mozilla
 -.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
 -BROWSER=	${WITH_MOZILLA}
 -BUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
 +.if defined(WITHOUT_GNOMEVFS)
 +MAKE_GNOME=
 +USE_GNOME=	gtk20 pkgconfig desktopfileutils
  .else
 -BUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
 -BROWSER=	mozilla
 +MAKE_GNOME=	make_gnome
 +USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
  .endif
 +
 +
 +.include <bsd.port.pre.mk>
 +
 +.if !defined(WITHOUT_MOZILLA)
 +MAKE_MOZILLA=	make_mozilla
 +BROWSER=	${GECKO}
  .else
  BROWSER=
  MAKE_MOZILLA=
  .endif
 +
  .if defined(WITHOUT_CAIRO)
  MAKE_CAIRO=
  .else
 -LIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
 -MAKE_CAIRO=	make_cairo
 +LIB_DEPENDS=    cairo.2:${PORTSDIR}/graphics/cairo
 +MAKE_CAIRO=     make_cairo
  .endif
  
 -.if defined(WITHOUT_GNOMEVFS)
 -MAKE_GNOME=
 -USE_GNOME=	gtk20 pkgconfig desktopfileutils
 -.else
 -MAKE_GNOME=	make_gnome
 -USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
 -.endif
 -
 -.include <bsd.port.pre.mk>
  
  .if (${ARCH} == "amd64")
  ECLIPSE_ARCH=	amd64
 @@ -97,6 +98,9 @@
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/build.sh" ${FILESDIR}/post-patch-plugins-swt-gtk-build.sh
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/make_freebsd.mak" ${FILESDIR}/post-patch-plugins-swt-gtk-make_freebsd.mak
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/os_custom.h" ${FILESDIR}/post-patch-plugins-swt-gtk-os_custom.h
 +	@${REINPLACE_CMD} -e 's|%%GECKO%%|${GECKO}|g' \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh" \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak"
  
  do-build:
  	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
 @@ -109,6 +113,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	  -e "s+%%X11BASE%%+${X11BASE}+g" \
 +	  -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
  	  -e "s+%%BROWSER%%+${BROWSER}+g" \
  	  -e "s,%%JAVA_VERSION%%,${JAVA_VERSION},g" \
  	  -e "s+%%JAVA_OS%%+${JAVA_OS}+g" \
 @@ -118,6 +123,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	${FILESDIR}/eclipse.desktop > ${WRKSRC}/eclipse.desktop.tmp
 +	${MKDIR} ${PREFIX}/share/applications/ || ${TRUE}
  	${INSTALL_DATA} ${WRKSRC}/eclipse.desktop.tmp ${PREFIX}/share/applications/eclipse.desktop
  	${INSTALL_PROGRAM} ${WRKSRC}/launchertmp/eclipse ${PREFIX}/eclipse/eclipse
  	@-update-desktop-database
 @@ -127,4 +133,5 @@
  	  | ${SED} -ne 's,^,@dirrm ,p' >> ${TMPPLIST}
  	@echo '@unexec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
  
 +.include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk"
  .include <bsd.port.post.mk>
 diff -ruN eclipse.bak/files/eclipse.in eclipse/files/eclipse.in
 --- eclipse.bak/files/eclipse.in	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/eclipse.in	Mon Nov 27 12:59:46 2006
 @@ -10,8 +10,9 @@
  DEFAULT_JAVA_HOME=%%PREFIX%%
  ECLIPSE_HOME=%%ECLIPSE_HOME%%
  DEFAULT_JAVA_CMD=java
 -MOZILLA_FIVE_HOME=%%LOCALBASE%%/include/%%BROWSER%%
 -export MOZILLA_FIVE_HOME
 +#MOZILLA_FIVE_HOME=%%LOCALBASE%%/lib/%%BROWSER%%
 +#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
 +#export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
  
  #-----------------------------------------------------------------------------
  # Determine configuration settings
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-gtk-build.sh eclipse/files/post-patch-plugins-swt-gtk-build.sh
 --- eclipse.bak/files/post-patch-plugins-swt-gtk-build.sh	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-build.sh	Mon Nov 27 12:59:46 2006
 @@ -68,9 +68,9 @@
  -		echo "    *** Mozilla embedding support will not be compiled."
  +if [ ${MAKE_MOZILLA} != "" ]; then
  +	if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
 -+		if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
 -+			GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
 -+			GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
 ++		if [ x`pkg-config --exists %%GECKO%%-xpcom && echo YES` = "xYES" ]; then
 ++			GECKO_INCLUDES=`pkg-config --cflags %%GECKO%%-xpcom`
 ++			GECKO_LIBS=`pkg-config --libs %%GECKO%%-xpcom`
  +			export GECKO_INCLUDES
  +			export GECKO_LIBS
  +			MAKE_MOZILLA=make_mozilla
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-gtk-make_freebsd.mak eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak
 --- eclipse.bak/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Mon Nov 27 12:59:46 2006
 @@ -4,9 +4,9 @@
   	-I. \
   	-I$(JAVA_HOME)/include \
   	-I$(JAVA_HOME)/include/freebsd \
 -+	-I$(LOCALBASE)/include/mozilla \
 -+	-I$(LOCALBASE)/include/mozilla/profdirserviceprovider \
 -+	-I$(LOCALBASE)/include/mozilla/string \
 ++	-I$(LOCALBASE)/include/%%GECKO%% \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/profdirserviceprovider \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/string \
  +	-I$(LOCALBASE)/include/nspr \
   	${SWT_PTR_CFLAGS}
   MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
 
 --------------090806060208020601020605--

From: David Sledge <dsledge@appriss.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Wed, 29 Nov 2006 16:51:07 -0500

 This is a multi-part message in MIME format.
 --------------050805090902090304010508
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Since this patch has not been committed yet I have updated it again. I 
 set the default build to use xulrunner instead of mozilla or firefox as 
 this version  of the eclipse port will now work with the internal web 
 browser when compiling against xulrunner. Please commit this patch file 
 instead of the previous patch files uploaded.
 
 --------------050805090902090304010508
 Content-Type: text/x-patch;
  name="eclipse.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="eclipse.diff"
 
 diff -ruN eclipse.bak/Makefile eclipse/Makefile
 --- eclipse.bak/Makefile	Mon Nov 27 15:07:41 2006
 +++ eclipse/Makefile	Wed Nov 29 16:41:10 2006
 @@ -7,7 +7,7 @@
  
  PORTNAME=	eclipse
  PORTVERSION=	3.2.1
 -#PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	java devel
  MASTER_SITES=	${MASTER_SITE_ECLIPSE}
  MASTER_SITE_SUBDIR=	R-${PORTVERSION}-200609210945
 @@ -27,6 +27,10 @@
  USE_ZIP=	yes
  USE_GCC=	3.4+
  
 +.if !defined(WITHOUT_MOZILLA)
 +USE_GECKO=	xulrunner firefox mozilla seamonkey
 +.endif
 +
  USE_JAVA=	yes
  JAVA_VERSION=	1.5+
  JAVA_OS=	native
 @@ -39,35 +43,32 @@
  
  ECLIPSE_WS=	gtk
  
 -.if !defined(WITHOUT_MOZILLA)
 -MAKE_MOZILLA=	make_mozilla
 -.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
 -BROWSER=	${WITH_MOZILLA}
 -BUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
 +.if defined(WITHOUT_GNOMEVFS)
 +MAKE_GNOME=
 +USE_GNOME=	gtk20 pkgconfig desktopfileutils
  .else
 -BUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
 -BROWSER=	mozilla
 +MAKE_GNOME=	make_gnome
 +USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
  .endif
 +
 +
 +.include <bsd.port.pre.mk>
 +
 +.if !defined(WITHOUT_MOZILLA)
 +MAKE_MOZILLA=	make_mozilla
 +BROWSER=	${GECKO}
  .else
  BROWSER=
  MAKE_MOZILLA=
  .endif
 +
  .if defined(WITHOUT_CAIRO)
  MAKE_CAIRO=
  .else
 -LIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
 -MAKE_CAIRO=	make_cairo
 +LIB_DEPENDS=    cairo.2:${PORTSDIR}/graphics/cairo
 +MAKE_CAIRO=     make_cairo
  .endif
  
 -.if defined(WITHOUT_GNOMEVFS)
 -MAKE_GNOME=
 -USE_GNOME=	gtk20 pkgconfig desktopfileutils
 -.else
 -MAKE_GNOME=	make_gnome
 -USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
 -.endif
 -
 -.include <bsd.port.pre.mk>
  
  .if (${ARCH} == "amd64")
  ECLIPSE_ARCH=	amd64
 @@ -91,12 +92,24 @@
  
  SWTCAIRO=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library
  SWTGTK=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library
 +SWTMOZ=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT Mozilla
  
  # Manually patch some files with spaces in the path
  post-patch:
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/build.sh" ${FILESDIR}/post-patch-plugins-swt-gtk-build.sh
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/make_freebsd.mak" ${FILESDIR}/post-patch-plugins-swt-gtk-make_freebsd.mak
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/os_custom.h" ${FILESDIR}/post-patch-plugins-swt-gtk-os_custom.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/gtk/org/eclipse/swt/browser/Browser.java" ${FILESDIR}/post-patch-plugins-swt-mozilla-Browser.java
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/org/eclipse/swt/internal/mozilla/XPCOM.java" ${FILESDIR}/post-patch-plugins-swt-mozilla-XPCOM.java
 +	@${PATCH} ${PATCH_DIST_ARGS} "${WRKSRC}/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties" ${FILESDIR}/post-patch-plugins-swt-mozilla-XPCOM.properties
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom.cpp" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom.cpp
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_profile.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_profile.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_stats.cpp" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_stats.cpp
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_stats.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_stats.h
 +	@${REINPLACE_CMD} -e 's|%%GECKO%%|${GECKO}|g' \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh" \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak"
  
  do-build:
  	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
 @@ -109,6 +122,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	  -e "s+%%X11BASE%%+${X11BASE}+g" \
 +	  -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
  	  -e "s+%%BROWSER%%+${BROWSER}+g" \
  	  -e "s,%%JAVA_VERSION%%,${JAVA_VERSION},g" \
  	  -e "s+%%JAVA_OS%%+${JAVA_OS}+g" \
 @@ -118,6 +132,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	${FILESDIR}/eclipse.desktop > ${WRKSRC}/eclipse.desktop.tmp
 +	${MKDIR} ${PREFIX}/share/applications/ || ${TRUE}
  	${INSTALL_DATA} ${WRKSRC}/eclipse.desktop.tmp ${PREFIX}/share/applications/eclipse.desktop
  	${INSTALL_PROGRAM} ${WRKSRC}/launchertmp/eclipse ${PREFIX}/eclipse/eclipse
  	@-update-desktop-database
 @@ -127,4 +142,5 @@
  	  | ${SED} -ne 's,^,@dirrm ,p' >> ${TMPPLIST}
  	@echo '@unexec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
  
 +.include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk"
  .include <bsd.port.post.mk>
 diff -ruN eclipse.bak/distinfo eclipse/distinfo
 --- eclipse.bak/distinfo	Mon Nov 27 15:07:41 2006
 +++ eclipse/distinfo	Wed Nov 29 15:32:05 2006
 @@ -1,4 +1,3 @@
  MD5 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 0fe89e9c7cf07a56c4fe8e2d7f5a394b
  SHA256 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 2d6a0628333d068b6ab678c42f925d71df1c003035543830a30e3ee80fb855c7
  SIZE (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 82433420
 -
 diff -ruN eclipse.bak/files/eclipse.in eclipse/files/eclipse.in
 --- eclipse.bak/files/eclipse.in	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/eclipse.in	Wed Nov 29 16:08:47 2006
 @@ -10,8 +10,9 @@
  DEFAULT_JAVA_HOME=%%PREFIX%%
  ECLIPSE_HOME=%%ECLIPSE_HOME%%
  DEFAULT_JAVA_CMD=java
 -MOZILLA_FIVE_HOME=%%LOCALBASE%%/include/%%BROWSER%%
 -export MOZILLA_FIVE_HOME
 +MOZILLA_FIVE_HOME=%%LOCALBASE%%/lib/%%BROWSER%%
 +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
 +export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
  
  #-----------------------------------------------------------------------------
  # Determine configuration settings
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-gtk-build.sh eclipse/files/post-patch-plugins-swt-gtk-build.sh
 --- eclipse.bak/files/post-patch-plugins-swt-gtk-build.sh	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-build.sh	Mon Nov 27 12:59:46 2006
 @@ -68,9 +68,9 @@
  -		echo "    *** Mozilla embedding support will not be compiled."
  +if [ ${MAKE_MOZILLA} != "" ]; then
  +	if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
 -+		if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
 -+			GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
 -+			GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
 ++		if [ x`pkg-config --exists %%GECKO%%-xpcom && echo YES` = "xYES" ]; then
 ++			GECKO_INCLUDES=`pkg-config --cflags %%GECKO%%-xpcom`
 ++			GECKO_LIBS=`pkg-config --libs %%GECKO%%-xpcom`
  +			export GECKO_INCLUDES
  +			export GECKO_LIBS
  +			MAKE_MOZILLA=make_mozilla
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-gtk-make_freebsd.mak eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak
 --- eclipse.bak/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Mon Nov 27 15:07:41 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Wed Nov 29 11:51:57 2006
 @@ -1,12 +1,12 @@
 ---- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak.orig	Mon Oct  9 16:06:20 2006
 -+++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	Mon Oct  9 16:27:59 2006
 +--- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak.orig	Tue Nov 28 17:32:19 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	Wed Nov 29 11:49:18 2006
  @@ -79,6 +79,10 @@
   	-I. \
   	-I$(JAVA_HOME)/include \
   	-I$(JAVA_HOME)/include/freebsd \
 -+	-I$(LOCALBASE)/include/mozilla \
 -+	-I$(LOCALBASE)/include/mozilla/profdirserviceprovider \
 -+	-I$(LOCALBASE)/include/mozilla/string \
 ++	-I$(LOCALBASE)/include/%%GECKO%% \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/profdirserviceprovider \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/string \
  +	-I$(LOCALBASE)/include/nspr \
   	${SWT_PTR_CFLAGS}
   MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
 @@ -30,3 +30,41 @@
   
   #
   # SWT libs
 +@@ -202,7 +207,7 @@
 + #
 + # Mozilla lib
 + #
 +-make_mozilla:$(MOZILLA_LIB) $(PROFILE14_LIB) $(PROFILE17_LIB) $(PROFILE18_LIB)
 ++make_mozilla:$(MOZILLA_LIB)
 + 
 + $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
 + 	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS}
 +@@ -220,22 +225,22 @@
 + 	$(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp	
 + 
 + $(PROFILE14_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE17_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE18_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
 +-	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
 ++	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS} ${GECKO_LIBS}
 + 
 + $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
 +-	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
 ++	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS} ${GECKO_LIBS}
 + 
 + $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
 +-	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
 ++	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS} ${GECKO_LIBS}
 + 
 + #
 + # GLX lib
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-Browser.java eclipse/files/post-patch-plugins-swt-mozilla-Browser.java
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-Browser.java	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-Browser.java	Wed Nov 29 14:52:28 2006
 @@ -0,0 +1,186 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java.orig	Wed Nov 29 14:32:45 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java	Wed Nov 29 14:42:01 2006
 +@@ -10,15 +10,75 @@
 +  *******************************************************************************/
 + package org.eclipse.swt.browser;
 + 
 +-import java.io.*;
 +-import java.util.*;
 +-import org.eclipse.swt.*;
 +-import org.eclipse.swt.widgets.*;
 +-import org.eclipse.swt.graphics.*;
 +-import org.eclipse.swt.internal.*;
 +-import org.eclipse.swt.internal.gtk.*;
 +-import org.eclipse.swt.internal.mozilla.*;
 +-import org.eclipse.swt.layout.*;
 ++import java.io.File;
 ++import java.io.UnsupportedEncodingException;
 ++import java.util.Locale;
 ++import java.util.StringTokenizer;
 ++
 ++import org.eclipse.swt.SWT;
 ++import org.eclipse.swt.SWTError;
 ++import org.eclipse.swt.SWTException;
 ++import org.eclipse.swt.graphics.Point;
 ++import org.eclipse.swt.graphics.Rectangle;
 ++import org.eclipse.swt.internal.Callback;
 ++import org.eclipse.swt.internal.Converter;
 ++import org.eclipse.swt.internal.Library;
 ++import org.eclipse.swt.internal.gtk.GdkEvent;
 ++import org.eclipse.swt.internal.gtk.LONG;
 ++import org.eclipse.swt.internal.gtk.OS;
 ++import org.eclipse.swt.internal.mozilla.XPCOM;
 ++import org.eclipse.swt.internal.mozilla.XPCOMObject;
 ++import org.eclipse.swt.internal.mozilla.nsEmbedString;
 ++import org.eclipse.swt.internal.mozilla.nsIAppShell;
 ++import org.eclipse.swt.internal.mozilla.nsIBaseWindow;
 ++import org.eclipse.swt.internal.mozilla.nsICategoryManager;
 ++import org.eclipse.swt.internal.mozilla.nsIComponentManager;
 ++import org.eclipse.swt.internal.mozilla.nsIComponentRegistrar;
 ++import org.eclipse.swt.internal.mozilla.nsIContextMenuListener;
 ++import org.eclipse.swt.internal.mozilla.nsICookie;
 ++import org.eclipse.swt.internal.mozilla.nsICookieManager;
 ++import org.eclipse.swt.internal.mozilla.nsID;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMEvent;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMMouseEvent;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMWindow;
 ++import org.eclipse.swt.internal.mozilla.nsIDirectoryService;
 ++import org.eclipse.swt.internal.mozilla.nsIDocShell;
 ++import org.eclipse.swt.internal.mozilla.nsIEmbeddingSiteWindow;
 ++import org.eclipse.swt.internal.mozilla.nsIFile;
 ++import org.eclipse.swt.internal.mozilla.nsIIOService;
 ++import org.eclipse.swt.internal.mozilla.nsIInterfaceRequestor;
 ++import org.eclipse.swt.internal.mozilla.nsILocalFile;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefBranch;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefLocalizedString;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefService;
 ++import org.eclipse.swt.internal.mozilla.nsIProperties;
 ++import org.eclipse.swt.internal.mozilla.nsIRequest;
 ++import org.eclipse.swt.internal.mozilla.nsIServiceManager;
 ++import org.eclipse.swt.internal.mozilla.nsISimpleEnumerator;
 ++import org.eclipse.swt.internal.mozilla.nsISupports;
 ++import org.eclipse.swt.internal.mozilla.nsISupportsWeakReference;
 ++import org.eclipse.swt.internal.mozilla.nsITooltipListener;
 ++import org.eclipse.swt.internal.mozilla.nsIURI;
 ++import org.eclipse.swt.internal.mozilla.nsIURIContentListener;
 ++import org.eclipse.swt.internal.mozilla.nsIWeakReference;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowser;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChrome;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChromeFocus;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserFocus;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserStream;
 ++import org.eclipse.swt.internal.mozilla.nsIWebNavigation;
 ++import org.eclipse.swt.internal.mozilla.nsIWebProgress;
 ++import org.eclipse.swt.internal.mozilla.nsIWebProgressListener;
 ++import org.eclipse.swt.internal.mozilla.nsIWindowWatcher;
 ++import org.eclipse.swt.layout.FillLayout;
 ++import org.eclipse.swt.widgets.Composite;
 ++import org.eclipse.swt.widgets.Display;
 ++import org.eclipse.swt.widgets.Event;
 ++import org.eclipse.swt.widgets.Label;
 ++import org.eclipse.swt.widgets.Listener;
 ++import org.eclipse.swt.widgets.Menu;
 ++import org.eclipse.swt.widgets.Shell;
 ++import org.eclipse.swt.widgets.Widget;
 + 
 + /**
 +  * Instances of this class implement the browser user interface
 +@@ -175,40 +235,9 @@
 + 		 * - mozilla17profile/mozilla17profile-gcc should succeed for mozilla 1.7.x and firefox
 + 		 * - mozilla18profile/mozilla18profile-gcc should succeed for mozilla 1.8.x (seamonkey)
 + 		 */
 +-		try {
 +-			Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
 +-			usingProfile = true;
 +-		} catch (UnsatisfiedLinkError e1) {
 +-			try {
 +-				Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
 +-				usingProfile = true;
 +-			} catch (UnsatisfiedLinkError e2) {
 +-				try {
 +-					Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
 +-					usingProfile = true;
 +-				} catch (UnsatisfiedLinkError e3) {
 +-					try {
 +-						Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
 +-						usingProfile = true;
 +-					} catch (UnsatisfiedLinkError e4) {
 +-						try {
 +-							Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
 +-							usingProfile = true;
 +-						} catch (UnsatisfiedLinkError e5) {
 +-							try {
 +-								Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
 +-								usingProfile = true;
 +-							} catch (UnsatisfiedLinkError e6) {
 +-								/* 
 +-								* fail silently, the Browser will still work without profile support
 +-								* but will abort any attempts to navigate to HTTPS pages
 +-								*/
 +-							}
 +-						}
 +-					}
 +-				}
 +-			}
 +-		}
 ++		//Library.loadLibrary("swt-mozilla17-profile");
 ++		// We build the profile stuff without the need for a separate DSO
 ++		usingProfile = true;
 + 
 + 		int /*long*/[] retVal = new int /*long*/[1];
 + 		nsEmbedString pathString = new nsEmbedString(mozillaPath);
 +@@ -218,11 +247,11 @@
 + 		if (retVal[0] == 0) error(XPCOM.NS_ERROR_NULL_POINTER);
 + 		
 + 		nsILocalFile localFile = new nsILocalFile(retVal[0]);
 +-		rc = XPCOM.NS_InitEmbedding(localFile.getAddress(), 0);
 ++		rc = XPCOM.NS_InitXPCOM3(0, localFile.getAddress(), 0, 0, 0);
 + 		localFile.Release();
 + 		if (rc != XPCOM.NS_OK) {
 + 			dispose();
 +-			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitEmbedding "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 ++			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitXPCOM3 "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 + 		}
 + 
 + 		rc = XPCOM.NS_GetComponentManager(result);
 +@@ -283,7 +312,7 @@
 + 			rc = properties.Get(buffer, nsIFile.NS_IFILE_IID, result);
 + 			if (rc != XPCOM.NS_OK) error(rc);
 + 			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
 +-			properties.Release();
 ++			// properties.Release() is now after the Set below
 + 
 + 			nsIFile profileDir = new nsIFile(result[0]);
 + 			result[0] = 0;
 +@@ -305,24 +334,15 @@
 + 			pathString.dispose(); //
 + 
 + 			profileDir = new nsIFile(result[0]);
 +-			result[0] = 0;
 +-
 +-			rc = XPCOM_PROFILE.NS_NewProfileDirServiceProvider(true, result);
 ++			
 ++			// Set the profile dir property so that it's initialized for
 ++			// things like password manager and https
 ++			buffer = Converter.wcsToMbcs(null, XPCOM.NS_APP_USER_PROFILE_50_DIR, true);
 ++			rc = properties.Set(buffer, profileDir.getAddress());
 + 			if (rc != XPCOM.NS_OK) error(rc);
 +-			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
 +-
 +-			final int /*long*/ dirServiceProvider = result[0];
 ++			properties.Release();
 ++						
 + 			result[0] = 0;
 +-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_Register(dirServiceProvider);
 +-			if (rc != XPCOM.NS_OK) error(rc);
 +-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_SetProfileDir(dirServiceProvider, profileDir.getAddress());
 +-			if (rc != XPCOM.NS_OK) error(rc);
 +-
 +-			getDisplay().addListener(SWT.Dispose, new Listener() {
 +-				public void handleEvent(Event e) {
 +-					XPCOM_PROFILE.ProfileDirServiceProvider_Shutdown(dirServiceProvider);
 +-				}
 +-			});
 + 		}
 + 
 + 		/*
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-XPCOM.java eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.java
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-XPCOM.java	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.java	Wed Nov 29 14:15:27 2006
 @@ -0,0 +1,21 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java.orig	Wed Nov 29 14:11:42 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	Wed Nov 29 14:14:30 2006
 +@@ -89,6 +89,7 @@
 + 	public static final int NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 0x804e03f3;
 + 	public static final int NS_ERROR_FILE_NOT_FOUND = 0x80520012;
 + 	public static final String NS_APP_APPLICATION_REGISTRY_DIR = "AppRegD"; //$NON-NLS-1$
 ++	public static final String NS_APP_USER_PROFILE_50_DIR = "ProfD"; //$NON-NLS-1$
 + 
 + public static final native void memmove(nsID dest, int /*long*/ src, int nbytes);
 + public static final native void memmove(int /*long*/ dest, nsID src, int nbytes);
 +@@ -103,9 +104,8 @@
 + public static final native void memmove(byte[] dest, char[] src, int nbytes);
 + public static final native int NS_GetComponentManager(int /*long*/[] result);
 + public static final native int NS_GetServiceManager(int /*long*/[] result);
 +-public static final native int NS_InitEmbedding(int /*long*/ aMozBinDirectory, int /*long*/ aAppFileLocProvider);
 ++public static final native int NS_InitXPCOM3(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider, int /*long*/ staticComponents, int componentCount);
 + public static final native int NS_NewLocalFile(int /*long*/ path, boolean followLinks, int /*long*/[] result);
 +-public static final native int NS_TermEmbedding();
 + public static final native int strlen_PRUnichar(int /*long*/ s);
 + public static final native int /*long*/ nsEmbedCString_new();
 + public static final native int /*long*/ nsEmbedCString_new(byte[] aString, int length);
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-XPCOM.properties eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.properties
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-XPCOM.properties	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.properties	Wed Nov 29 14:19:30 2006
 @@ -0,0 +1,25 @@
 +--- plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties.orig	Wed Nov 29 14:17:21 2006
 ++++ plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties	Wed Nov 29 14:18:14 2006
 +@@ -24,16 +24,17 @@
 + XPCOM_NS_GetServiceManager=
 + XPCOM_NS_GetServiceManager_0=cast=(nsIServiceManager**)
 + 
 +-XPCOM_NS_InitEmbedding=
 +-XPCOM_NS_InitEmbedding_0=cast=(nsILocalFile *)
 +-XPCOM_NS_InitEmbedding_1=cast=(nsIDirectoryServiceProvider *)
 ++XPCOM_NS_InitXPCOM3=
 ++XPCOM_NS_InitXPCOM3_0=cast=(nsIServiceManager**)
 ++XPCOM_NS_InitXPCOM3_1=cast=(nsIFile *)
 ++XPCOM_NS_InitXPCOM3_2=cast=(nsIDirectoryServiceProvider *)
 ++XPCOM_NS_InitXPCOM3_3=cast=(const nsStaticModuleInfo *)
 ++XPCOM_NS_InitXPCOM3_4=cast=(PRUint32)
 + 
 + XPCOM_NS_NewLocalFile=
 + XPCOM_NS_NewLocalFile_0=cast=(nsAString *),flags=struct
 + XPCOM_NS_NewLocalFile_1=
 + XPCOM_NS_NewLocalFile_2=cast=(nsILocalFile**)
 +-
 +-XPCOM_NS_TermEmbedding=
 + 
 + XPCOM_PR_Free=
 + XPCOM_PR_Free_0=cast=(void *)
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom.cpp eclipse/files/post-patch-plugins-swt-mozilla-xpcom.cpp
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom.cpp	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom.cpp	Wed Nov 29 13:50:50 2006
 @@ -0,0 +1,44 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp.orig	Wed Nov 29 13:46:45 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp	Wed Nov 29 13:49:23 2006
 +@@ -85,14 +85,16 @@
 + }
 + #endif
 + 
 +-#ifndef NO_NS_1InitEmbedding
 +-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitEmbedding)
 +-	(JNIEnv *env, jclass that, jint arg0, jint arg1)
 ++#ifndef NO_NS_1InitXPCOM3
 ++JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitXPCOM3)
 ++	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
 + {
 + 	jint rc = 0;
 +-	XPCOM_NATIVE_ENTER(env, that, NS_1InitEmbedding_FUNC);
 +-	rc = (jint)NS_InitEmbedding((nsILocalFile *)arg0, (nsIDirectoryServiceProvider *)arg1);
 +-	XPCOM_NATIVE_EXIT(env, that, NS_1InitEmbedding_FUNC);
 ++	XPCOM_NATIVE_ENTER(env, that, NS_1GetComponentRegistrar_FUNC);
 ++	rc = (jint)NS_InitXPCOM3((nsIServiceManager **)arg0, (nsIFile *)arg1,
 ++		(nsIDirectoryServiceProvider *)arg2, (nsStaticModuleInfo *)arg3,
 ++		(PRUint32) arg4);
 ++	XPCOM_NATIVE_EXIT(env, that, NS_1GetComponentRegistrar_FUNC);
 + 	return rc;
 + }
 + #endif
 +@@ -109,18 +111,6 @@
 + fail:
 + 	if (arg2 && lparg2) env->ReleaseIntArrayElements(arg2, lparg2, 0);
 + 	XPCOM_NATIVE_EXIT(env, that, NS_1NewLocalFile_FUNC);
 +-	return rc;
 +-}
 +-#endif
 +-
 +-#ifndef NO_NS_1TermEmbedding
 +-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1TermEmbedding)
 +-	(JNIEnv *env, jclass that)
 +-{
 +-	jint rc = 0;
 +-	XPCOM_NATIVE_ENTER(env, that, NS_1TermEmbedding_FUNC);
 +-	rc = (jint)NS_TermEmbedding();
 +-	XPCOM_NATIVE_EXIT(env, that, NS_1TermEmbedding_FUNC);
 + 	return rc;
 + }
 + #endif
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom.h
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom.h	Wed Nov 29 12:13:01 2006
 @@ -0,0 +1,12 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h.orig	Wed Nov 29 12:11:18 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h	Wed Nov 29 12:12:03 2006
 +@@ -31,8 +31,7 @@
 + 
 + #define NDEBUG
 + 
 +-#include "nsXPCOM.h"
 +-#include "nsEmbedAPI.h"	
 ++#include "nsXPCOM.h"	
 + #include "nsEmbedString.h"
 + #include "nsIInputStream.h"
 + #include "nsISupportsUtils.h"
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_profile.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom_profile.h
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_profile.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_profile.h	Wed Nov 29 12:10:35 2006
 @@ -0,0 +1,11 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h.orig	Wed Nov 29 12:08:43 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h	Wed Nov 29 12:09:33 2006
 +@@ -32,7 +32,7 @@
 + #define NDEBUG
 + 
 + #include "nsCOMPtr.h"
 +-#include "nsProfileDirServiceProvider.h"
 ++#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
 + #include "xpcom_stats.h"
 + 
 + #endif /* INC_xpcom_profile_H */
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp	Wed Nov 29 12:07:13 2006
 @@ -0,0 +1,21 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp.orig	Wed Nov 29 12:03:05 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp	Wed Nov 29 12:05:26 2006
 +@@ -31,15 +31,14 @@
 + 
 + #ifdef NATIVE_STATS
 + 
 +-int XPCOM_nativeFunctionCount = 132;
 +-int XPCOM_nativeFunctionCallCount[132];
 ++int XPCOM_nativeFunctionCount = 131;
 ++int XPCOM_nativeFunctionCallCount[131];
 + char * XPCOM_nativeFunctionNames[] = {
 + 	"Call",
 + 	"NS_1GetComponentManager",
 + 	"NS_1GetServiceManager",
 +-	"NS_1InitEmbedding",
 ++	"NS_1InitXPCOM3_FUNC",
 + 	"NS_1NewLocalFile",
 +-	"NS_1TermEmbedding",
 + 	"PR_1Free",
 + 	"PR_1Malloc",
 + 	"VtblCall__II",
 diff -ruN eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_stats.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.h
 --- eclipse.bak/files/post-patch-plugins-swt-mozilla-xpcom_stats.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.h	Wed Nov 29 13:53:14 2006
 @@ -0,0 +1,13 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h.orig	Wed Nov 29 13:51:40 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h	Wed Nov 29 13:52:23 2006
 +@@ -41,9 +41,8 @@
 + 	Call_FUNC,
 + 	NS_1GetComponentManager_FUNC,
 + 	NS_1GetServiceManager_FUNC,
 +-	NS_1InitEmbedding_FUNC,
 ++	NS_1InitXPCOM3_FUNC,
 + 	NS_1NewLocalFile_FUNC,
 +-	NS_1TermEmbedding_FUNC,
 + 	PR_1Free_FUNC,
 + 	PR_1Malloc_FUNC,
 + 	VtblCall__II_FUNC,
 
 --------------050805090902090304010508--

From: Tom McLaughlin <tmclaugh@FreeBSD.org>
To: bug-followup@FreeBSD.org, tmclaugh@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via
	USE_GECKO
Date: Sun, 03 Dec 2006 22:23:00 -0500

 Hi David,
 
 I discussed using xulrunner as the default GECKO with another committer
 and we both felt that firefox should remain the default.  The reason is
 users will most likely have firefox installed or will want it installed.
 Setting the default to xulrunner will make that the dependency required
 by the package and in more cases than not bring in an extra package for
 users.  We felt that while support xulrunner is good, it shouldn't be
 the default used by the package.  With that in mind what do you think?
 I'll commit it which ever way you think is best.  I just wanted to bring
 this issue up first.  Thanks.
 
 tom
 

From: Kurt Miller <lists@intricatesoftware.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Fri, 08 Dec 2006 16:25:52 -0500

 Does the latest diff work on amd64 too?

From: David Sledge <dsledge@appriss.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Fri, 08 Dec 2006 18:36:16 -0500

 Tom,
     I choose xulrunner as the default because it is the only one that 
 currently works completely. Compiling against firefox will not enable 
 the internal browser which affects web development using eclipse and 
 also affects plugins for web development like MyEclipse. When I get past 
 the amd64 problem with xulrunner I plan to start looking into firefox 
 again. If I can get firefox working I would be more than happy with 
 setting is as the default, but right now I would assume that it would be 
 best to make the default xulrunner since it is currently the only option 
 that enables the full use of eclipse.
 
 Kurt,
     Patch-3.diff will not fix the internal browser on amd64, just x86. 
 With patch-3.diff applied on amd64 you will have to use "make 
 WITHOUT_MOZILLA=yes" and will be forced to use the external browser. I 
 have located where the problem is for amd64 in the source code but I am 
 not yet sure why it is happening or how to fix it. I am still working on 
 it though.

From: Kurt Miller <lists@intricatesoftware.com>
To: bug-followup@freebsd.org, tmclaugh@freebsd.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Sun, 10 Dec 2006 22:47:39 -0500

 I'm about to commit a similar update to OpenBSD's eclipse port.
 I found the amd64 build problem. It was that the build by default
 uses the prebuilt swttools.jar in the distfile so some of the
 changes like XPCOM.properties were not effective. You need to
 apply this patch too:
 
 http://overlays.gentoo.org/proj/java/browser/other/eclipse-patches/3.2.1/eclipse-sdk-3.2.1-swttools.patch
 
 Also, I'd recommend using NS_InitXPCOM2 instead of NS_InitXPCOM3.
 It is the older init function. I'm not sure when NS_InitXPCOM3
 was added, but its not included in the old mozilla suite.
 
 Also the linux guys missed patching this file too:
 
 plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM_PROFILE.properties
 
 Hope that helps somewhat.

From: David Sledge <dsledge@appriss.com>
To: <bug-followup@FreeBSD.org>,
	<tmclaugh@FreeBSD.org>
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via
 USE_GECKO
Date: Wed, 13 Dec 2006 18:52:29 -0500

 Thanks Kurt for the patch. I added it to the eclipse port and tested it my
 amd64 box. Seems to be working ok. I will create a new diff tomorrow and
 attach it to this PR. The previous patch files might fail to apply now as a
 patch has been committed for the Xbase11 issues. The new patch file I make
 tomorrow will take that into account.
 

From: David Sledge <dsledge@appriss.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: java/eclipse: Proper mozilla support via USE_GECKO
Date: Thu, 14 Dec 2006 18:12:25 -0500

 This is a multi-part message in MIME format.
 --------------030908020000050701030104
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
   <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
   <title></title>
 </head>
 <body bgcolor="#ffffff" text="#000000">
 <br>
 <font size="2">Here is a new patch file that will fix the internal web
 browser on amd64 platform when compiling against xulrunner, Thanks
 Kurt. Please commit this latest patch "patch-4.diff".<br>
 <br>
 <br>
 </font>
 </body>
 </html>
 
 --------------030908020000050701030104
 Content-Type: text/x-patch;
  name="eclipse.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="eclipse.diff"
 
 diff -ruN eclipse_3_2_1_0/Makefile eclipse/Makefile
 --- eclipse_3_2_1_0/Makefile	Fri Nov  3 21:06:49 2006
 +++ eclipse/Makefile	Thu Dec 14 17:52:09 2006
 @@ -2,12 +2,12 @@
  # Date created:				March 7, 2003
  # Whom:					various members of freebsd-java
  #
 -# $FreeBSD: ports/java/eclipse/Makefile,v 1.50 2006/11/04 02:06:49 kan Exp $
 +# $FreeBSD$
  #
  
  PORTNAME=	eclipse
  PORTVERSION=	3.2.1
 -#PORTREVISION=	0
 +PORTREVISION=	1
  CATEGORIES=	java devel
  MASTER_SITES=	${MASTER_SITE_ECLIPSE}
  MASTER_SITE_SUBDIR=	R-${PORTVERSION}-200609210945
 @@ -27,6 +27,10 @@
  USE_ZIP=	yes
  USE_GCC=	3.4+
  
 +.if !defined(WITHOUT_MOZILLA)
 +USE_GECKO=	xulrunner firefox mozilla seamonkey
 +.endif
 +
  USE_JAVA=	yes
  JAVA_VERSION=	1.5+
  JAVA_OS=	native
 @@ -39,35 +43,32 @@
  
  ECLIPSE_WS=	gtk
  
 -.if !defined(WITHOUT_MOZILLA)
 -MAKE_MOZILLA=	make_mozilla
 -.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
 -BROWSER=	${WITH_MOZILLA}
 -BUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
 +.if defined(WITHOUT_GNOMEVFS)
 +MAKE_GNOME=
 +USE_GNOME=	gtk20 pkgconfig desktopfileutils
  .else
 -BUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
 -BROWSER=	mozilla
 +MAKE_GNOME=	make_gnome
 +USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
  .endif
 +
 +
 +.include <bsd.port.pre.mk>
 +
 +.if !defined(WITHOUT_MOZILLA)
 +MAKE_MOZILLA=	make_mozilla
 +BROWSER=	${GECKO}
  .else
  BROWSER=
  MAKE_MOZILLA=
  .endif
 +
  .if defined(WITHOUT_CAIRO)
  MAKE_CAIRO=
  .else
 -LIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
 -MAKE_CAIRO=	make_cairo
 +LIB_DEPENDS=    cairo.2:${PORTSDIR}/graphics/cairo
 +MAKE_CAIRO=     make_cairo
  .endif
  
 -.if defined(WITHOUT_GNOMEVFS)
 -MAKE_GNOME=
 -USE_GNOME=	gtk20 pkgconfig desktopfileutils
 -.else
 -MAKE_GNOME=	make_gnome
 -USE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
 -.endif
 -
 -.include <bsd.port.pre.mk>
  
  .if (${ARCH} == "amd64")
  ECLIPSE_ARCH=	amd64
 @@ -91,12 +92,25 @@
  
  SWTCAIRO=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library
  SWTGTK=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library
 +SWTMOZ=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT Mozilla
  
  # Manually patch some files with spaces in the path
  post-patch:
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/build.sh" ${FILESDIR}/post-patch-plugins-swt-gtk-build.sh
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/make_freebsd.mak" ${FILESDIR}/post-patch-plugins-swt-gtk-make_freebsd.mak
  	@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/os_custom.h" ${FILESDIR}/post-patch-plugins-swt-gtk-os_custom.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/gtk/org/eclipse/swt/browser/Browser.java" ${FILESDIR}/post-patch-plugins-swt-mozilla-Browser.java
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/org/eclipse/swt/internal/mozilla/XPCOM.java" ${FILESDIR}/post-patch-plugins-swt-mozilla-XPCOM.java
 +	@${PATCH} ${PATCH_DIST_ARGS} "${WRKSRC}/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties" ${FILESDIR}/post-patch-plugins-swt-mozilla-XPCOM.properties
 +	@${PATCH} ${PATCH_DIST_ARGS} "${WRKSRC}/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM_PROFILE.properties" ${FILESDIR}/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom.cpp" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom.cpp
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_profile.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_profile.h
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_stats.cpp" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_stats.cpp
 +	@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/common/library/xpcom_stats.h" ${FILESDIR}/post-patch-plugins-swt-mozilla-xpcom_stats.h
 +	@${REINPLACE_CMD} -e 's|%%GECKO%%|${GECKO}|g' \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh" \
 +		"${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak"
  
  do-build:
  	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
 @@ -109,6 +123,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	  -e "s+%%X11BASE%%+${X11BASE}+g" \
 +	  -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
  	  -e "s+%%BROWSER%%+${BROWSER}+g" \
  	  -e "s,%%JAVA_VERSION%%,${JAVA_VERSION},g" \
  	  -e "s+%%JAVA_OS%%+${JAVA_OS}+g" \
 @@ -118,6 +133,7 @@
  	  -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
  	  -e "s+%%PREFIX%%+${PREFIX}+g" \
  	${FILESDIR}/eclipse.desktop > ${WRKSRC}/eclipse.desktop.tmp
 +	${MKDIR} ${PREFIX}/share/applications/ || ${TRUE}
  	${INSTALL_DATA} ${WRKSRC}/eclipse.desktop.tmp ${PREFIX}/share/applications/eclipse.desktop
  	${INSTALL_PROGRAM} ${WRKSRC}/launchertmp/eclipse ${PREFIX}/eclipse/eclipse
  	@-update-desktop-database
 @@ -127,4 +143,5 @@
  	  | ${SED} -ne 's,^,@dirrm ,p' >> ${TMPPLIST}
  	@echo '@unexec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
  
 +.include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk"
  .include <bsd.port.post.mk>
 diff -ruN eclipse_3_2_1_0/distinfo eclipse/distinfo
 --- eclipse_3_2_1_0/distinfo	Fri Nov  3 21:06:49 2006
 +++ eclipse/distinfo	Thu Dec 14 17:52:09 2006
 @@ -1,4 +1,3 @@
  MD5 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 0fe89e9c7cf07a56c4fe8e2d7f5a394b
  SHA256 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 2d6a0628333d068b6ab678c42f925d71df1c003035543830a30e3ee80fb855c7
  SIZE (eclipse/eclipse-sourceBuild-srcIncluded-3.2.1.zip) = 82433420
 -
 diff -ruN eclipse_3_2_1_0/files/eclipse.in eclipse/files/eclipse.in
 --- eclipse_3_2_1_0/files/eclipse.in	Fri Nov  3 21:06:49 2006
 +++ eclipse/files/eclipse.in	Thu Dec 14 17:52:09 2006
 @@ -4,14 +4,15 @@
  #
  # See: http://www.eclipse.org
  #
 -# $FreeBSD: ports/java/eclipse/files/eclipse.in,v 1.8 2006/11/04 02:06:49 kan Exp $
 +# $FreeBSD$
  #
  
  DEFAULT_JAVA_HOME=%%PREFIX%%
  ECLIPSE_HOME=%%ECLIPSE_HOME%%
  DEFAULT_JAVA_CMD=java
 -MOZILLA_FIVE_HOME=%%LOCALBASE%%/include/%%BROWSER%%
 -export MOZILLA_FIVE_HOME
 +MOZILLA_FIVE_HOME=%%LOCALBASE%%/lib/%%BROWSER%%
 +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
 +export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
  
  #-----------------------------------------------------------------------------
  # Determine configuration settings
 diff -ruN eclipse_3_2_1_0/files/patch-plugins-swt-amd64-build.xml eclipse/files/patch-plugins-swt-amd64-build.xml
 --- eclipse_3_2_1_0/files/patch-plugins-swt-amd64-build.xml	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/patch-plugins-swt-amd64-build.xml	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,45 @@
 +--- plugins/org.eclipse.swt.gtk.freebsd.amd64/build.xml.orig	Mon Dec 11 01:10:05 2006
 ++++ plugins/org.eclipse.swt.gtk.freebsd.amd64/build.xml	Mon Dec 11 01:20:33 2006
 +@@ -39,18 +39,17 @@
 + 
 + 	<target name="properties" if="eclipse.running">
 + 		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
 +-		<!--compile the jar in org.eclipse.swt.tools-->
 + 	</target>
 + 
 + 	<target name="build.update.jar" depends="init">
 +-		<delete dir="${temp.folder}"/>
 ++		<!-- <delete dir="${temp.folder}"/>
 + 		<mkdir dir="${temp.folder}"/>
 + 		<antcall target="build.jars"/>
 + 		<antcall target="gather.bin.parts">
 + 			<param name="destination.temp.folder" value="${temp.folder}/"/>
 + 		</antcall>
 + 		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false"/>
 +-		<delete dir="${temp.folder}"/>
 ++		<delete dir="${temp.folder}"/> -->
 + 	</target>
 + 
 + 	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
 +@@ -222,8 +221,11 @@
 + 	</target>
 + 
 + 	<target name="build.cfiles" depends="build.jars">
 ++		<!-- compile the jar in org.eclipse.swt.tools -->
 ++		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="build.jars" />		
 ++
 + 		<!-- generate the C code from the (64 bit) SWT PI java classes -->
 +-		<!-- assumes the swt.jar has already been built  -->
 ++		<!-- assumes the swttools.jar has already been built  -->
 + 		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar"><arg value="org.eclipse.swt.internal.gtk.OS"/><arg value="${basedir}/src/Eclipse SWT PI/gtk/library/"/><arg value="${build.result.folder}/swt.jar"/></java>
 + 		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar"><arg value="org.eclipse.swt.internal.accessibility.gtk.ATK"/><arg value="${basedir}/src/Eclipse SWT PI/gtk/library/"/><arg value="${build.result.folder}/swt.jar"/></java>
 + 		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar"><arg value="org.eclipse.swt.internal.cairo.Cairo"/><arg value="${basedir}/src/Eclipse SWT PI/cairo/library/"/><arg value="${build.result.folder}/swt.jar"/></java>
 +@@ -325,6 +327,8 @@
 + 		<delete file="${plugin.destination}/${full.name}.jar"/>
 + 		<delete file="${plugin.destination}/${full.name}.zip"/>
 + 		<delete dir="${temp.folder}"/>
 ++		<!-- delete swttools.jar so that it will be compiled in the build.jars target -->
 ++		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="clean" />
 + 	</target>
 + 
 + 	<target name="refresh" depends="init" if="eclipse.running">
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-gtk-build.sh eclipse/files/post-patch-plugins-swt-gtk-build.sh
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-gtk-build.sh	Fri Nov  3 21:06:49 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-build.sh	Thu Dec 14 17:52:09 2006
 @@ -68,9 +68,9 @@
  -		echo "    *** Mozilla embedding support will not be compiled."
  +if [ ${MAKE_MOZILLA} != "" ]; then
  +	if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
 -+		if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
 -+			GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
 -+			GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
 ++		if [ x`pkg-config --exists %%GECKO%%-xpcom && echo YES` = "xYES" ]; then
 ++			GECKO_INCLUDES=`pkg-config --cflags %%GECKO%%-xpcom`
 ++			GECKO_LIBS=`pkg-config --libs %%GECKO%%-xpcom`
  +			export GECKO_INCLUDES
  +			export GECKO_LIBS
  +			MAKE_MOZILLA=make_mozilla
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-gtk-make_freebsd.mak eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Tue Dec 12 02:38:50 2006
 +++ eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak	Thu Dec 14 18:05:33 2006
 @@ -1,5 +1,5 @@
 ---- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak.orig	Mon Oct  9 16:06:20 2006
 -+++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	Mon Oct  9 16:27:59 2006
 +--- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak.orig	Thu Dec 14 18:01:12 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	Thu Dec 14 18:03:00 2006
  @@ -48,7 +48,7 @@
   
   # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
 @@ -22,9 +22,9 @@
   	-I. \
   	-I$(JAVA_HOME)/include \
   	-I$(JAVA_HOME)/include/freebsd \
 -+	-I$(LOCALBASE)/include/mozilla \
 -+	-I$(LOCALBASE)/include/mozilla/profdirserviceprovider \
 -+	-I$(LOCALBASE)/include/mozilla/string \
 ++	-I$(LOCALBASE)/include/%%GECKO%% \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/profdirserviceprovider \
 ++	-I$(LOCALBASE)/include/%%GECKO%%/string \
  +	-I$(LOCALBASE)/include/nspr \
   	${SWT_PTR_CFLAGS}
   MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
 @@ -48,3 +48,41 @@
   
   #
   # SWT libs
 +@@ -202,7 +207,7 @@
 + #
 + # Mozilla lib
 + #
 +-make_mozilla:$(MOZILLA_LIB) $(PROFILE14_LIB) $(PROFILE17_LIB) $(PROFILE18_LIB)
 ++make_mozilla:$(MOZILLA_LIB)
 + 
 + $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
 + 	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS}
 +@@ -220,22 +225,22 @@
 + 	$(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp	
 + 
 + $(PROFILE14_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE17_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE18_OBJECTS): xpcom_profile.cpp
 +-	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
 ++	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 + 
 + $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
 +-	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
 ++	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS} ${GECKO_LIBS}
 + 
 + $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
 +-	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
 ++	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS} ${GECKO_LIBS}
 + 
 + $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
 +-	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
 ++	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS} ${GECKO_LIBS}
 + 
 + #
 + # GLX lib
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-Browser.java eclipse/files/post-patch-plugins-swt-mozilla-Browser.java
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-Browser.java	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-Browser.java	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,186 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java.orig	Wed Nov 29 14:32:45 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java	Wed Nov 29 14:42:01 2006
 +@@ -10,15 +10,75 @@
 +  *******************************************************************************/
 + package org.eclipse.swt.browser;
 + 
 +-import java.io.*;
 +-import java.util.*;
 +-import org.eclipse.swt.*;
 +-import org.eclipse.swt.widgets.*;
 +-import org.eclipse.swt.graphics.*;
 +-import org.eclipse.swt.internal.*;
 +-import org.eclipse.swt.internal.gtk.*;
 +-import org.eclipse.swt.internal.mozilla.*;
 +-import org.eclipse.swt.layout.*;
 ++import java.io.File;
 ++import java.io.UnsupportedEncodingException;
 ++import java.util.Locale;
 ++import java.util.StringTokenizer;
 ++
 ++import org.eclipse.swt.SWT;
 ++import org.eclipse.swt.SWTError;
 ++import org.eclipse.swt.SWTException;
 ++import org.eclipse.swt.graphics.Point;
 ++import org.eclipse.swt.graphics.Rectangle;
 ++import org.eclipse.swt.internal.Callback;
 ++import org.eclipse.swt.internal.Converter;
 ++import org.eclipse.swt.internal.Library;
 ++import org.eclipse.swt.internal.gtk.GdkEvent;
 ++import org.eclipse.swt.internal.gtk.LONG;
 ++import org.eclipse.swt.internal.gtk.OS;
 ++import org.eclipse.swt.internal.mozilla.XPCOM;
 ++import org.eclipse.swt.internal.mozilla.XPCOMObject;
 ++import org.eclipse.swt.internal.mozilla.nsEmbedString;
 ++import org.eclipse.swt.internal.mozilla.nsIAppShell;
 ++import org.eclipse.swt.internal.mozilla.nsIBaseWindow;
 ++import org.eclipse.swt.internal.mozilla.nsICategoryManager;
 ++import org.eclipse.swt.internal.mozilla.nsIComponentManager;
 ++import org.eclipse.swt.internal.mozilla.nsIComponentRegistrar;
 ++import org.eclipse.swt.internal.mozilla.nsIContextMenuListener;
 ++import org.eclipse.swt.internal.mozilla.nsICookie;
 ++import org.eclipse.swt.internal.mozilla.nsICookieManager;
 ++import org.eclipse.swt.internal.mozilla.nsID;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMEvent;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMMouseEvent;
 ++import org.eclipse.swt.internal.mozilla.nsIDOMWindow;
 ++import org.eclipse.swt.internal.mozilla.nsIDirectoryService;
 ++import org.eclipse.swt.internal.mozilla.nsIDocShell;
 ++import org.eclipse.swt.internal.mozilla.nsIEmbeddingSiteWindow;
 ++import org.eclipse.swt.internal.mozilla.nsIFile;
 ++import org.eclipse.swt.internal.mozilla.nsIIOService;
 ++import org.eclipse.swt.internal.mozilla.nsIInterfaceRequestor;
 ++import org.eclipse.swt.internal.mozilla.nsILocalFile;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefBranch;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefLocalizedString;
 ++import org.eclipse.swt.internal.mozilla.nsIPrefService;
 ++import org.eclipse.swt.internal.mozilla.nsIProperties;
 ++import org.eclipse.swt.internal.mozilla.nsIRequest;
 ++import org.eclipse.swt.internal.mozilla.nsIServiceManager;
 ++import org.eclipse.swt.internal.mozilla.nsISimpleEnumerator;
 ++import org.eclipse.swt.internal.mozilla.nsISupports;
 ++import org.eclipse.swt.internal.mozilla.nsISupportsWeakReference;
 ++import org.eclipse.swt.internal.mozilla.nsITooltipListener;
 ++import org.eclipse.swt.internal.mozilla.nsIURI;
 ++import org.eclipse.swt.internal.mozilla.nsIURIContentListener;
 ++import org.eclipse.swt.internal.mozilla.nsIWeakReference;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowser;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChrome;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChromeFocus;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserFocus;
 ++import org.eclipse.swt.internal.mozilla.nsIWebBrowserStream;
 ++import org.eclipse.swt.internal.mozilla.nsIWebNavigation;
 ++import org.eclipse.swt.internal.mozilla.nsIWebProgress;
 ++import org.eclipse.swt.internal.mozilla.nsIWebProgressListener;
 ++import org.eclipse.swt.internal.mozilla.nsIWindowWatcher;
 ++import org.eclipse.swt.layout.FillLayout;
 ++import org.eclipse.swt.widgets.Composite;
 ++import org.eclipse.swt.widgets.Display;
 ++import org.eclipse.swt.widgets.Event;
 ++import org.eclipse.swt.widgets.Label;
 ++import org.eclipse.swt.widgets.Listener;
 ++import org.eclipse.swt.widgets.Menu;
 ++import org.eclipse.swt.widgets.Shell;
 ++import org.eclipse.swt.widgets.Widget;
 + 
 + /**
 +  * Instances of this class implement the browser user interface
 +@@ -175,40 +235,9 @@
 + 		 * - mozilla17profile/mozilla17profile-gcc should succeed for mozilla 1.7.x and firefox
 + 		 * - mozilla18profile/mozilla18profile-gcc should succeed for mozilla 1.8.x (seamonkey)
 + 		 */
 +-		try {
 +-			Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
 +-			usingProfile = true;
 +-		} catch (UnsatisfiedLinkError e1) {
 +-			try {
 +-				Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
 +-				usingProfile = true;
 +-			} catch (UnsatisfiedLinkError e2) {
 +-				try {
 +-					Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
 +-					usingProfile = true;
 +-				} catch (UnsatisfiedLinkError e3) {
 +-					try {
 +-						Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
 +-						usingProfile = true;
 +-					} catch (UnsatisfiedLinkError e4) {
 +-						try {
 +-							Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
 +-							usingProfile = true;
 +-						} catch (UnsatisfiedLinkError e5) {
 +-							try {
 +-								Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
 +-								usingProfile = true;
 +-							} catch (UnsatisfiedLinkError e6) {
 +-								/* 
 +-								* fail silently, the Browser will still work without profile support
 +-								* but will abort any attempts to navigate to HTTPS pages
 +-								*/
 +-							}
 +-						}
 +-					}
 +-				}
 +-			}
 +-		}
 ++		//Library.loadLibrary("swt-mozilla17-profile");
 ++		// We build the profile stuff without the need for a separate DSO
 ++		usingProfile = true;
 + 
 + 		int /*long*/[] retVal = new int /*long*/[1];
 + 		nsEmbedString pathString = new nsEmbedString(mozillaPath);
 +@@ -218,11 +247,11 @@
 + 		if (retVal[0] == 0) error(XPCOM.NS_ERROR_NULL_POINTER);
 + 		
 + 		nsILocalFile localFile = new nsILocalFile(retVal[0]);
 +-		rc = XPCOM.NS_InitEmbedding(localFile.getAddress(), 0);
 ++		rc = XPCOM.NS_InitXPCOM3(0, localFile.getAddress(), 0, 0, 0);
 + 		localFile.Release();
 + 		if (rc != XPCOM.NS_OK) {
 + 			dispose();
 +-			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitEmbedding "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 ++			SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitXPCOM3 "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 + 		}
 + 
 + 		rc = XPCOM.NS_GetComponentManager(result);
 +@@ -283,7 +312,7 @@
 + 			rc = properties.Get(buffer, nsIFile.NS_IFILE_IID, result);
 + 			if (rc != XPCOM.NS_OK) error(rc);
 + 			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
 +-			properties.Release();
 ++			// properties.Release() is now after the Set below
 + 
 + 			nsIFile profileDir = new nsIFile(result[0]);
 + 			result[0] = 0;
 +@@ -305,24 +334,15 @@
 + 			pathString.dispose(); //
 + 
 + 			profileDir = new nsIFile(result[0]);
 +-			result[0] = 0;
 +-
 +-			rc = XPCOM_PROFILE.NS_NewProfileDirServiceProvider(true, result);
 ++			
 ++			// Set the profile dir property so that it's initialized for
 ++			// things like password manager and https
 ++			buffer = Converter.wcsToMbcs(null, XPCOM.NS_APP_USER_PROFILE_50_DIR, true);
 ++			rc = properties.Set(buffer, profileDir.getAddress());
 + 			if (rc != XPCOM.NS_OK) error(rc);
 +-			if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
 +-
 +-			final int /*long*/ dirServiceProvider = result[0];
 ++			properties.Release();
 ++						
 + 			result[0] = 0;
 +-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_Register(dirServiceProvider);
 +-			if (rc != XPCOM.NS_OK) error(rc);
 +-			rc = XPCOM_PROFILE.ProfileDirServiceProvider_SetProfileDir(dirServiceProvider, profileDir.getAddress());
 +-			if (rc != XPCOM.NS_OK) error(rc);
 +-
 +-			getDisplay().addListener(SWT.Dispose, new Listener() {
 +-				public void handleEvent(Event e) {
 +-					XPCOM_PROFILE.ProfileDirServiceProvider_Shutdown(dirServiceProvider);
 +-				}
 +-			});
 + 		}
 + 
 + 		/*
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM.java eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.java
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM.java	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.java	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,21 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java.orig	Wed Nov 29 14:11:42 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	Wed Nov 29 14:14:30 2006
 +@@ -89,6 +89,7 @@
 + 	public static final int NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 0x804e03f3;
 + 	public static final int NS_ERROR_FILE_NOT_FOUND = 0x80520012;
 + 	public static final String NS_APP_APPLICATION_REGISTRY_DIR = "AppRegD"; //$NON-NLS-1$
 ++	public static final String NS_APP_USER_PROFILE_50_DIR = "ProfD"; //$NON-NLS-1$
 + 
 + public static final native void memmove(nsID dest, int /*long*/ src, int nbytes);
 + public static final native void memmove(int /*long*/ dest, nsID src, int nbytes);
 +@@ -103,9 +104,8 @@
 + public static final native void memmove(byte[] dest, char[] src, int nbytes);
 + public static final native int NS_GetComponentManager(int /*long*/[] result);
 + public static final native int NS_GetServiceManager(int /*long*/[] result);
 +-public static final native int NS_InitEmbedding(int /*long*/ aMozBinDirectory, int /*long*/ aAppFileLocProvider);
 ++public static final native int NS_InitXPCOM3(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider, int /*long*/ staticComponents, int componentCount);
 + public static final native int NS_NewLocalFile(int /*long*/ path, boolean followLinks, int /*long*/[] result);
 +-public static final native int NS_TermEmbedding();
 + public static final native int strlen_PRUnichar(int /*long*/ s);
 + public static final native int /*long*/ nsEmbedCString_new();
 + public static final native int /*long*/ nsEmbedCString_new(byte[] aString, int length);
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM.properties eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.properties
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM.properties	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.properties	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,25 @@
 +--- plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties.orig	Wed Nov 29 14:17:21 2006
 ++++ plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties	Wed Nov 29 14:18:14 2006
 +@@ -24,16 +24,17 @@
 + XPCOM_NS_GetServiceManager=
 + XPCOM_NS_GetServiceManager_0=cast=(nsIServiceManager**)
 + 
 +-XPCOM_NS_InitEmbedding=
 +-XPCOM_NS_InitEmbedding_0=cast=(nsILocalFile *)
 +-XPCOM_NS_InitEmbedding_1=cast=(nsIDirectoryServiceProvider *)
 ++XPCOM_NS_InitXPCOM3=
 ++XPCOM_NS_InitXPCOM3_0=cast=(nsIServiceManager**)
 ++XPCOM_NS_InitXPCOM3_1=cast=(nsIFile *)
 ++XPCOM_NS_InitXPCOM3_2=cast=(nsIDirectoryServiceProvider *)
 ++XPCOM_NS_InitXPCOM3_3=cast=(const nsStaticModuleInfo *)
 ++XPCOM_NS_InitXPCOM3_4=cast=(PRUint32)
 + 
 + XPCOM_NS_NewLocalFile=
 + XPCOM_NS_NewLocalFile_0=cast=(nsAString *),flags=struct
 + XPCOM_NS_NewLocalFile_1=
 + XPCOM_NS_NewLocalFile_2=cast=(nsILocalFile**)
 +-
 +-XPCOM_NS_TermEmbedding=
 + 
 + XPCOM_PR_Free=
 + XPCOM_PR_Free_0=cast=(void *)
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties eclipse/files/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,25 @@
 +--- plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM_PROFILE.properties.orig	Mon Dec 11 02:02:04 2006
 ++++ plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM_PROFILE.properties	Mon Dec 11 02:03:34 2006
 +@@ -24,16 +24,17 @@
 + XPCOM_NS_GetServiceManager=
 + XPCOM_NS_GetServiceManager_0=
 + 
 +-XPCOM_NS_InitEmbedding=
 +-XPCOM_NS_InitEmbedding_0=
 +-XPCOM_NS_InitEmbedding_1=
 ++XPCOM_NS_InitXPCOM3=
 ++XPCOM_NS_InitXPCOM3_0=cast=(nsIServiceManager**)
 ++XPCOM_NS_InitXPCOM3_1=cast=(nsIFile *)
 ++XPCOM_NS_InitXPCOM3_2=cast=(nsIDirectoryServiceProvider *)
 ++XPCOM_NS_InitXPCOM3_3=cast=(const nsStaticModuleInfo *)
 ++XPCOM_NS_InitXPCOM3_4=cast=(PRUint32)
 + 
 + XPCOM_NS_NewLocalFile=
 + XPCOM_NS_NewLocalFile_0=
 + XPCOM_NS_NewLocalFile_1=
 + XPCOM_NS_NewLocalFile_2=
 +-
 +-XPCOM_NS_TermEmbedding=
 + 
 + XPCOM_PR_Free=
 + XPCOM_PR_Free_0=
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom.cpp eclipse/files/post-patch-plugins-swt-mozilla-xpcom.cpp
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom.cpp	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom.cpp	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,143 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp.orig	Thu Sep 21 10:57:23 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp	Wed Nov 29 19:46:27 2006
 +@@ -85,14 +85,16 @@
 + }
 + #endif
 + 
 +-#ifndef NO_NS_1InitEmbedding
 +-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitEmbedding)
 +-	(JNIEnv *env, jclass that, jint arg0, jint arg1)
 ++#ifndef NO_NS_1InitXPCOM3
 ++JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitXPCOM3)
 ++	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
 + {
 + 	jint rc = 0;
 +-	XPCOM_NATIVE_ENTER(env, that, NS_1InitEmbedding_FUNC);
 +-	rc = (jint)NS_InitEmbedding((nsILocalFile *)arg0, (nsIDirectoryServiceProvider *)arg1);
 +-	XPCOM_NATIVE_EXIT(env, that, NS_1InitEmbedding_FUNC);
 ++	XPCOM_NATIVE_ENTER(env, that, NS_1GetComponentRegistrar_FUNC);
 ++	rc = (jint)NS_InitXPCOM3((nsIServiceManager **)arg0, (nsIFile *)arg1,
 ++		(nsIDirectoryServiceProvider *)arg2, (nsStaticModuleInfo *)arg3,
 ++		(PRUint32) arg4);
 ++	XPCOM_NATIVE_EXIT(env, that, NS_1GetComponentRegistrar_FUNC);
 + 	return rc;
 + }
 + #endif
 +@@ -113,18 +115,6 @@
 + }
 + #endif
 + 
 +-#ifndef NO_NS_1TermEmbedding
 +-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1TermEmbedding)
 +-	(JNIEnv *env, jclass that)
 +-{
 +-	jint rc = 0;
 +-	XPCOM_NATIVE_ENTER(env, that, NS_1TermEmbedding_FUNC);
 +-	rc = (jint)NS_TermEmbedding();
 +-	XPCOM_NATIVE_EXIT(env, that, NS_1TermEmbedding_FUNC);
 +-	return rc;
 +-}
 +-#endif
 +-
 + #ifndef NO_PR_1Free
 + JNIEXPORT void JNICALL XPCOM_NATIVE(PR_1Free)
 + 	(JNIEnv *env, jclass that, jint arg0)
 +@@ -141,7 +131,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, PR_1Malloc_FUNC);
 +-	rc = (jint)PR_Malloc(arg0);
 ++	rc = (long)PR_Malloc(arg0);
 + 	XPCOM_NATIVE_EXIT(env, that, PR_1Malloc_FUNC);
 + 	return rc;
 + }
 +@@ -2091,7 +2081,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1get_FUNC);
 +-	rc = (jint)((nsEmbedCString *)arg0)->get();
 ++	rc = (long)((nsEmbedCString *)arg0)->get();
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1get_FUNC);
 + 	return rc;
 + }
 +@@ -2103,7 +2093,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1new___FUNC);
 +-	rc = (jint)new nsEmbedCString();
 ++	rc = (long)new nsEmbedCString();
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1new___FUNC);
 + 	return rc;
 + }
 +@@ -2117,7 +2107,7 @@
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1new___3BI_FUNC);
 + 	if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail;
 +-	rc = (jint)new nsEmbedCString((const char *)lparg0, arg1);
 ++	rc = (long)new nsEmbedCString((const char *)lparg0, arg1);
 + fail:
 + 	if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0);
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1new___3BI_FUNC);
 +@@ -2131,7 +2121,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1Length_FUNC);
 +-	rc = (jint)((nsEmbedString *)arg0)->Length();
 ++	rc = (long)((nsEmbedString *)arg0)->Length();
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1Length_FUNC);
 + 	return rc;
 + }
 +@@ -2153,7 +2143,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1get_FUNC);
 +-	rc = (jint)((nsEmbedString *)arg0)->get();
 ++	rc = (long)((nsEmbedString *)arg0)->get();
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1get_FUNC);
 + 	return rc;
 + }
 +@@ -2165,7 +2155,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1new___FUNC);
 +-	rc = (jint)new nsEmbedString();
 ++	rc = (long)new nsEmbedString();
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1new___FUNC);
 + 	return rc;
 + }
 +@@ -2179,7 +2169,7 @@
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1new___3C_FUNC);
 + 	if (arg0) if ((lparg0 = env->GetCharArrayElements(arg0, NULL)) == NULL) goto fail;
 +-	rc = (jint)new nsEmbedString(lparg0);
 ++	rc = (long)new nsEmbedString(lparg0);
 + fail:
 + 	if (arg0 && lparg0) env->ReleaseCharArrayElements(arg0, lparg0, 0);
 + 	XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1new___3C_FUNC);
 +@@ -2193,7 +2183,7 @@
 + {
 + 	jboolean rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsID_1Equals_FUNC);
 +-	rc = (jboolean)((nsID *)arg0)->Equals(*(nsID *)arg1);
 ++	rc = (long)((nsID *)arg0)->Equals(*(nsID *)arg1);
 + 	XPCOM_NATIVE_EXIT(env, that, nsID_1Equals_FUNC);
 + 	return rc;
 + }
 +@@ -2207,7 +2197,7 @@
 + 	jboolean rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsID_1Parse_FUNC);
 + 	if (arg1) if ((lparg1 = env->GetStringUTFChars(arg1, NULL)) == NULL) goto fail;
 +-	rc = (jboolean)((nsID *)arg0)->Parse((const char *)lparg1);
 ++	rc = (long)((nsID *)arg0)->Parse((const char *)lparg1);
 + fail:
 + 	if (arg1 && lparg1) env->ReleaseStringUTFChars(arg1, lparg1);
 + 	XPCOM_NATIVE_EXIT(env, that, nsID_1Parse_FUNC);
 +@@ -2231,7 +2221,7 @@
 + {
 + 	jint rc = 0;
 + 	XPCOM_NATIVE_ENTER(env, that, nsID_1new_FUNC);
 +-	rc = (jint)new nsID();
 ++	rc = (long)new nsID();
 + 	XPCOM_NATIVE_EXIT(env, that, nsID_1new_FUNC);
 + 	return rc;
 + }
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom.h
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom.h	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,12 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h.orig	Wed Nov 29 12:11:18 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h	Wed Nov 29 12:12:03 2006
 +@@ -31,8 +31,7 @@
 + 
 + #define NDEBUG
 + 
 +-#include "nsXPCOM.h"
 +-#include "nsEmbedAPI.h"	
 ++#include "nsXPCOM.h"	
 + #include "nsEmbedString.h"
 + #include "nsIInputStream.h"
 + #include "nsISupportsUtils.h"
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_profile.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom_profile.h
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_profile.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_profile.h	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,11 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h.orig	Wed Nov 29 12:08:43 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h	Wed Nov 29 12:09:33 2006
 +@@ -32,7 +32,7 @@
 + #define NDEBUG
 + 
 + #include "nsCOMPtr.h"
 +-#include "nsProfileDirServiceProvider.h"
 ++#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
 + #include "xpcom_stats.h"
 + 
 + #endif /* INC_xpcom_profile_H */
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,21 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp.orig	Wed Nov 29 12:03:05 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp	Wed Nov 29 12:05:26 2006
 +@@ -31,15 +31,14 @@
 + 
 + #ifdef NATIVE_STATS
 + 
 +-int XPCOM_nativeFunctionCount = 132;
 +-int XPCOM_nativeFunctionCallCount[132];
 ++int XPCOM_nativeFunctionCount = 131;
 ++int XPCOM_nativeFunctionCallCount[131];
 + char * XPCOM_nativeFunctionNames[] = {
 + 	"Call",
 + 	"NS_1GetComponentManager",
 + 	"NS_1GetServiceManager",
 +-	"NS_1InitEmbedding",
 ++	"NS_1InitXPCOM3_FUNC",
 + 	"NS_1NewLocalFile",
 +-	"NS_1TermEmbedding",
 + 	"PR_1Free",
 + 	"PR_1Malloc",
 + 	"VtblCall__II",
 diff -ruN eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_stats.h eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.h
 --- eclipse_3_2_1_0/files/post-patch-plugins-swt-mozilla-xpcom_stats.h	Wed Dec 31 19:00:00 1969
 +++ eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.h	Thu Dec 14 17:52:09 2006
 @@ -0,0 +1,13 @@
 +--- plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h.orig	Wed Nov 29 13:51:40 2006
 ++++ plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h	Wed Nov 29 13:52:23 2006
 +@@ -41,9 +41,8 @@
 + 	Call_FUNC,
 + 	NS_1GetComponentManager_FUNC,
 + 	NS_1GetServiceManager_FUNC,
 +-	NS_1InitEmbedding_FUNC,
 ++	NS_1InitXPCOM3_FUNC,
 + 	NS_1NewLocalFile_FUNC,
 +-	NS_1TermEmbedding_FUNC,
 + 	PR_1Free_FUNC,
 + 	PR_1Malloc_FUNC,
 + 	VtblCall__II_FUNC,
 diff -ruN eclipse_3_2_1_0/scripts/pre-patch eclipse/scripts/pre-patch
 --- eclipse_3_2_1_0/scripts/pre-patch	Fri Nov  3 21:06:50 2006
 +++ eclipse/scripts/pre-patch	Thu Dec 14 17:52:09 2006
 @@ -1,5 +1,5 @@
  #!/bin/sh
 -# $FreeBSD: ports/java/eclipse/scripts/pre-patch,v 1.3 2006/11/04 02:06:50 kan Exp $
 +# $FreeBSD$
  
  copy_file()
  {
 
 --------------030908020000050701030104--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105581: commit references a PR
Date: Wed,  3 Jan 2007 18:14:05 +0000 (UTC)

 tmclaugh    2007-01-03 18:13:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     java/eclipse         Makefile distinfo 
     java/eclipse/files   eclipse.in 
                          post-patch-plugins-swt-gtk-build.sh 
                          post-patch-plugins-swt-gtk-make_freebsd.mak 
     java/eclipse/scripts pre-patch 
   Added files:
     java/eclipse/files   patch-plugins-swt-amd64-build.xml 
                          post-patch-plugins-swt-mozilla-Browser.java 
                          post-patch-plugins-swt-mozilla-XPCOM.java 
                          post-patch-plugins-swt-mozilla-XPCOM.properties 
                          post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties 
                          post-patch-plugins-swt-mozilla-xpcom.cpp 
                          post-patch-plugins-swt-mozilla-xpcom.h 
                          post-patch-plugins-swt-mozilla-xpcom_profile.h 
                          post-patch-plugins-swt-mozilla-xpcom_stats.cpp 
                          post-patch-plugins-swt-mozilla-xpcom_stats.h 
   Log:
   - Fixes for internal web browser [1]
   - Fixes for internal web browser on amd64 [2]
   - Convert to USE_GECKO [3]
   
   Note: Port defaults to xulrunner as the preffered gecko port because it is
   the only port which allows the internal web browser to work but eclipse will
   build using other gecko ports (ie. firefox, mozilla, seamonkey) though it
   will lack a working internal web browser.  An argument can be made that
   xulrunner should be the only available gecko but maybe 5 people have
   xulrunner installed and it's another 45 minute mozilla dependency on even my
   speedy machine.  The maintainer mentioned working on getting the internal
   web browser to work with firefox so I'm leaving well enough alone.  When
   eclipse fully works with firefox the USE_GECKO ordering should probably be
   revistited.
   
   PR:             105581
   Submitted by:   Maintainer [1], Kurt Miller <lists at intricatesoftware.com> [2], me [3]
   
   Revision  Changes    Path
   1.51      +36 -21    ports/java/eclipse/Makefile
   1.13      +0 -1      ports/java/eclipse/distinfo
   1.9       +3 -2      ports/java/eclipse/files/eclipse.in
   1.1       +45 -0     ports/java/eclipse/files/patch-plugins-swt-amd64-build.xml (new)
   1.2       +3 -3      ports/java/eclipse/files/post-patch-plugins-swt-gtk-build.sh
   1.3       +43 -5     ports/java/eclipse/files/post-patch-plugins-swt-gtk-make_freebsd.mak
   1.1       +186 -0    ports/java/eclipse/files/post-patch-plugins-swt-mozilla-Browser.java (new)
   1.1       +21 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.java (new)
   1.1       +25 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-XPCOM.properties (new)
   1.1       +25 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-XPCOM_PROFILE.properties (new)
   1.1       +143 -0    ports/java/eclipse/files/post-patch-plugins-swt-mozilla-xpcom.cpp (new)
   1.1       +12 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-xpcom.h (new)
   1.1       +11 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-xpcom_profile.h (new)
   1.1       +21 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.cpp (new)
   1.1       +13 -0     ports/java/eclipse/files/post-patch-plugins-swt-mozilla-xpcom_stats.h (new)
   1.4       +0 -0      ports/java/eclipse/scripts/pre-patch
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: tmclaugh 
State-Changed-When: Wed Jan 3 19:12:17 UTC 2007 
State-Changed-Why:  
Thanks guys.  Patches committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105581 
>Unformatted:
