[49352] trunk/dports/devel/xulrunner

jeremyhu at macports.org jeremyhu at macports.org
Wed Apr 8 00:22:17 PDT 2009


Revision: 49352
          http://trac.macports.org/changeset/49352
Author:   jeremyhu at macports.org
Date:     2009-04-08 00:22:07 -0700 (Wed, 08 Apr 2009)
Log Message:
-----------
xulrunner: Integrate patches from firefox port, fixes SDK bugs, correct stub and executable, etc

Modified Paths:
--------------
    trunk/dports/devel/xulrunner/Portfile

Added Paths:
-----------
    trunk/dports/devel/xulrunner/files/browser-xulrunner-stub.patch
    trunk/dports/devel/xulrunner/files/icon-Makefile.patch
    trunk/dports/devel/xulrunner/files/nsFilePicker.patch
    trunk/dports/devel/xulrunner/files/plugins.patch
    trunk/dports/devel/xulrunner/files/xulrunner-app-Makefile.patch

Modified: trunk/dports/devel/xulrunner/Portfile
===================================================================
--- trunk/dports/devel/xulrunner/Portfile	2009-04-08 04:56:03 UTC (rev 49351)
+++ trunk/dports/devel/xulrunner/Portfile	2009-04-08 07:22:07 UTC (rev 49352)
@@ -4,6 +4,7 @@
 
 name		xulrunner
 version		1.9.0.7
+revision        1
 categories	devel
 maintainers	jeremyhu openmaintainer
 platforms	darwin
@@ -27,16 +28,20 @@
 worksrcdir	mozilla
 
 depends_lib \
+	port:heimdal \
+	port:lcms \
+	port:gconf \
+	port:esound \
+	port:libcanberra \
 	port:findutils \
 	port:nss \
 	port:nspr \
 	port:gtk2
 
-# Bug #485863 - enable-image-decoders=...
 configure.args \
+	--with-xulrunner-stub-name=xulrunner-stub \
 	--disable-static \
 	--enable-shared \
-	--disable-official-branding \
 	--with-distribution-id=org.macports \
 	--enable-default-toolkit=cairo-gtk2 \
 	--x-includes=${prefix}/include \
@@ -48,37 +53,36 @@
 	--with-system-bzip2=${prefix} \
 	--with-system-jpeg=${prefix} \
 	--with-system-zlib=${prefix} \
+	--enable-system-lcms \
 	--enable-system-cairo \
-	--with-system-cairo=${prefix} \
 	--enable-system-sqlite \
-	--with-default-mozilla-five-home=${prefix}/lib/xulrunner \
-	--disable-oji \
+	--with-default-mozilla-five-home=${prefix}/lib/${name} \
+	--enable-oji \
 	--enable-plugins \
 	--enable-mathml \
 	--enable-extensions="default,spellcheck" \
 	--enable-permissions \
 	--enable-cookie \
-	--enable-image-decoders="png,gif,jpeg,bmp,xbm" \
+	--enable-image-decoders=all \
 	--enable-image-encoder=all \
 	--enable-canvas \
 	--enable-jsd \
 	--enable-xpctools \
 	--enable-crypto \
-        --enable-pango \
+	--enable-pango \
 	--enable-svg \
 	--enable-svg-renderer=cairo \
 	--enable-xinerama \
 	--with-pthreads \
-	--enable-gnomevfs \
+	--disable-gnomevfs \
+	--disable-gnomeui \
 	--enable-postscript \
-	--enable-help-viewer \
 	--enable-safe-browsing \
-	--enable-xft \
-	--disable-freetype2 \
 	--disable-crashreporter \
-	--enable-optimize=-O2 \
+	--enable-optimize='-O2' \
 	--disable-prebinding \
 	--enable-strip \
+	--enable-install-strip \
 	--disable-debug \
 	--disable-installer \
 	--disable-updater \
@@ -90,14 +94,30 @@
     configure.args-delete   --disable-debug \
                             --disable-mochitest \
                             --enable-optimize='-O2' \
-                            --enable-strip
+                            --enable-strip \
+                            --enable-install-strip
 
-    configure.args-append   --enable-debug \
+    configure.args-append   --enable-debug='-ggdb3' \
                             --enable-mochitest \
                             --disable-optimize \
-                            --disable-strip
+                            --disable-strip \
+                            --disable-install-strip
 }
 
+variant gnome description {use gnome libraries where appropriate} {
+    depends_lib-append \
+	port:gnome-vfs \
+	port:libgnomeui \
+	port:libgnome \
+	port:gnome-icon-theme
+
+    configure.args-delete --disable-gnomevfs \
+                          --disable-gnomeui
+
+    configure.args-append --enable-gnomevfs \
+                          --enable-gnomeui
+}
+
 post-extract {
     # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
     move ${worksrcpath}/modules/libjar/nsWildCard.cpp ${worksrcpath}/modules/libjar/nsWildCard_jar.cpp
@@ -108,8 +128,13 @@
 # #485856 (configure)
 # #485862 (system-nss)
 # #486036 (make-install)
+# #485863 (icon-Makefile)
+# NOTFILED (nsFilePicker)
+# #486892 (plugins)
+# #487367 (browser-xulrunner-stub)
+# #487371 (xulrunner-app-Makefile)
 # Previous firefox-x11 port (patch-dylib_file.diff patch-pthread.diff)
-patchfiles configure.patch xpcom-Makefile.patch system-nss.patch make-install.patch patch-dylib_file.diff  patch-pthread.diff 
+patchfiles configure.patch xpcom-Makefile.patch system-nss.patch make-install.patch patch-dylib_file.diff  patch-pthread.diff icon-Makefile.patch nsFilePicker.patch plugins.patch browser-xulrunner-stub.patch xulrunner-app-Makefile.patch
 
 post-patch {
     # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
@@ -122,9 +147,44 @@
     # find -xtype -> gfind -xtype
     reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
 
+    if {[file exists ${prefix}/lib/pkgconfig/x11.pc]} {
+        reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
+    }
+
     # Set the right install_name on the libs
     reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/config/rules.mk
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/config/config.mk
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/nsprpub/configure.in
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/nsprpub/configure
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
 
+    # Fix the correct library filenames for loading at runtime
+    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsAppRootAccessible.cpp
+
+    reinplace "s:libgssapi_krb5.so.2:${prefix}/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
+
+    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
+    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
+    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
+
+    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
+
+    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/gfx/src/psshared/nsCUPSShim.cpp
+
+    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
+    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
+
+    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
+    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
+    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
+    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
+    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
+    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsFilePicker.cpp
+
+    # Set our system plugins path
+    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
+
     reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
 	${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
 	${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
@@ -157,3 +217,11 @@
         configure.ldflags-append  -L${x11prefix}/lib
     }
 }
+
+post-destroot {
+    # Workaround to get root certs loaded, so https:// works
+    ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${name}/libnssckbi.dylib
+
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=486064
+    system "cat ${worksrcpath}/dist/include/gfx/gfxtypes.h ${worksrcpath}/dist/include/thebes/gfxTypes.h > ${destroot}${prefix}/include/${name}/unstable/gfxtypes.h"
+}

Added: trunk/dports/devel/xulrunner/files/browser-xulrunner-stub.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/browser-xulrunner-stub.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/browser-xulrunner-stub.patch	2009-04-08 07:22:07 UTC (rev 49352)
@@ -0,0 +1,11 @@
+--- browser/app/Makefile.in.orig	2009-04-07 21:38:10.000000000 -0700
++++ browser/app/Makefile.in	2009-04-07 21:40:05.000000000 -0700
+@@ -418,7 +418,7 @@ endif
+ else
+ ifdef LIBXUL_SDK
+ libs::
+-	cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/firefox$(BIN_SUFFIX)
++	cp $(LIBXUL_DIST)/bin/$(XULRUNNER_STUB_NAME)$(BIN_SUFFIX) $(DIST)/bin/firefox$(BIN_SUFFIX)
+ endif
+ endif
+ 

Added: trunk/dports/devel/xulrunner/files/icon-Makefile.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/icon-Makefile.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/icon-Makefile.patch	2009-04-08 07:22:07 UTC (rev 49352)
@@ -0,0 +1,11 @@
+--- modules/libpr0n/decoders/icon/Makefile.in.orig	2009-03-31 12:55:07.000000000 -0700
++++ modules/libpr0n/decoders/icon/Makefile.in	2009-03-31 12:55:47.000000000 -0700
+@@ -67,7 +67,7 @@ ifeq ($(OS_ARCH),OS2)
+ PLATFORM = os2
+ endif
+ 
+-ifeq ($(OS_ARCH),Darwin)
++ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ PLATFORM = mac
+ endif
+ 

Added: trunk/dports/devel/xulrunner/files/nsFilePicker.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/nsFilePicker.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/nsFilePicker.patch	2009-04-08 07:22:07 UTC (rev 49352)
@@ -0,0 +1,14 @@
+--- widget/src/gtk2/nsFilePicker.cpp.bak	2009-04-03 18:35:03.000000000 -0700
++++ widget/src/gtk2/nsFilePicker.cpp	2009-04-03 18:38:58.000000000 -0700
+@@ -203,7 +203,11 @@ nsFilePicker::LoadSymbolsGTK24()
+     _gtk_file_chooser_get_filename = (_gtk_file_chooser_get_filename_fn)func;
+   } else {
+     // XXX hmm, this seems to fail when gtk 2.4 is already loaded...
++#ifdef __APPLE__
++    mGTK24 = PR_LoadLibrary("libgtk-x11-2.0.dylib");
++#else
+     mGTK24 = LoadVersionedLibrary("gtk-2", ".4");
++#endif
+     if (!mGTK24) {
+       return NS_ERROR_NOT_AVAILABLE;
+     }

Added: trunk/dports/devel/xulrunner/files/plugins.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/plugins.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/plugins.patch	2009-04-08 07:22:07 UTC (rev 49352)
@@ -0,0 +1,25 @@
+diff --git a/modules/plugin/base/src/nsPluginsDirUnix.cpp b/modules/plugin/base/src/nsPluginsDirUnix.cpp
+--- modules/plugin/base/src/nsPluginsDirUnix.cpp
++++ modules/plugin/base/src/nsPluginsDirUnix.cpp
+@@ -74,16 +74,21 @@
+ #define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".so"
+ #elif defined(_AIX)
+ #define DEFAULT_X11_PATH "/usr/lib"
+ #define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".a"
+ #elif defined(SOLARIS)
+ #define DEFAULT_X11_PATH "/usr/openwin/lib/"
+ #elif defined(LINUX)
+ #define DEFAULT_X11_PATH "/usr/X11R6/lib/"
++#elif defined(__APPLE__)
++#define DEFAULT_X11_PATH "/usr/X11R6/lib"
++#undef LOCAL_PLUGIN_DLL_SUFFIX
++#define LOCAL_PLUGIN_DLL_SUFFIX ".dylib"
++#define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".so"
+ #else
+ #define DEFAULT_X11_PATH ""
+ #endif
+ 
+ #if defined(MOZ_WIDGET_GTK2)
+ 
+ #define PLUGIN_MAX_LEN_OF_TMP_ARR 512
+ 

Added: trunk/dports/devel/xulrunner/files/xulrunner-app-Makefile.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/xulrunner-app-Makefile.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/xulrunner-app-Makefile.patch	2009-04-08 07:22:07 UTC (rev 49352)
@@ -0,0 +1,48 @@
+--- xulrunner/app/Makefile.in.orig	2009-04-07 22:17:16.000000000 -0700
++++ xulrunner/app/Makefile.in	2009-04-07 22:22:16.000000000 -0700
+@@ -87,12 +87,16 @@ CPPSRCS = nsXULRunnerApp.cpp
+ ifeq ($(OS_ARCH),WINNT)
+ CPPSRCS += nsRegisterGREWin.cpp
+ else
+-ifneq (,$(filter OS2 Darwin,$(OS_ARCH)))
++ifeq (OS2,$(OS_ARCH))
++CPPSRCS += nsRegisterGREVoid.cpp
++else
++ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+ CPPSRCS += nsRegisterGREVoid.cpp
+ else
+ CPPSRCS += nsRegisterGREUnix.cpp
+ endif
+ endif
++endif
+ 
+ LOCAL_INCLUDES += \
+         -I$(topsrcdir)/toolkit/xre \
+@@ -104,7 +108,7 @@ TK_LIBS := -framework Cocoa $(TK_LIBS)
+ endif
+ 
+ ifndef MOZ_ENABLE_LIBXUL
+-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
++ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+ LIBS += $(DIST)/bin/XUL
+ else
+ EXTRA_DSO_LIBS += xul
+@@ -202,8 +206,8 @@ LDFLAGS += /HEAP:0x40000
+ endif
+ endif
+ 
+-ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH)))
+-
++ifneq (,$(filter-out OS2 WINNT BeOS,$(OS_ARCH)))
++ifneq (cocoa, $(MOZ_WIDGET_TOOLKIT))
+ xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
+ 	cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
+                 -e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \
+@@ -218,6 +222,7 @@ install:: xulrunner
+ 
+ GARBAGE += xulrunner
+ endif
++endif
+ 
+ ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090408/eb3b53cc/attachment.html>


More information about the macports-changes mailing list