>Submitter-Id:  current-users 
>Originator:    Tom McLaughlin 
>Organization:   
>Confidential:  no 
>Synopsis:      java/eclipse: Proper mozilla support via USE_GECKO 
>Severity:      non-critical 
>Priority:      low 
>Category:      ports 
>Class:         sw-bug 
>Release:       FreeBSD 6.2-PRERELEASE i386 
>Environment:


System: FreeBSD 6.2-PRERELEASE #0: Wed Nov  1 21:15:30 EST 2006
    [EMAIL PROTECTED]:/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 ---



_______________________________________________
freebsd-eclipse@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-eclipse
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to