[48877] trunk/dports/devel

jeremyhu at macports.org jeremyhu at macports.org
Mon Mar 30 21:04:06 PDT 2009


Revision: 48877
          http://trac.macports.org/changeset/48877
Author:   jeremyhu at macports.org
Date:     2009-03-30 21:04:06 -0700 (Mon, 30 Mar 2009)
Log Message:
-----------
xulrunner: New port... one step closer to an updated firefox-x11

Added Paths:
-----------
    trunk/dports/devel/xulrunner/
    trunk/dports/devel/xulrunner/Portfile
    trunk/dports/devel/xulrunner/files/
    trunk/dports/devel/xulrunner/files/configure.patch
    trunk/dports/devel/xulrunner/files/make-install.patch
    trunk/dports/devel/xulrunner/files/patch-dylib_file.diff
    trunk/dports/devel/xulrunner/files/patch-pthread.diff
    trunk/dports/devel/xulrunner/files/system-nss.patch
    trunk/dports/devel/xulrunner/files/xpcom-Makefile.patch

Added: trunk/dports/devel/xulrunner/Portfile
===================================================================
--- trunk/dports/devel/xulrunner/Portfile	                        (rev 0)
+++ trunk/dports/devel/xulrunner/Portfile	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,159 @@
+# $Id$
+
+PortSystem	1.0
+
+name		xulrunner
+version		1.9.0.7
+categories	devel
+maintainers	jeremyhu openmaintainer
+platforms	darwin
+description	Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications
+
+long_description ${description}
+
+homepage	http://developer.mozilla.org/en/docs/XULRunner
+master_sites	http://mozilla.isc.org/pub/mozilla.org/xulrunner/releases/${version}/source
+
+distname	${name}-${version}-source
+use_bzip2	yes
+
+checksums           md5     9875c9237b532009df8e91c3785539a3 \
+                    sha1    03c078d9c2d047d7cdc25f7823c6e647cb8d8f8b \
+                    rmd160  da4319a3cbbb2deaab5dc80e1e18f042d98e4859
+
+# nspr and nss aren't universal
+universal_variant no
+
+worksrcdir	mozilla
+
+depends_lib \
+	port:findutils \
+	port:nss \
+	port:nspr \
+	port:gtk2
+
+# Bug #485863 - enable-image-decoders=...
+configure.args \
+	--disable-static \
+	--enable-shared \
+	--disable-official-branding \
+	--with-distribution-id=org.macports \
+	--enable-default-toolkit=cairo-gtk2 \
+	--x-includes=${prefix}/include \
+	--x-libraries=${prefix}/lib \
+	--with-system-nspr \
+	--with-nspr-prefix=${prefix} \
+	--with-system-nss \
+	--with-nss-prefix=${prefix} \
+	--with-system-bzip2=${prefix} \
+	--with-system-jpeg=${prefix} \
+	--with-system-zlib=${prefix} \
+	--enable-system-cairo \
+	--with-system-cairo=${prefix} \
+	--enable-system-sqlite \
+	--with-default-mozilla-five-home=${prefix}/lib/xulrunner \
+	--disable-oji \
+	--enable-plugins \
+	--enable-mathml \
+	--enable-extensions="default,spellcheck" \
+	--enable-permissions \
+	--enable-cookie \
+	--enable-image-decoders="png,gif,jpeg,bmp,xbm" \
+	--enable-image-encoder=all \
+	--enable-canvas \
+	--enable-jsd \
+	--enable-xpctools \
+	--enable-crypto \
+        --enable-pango \
+	--enable-svg \
+	--enable-svg-renderer=cairo \
+	--enable-xinerama \
+	--with-pthreads \
+	--enable-gnomevfs \
+	--enable-postscript \
+	--enable-help-viewer \
+	--enable-safe-browsing \
+	--enable-xft \
+	--disable-freetype2 \
+	--disable-crashreporter \
+	--enable-optimize=-O2 \
+	--disable-prebinding \
+	--enable-strip \
+	--disable-debug \
+	--disable-installer \
+	--disable-updater \
+	--disable-pedantic \
+	--disable-tests \
+	--disable-mochitest
+
+variant debug description "build with debugging symbols" {
+    configure.args-delete   --disable-debug \
+                            --disable-mochitest \
+                            --enable-optimize='-O2' \
+                            --enable-strip
+
+    configure.args-append   --enable-debug \
+                            --enable-mochitest \
+                            --disable-optimize \
+                            --disable-strip
+}
+
+post-extract {
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
+    move ${worksrcpath}/modules/libjar/nsWildCard.cpp ${worksrcpath}/modules/libjar/nsWildCard_jar.cpp
+}
+
+# Upstream bugs (http://bugzilla.mozilla.org)
+# #485827 (xpcom-Makefile)
+# #485856 (configure)
+# #485862 (system-nss)
+# #486036 (make-install)
+# 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 
+
+post-patch {
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
+    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp 
+
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
+    reinplace "s:nsWildCard.cpp:nsWildCard_jar.cpp:g" ${worksrcpath}/modules/libjar/objs.mk
+
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
+    # find -xtype -> gfind -xtype
+    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
+
+    # Set the right install_name on the libs
+    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/config/rules.mk
+
+    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
+	${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
+	${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
+	${worksrcpath}/xulrunner/installer/Makefile.in
+}
+
+configure.env \
+	MOZCONFIG="${worksrcpath}/xulrunner/config/mozconfig" \
+	MOZILLA_FIVE_HOME="${prefix}/lib/${name}"
+
+build.args-append \
+	includedir="${prefix}/include/${name}" \
+	idldir="${prefix}/share/idl/${name}" \
+	installdir="${prefix}/lib/${name}" \
+	sdkdir="${prefix}/lib/${name}"
+
+destroot.args-append \
+	includedir="${prefix}/include/${name}" \
+	idldir="${prefix}/share/idl/${name}" \
+	installdir="${prefix}/lib/${name}" \
+	sdkdir="${prefix}/lib/${name}"
+
+# AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
+# This block helps us link correctly when we are +system_x11 and x11prefix
+# is somewhere non-standard and should cause AC_X_PATH to let us setup our
+# CPPFLAGS and LDFLAGS without interference
+pre-configure {
+    if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] } {
+        configure.cppflags-append -I${x11prefix}/include
+        configure.ldflags-append  -L${x11prefix}/lib
+    }
+}


Property changes on: trunk/dports/devel/xulrunner/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/devel/xulrunner/files/configure.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/configure.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/configure.patch	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,16 @@
+--- configure.orig	2009-03-19 21:02:35.000000000 -0700
++++ configure	2009-03-19 21:03:53.000000000 -0700
+@@ -5807,11 +5807,10 @@ case "$host" in
+     ;;
+ 
+ *-darwin*)
+-    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
+-    HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
++    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX"
++    HOST_CXXFLAGS="$HOST_CXXFLAGS -DXP_UNIX -DXP_MACOSX"
+     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
+     MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
+-    LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc'
+     ;;
+ 
+ *-linux*|*-kfreebsd*-gnu)

Added: trunk/dports/devel/xulrunner/files/make-install.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/make-install.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/make-install.patch	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,14 @@
+--- toolkit/mozapps/installer/packager.mk.bak	2009-03-30 17:04:13.000000000 -0700
++++ toolkit/mozapps/installer/packager.mk	2009-03-30 17:05:06.000000000 -0700
+@@ -410,7 +410,10 @@ make-package: stage-package
+ # dist/sdk/lib -> prefix/lib/appname-devel-version/lib
+ # prefix/lib/appname-devel-version/* symlinks to the above directories
+ install:: stage-package
+-ifneq (,$(filter WINNT Darwin,$(OS_ARCH)))
++ifneq (,$(filter WINNT,$(OS_ARCH)))
++	$(error "make install" is not supported on this platform. Use "make package" instead.)
++endif
++ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ 	$(error "make install" is not supported on this platform. Use "make package" instead.)
+ endif
+ 	$(NSINSTALL) -D $(DESTDIR)$(installdir)

Added: trunk/dports/devel/xulrunner/files/patch-dylib_file.diff
===================================================================
--- trunk/dports/devel/xulrunner/files/patch-dylib_file.diff	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/patch-dylib_file.diff	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,13 @@
+--- config/config.mk	2006-01-06 16:01:22.000000000 -0500
++++ config/config.mk	2007-08-21 13:51:05.000000000 -0400
+@@ -697,6 +697,10 @@
+ else
+ XCODE_PRODUCT_DIR = build
+ endif # HAS_XCODE_2_1=1
++# Tell the Darwin linker how to find shared libraries that are not yet installed.
++ifneq (,$(findstring -lplds4,$(EXTRA_DSO_LDOPTS)))
++EXTRA_DSO_LDOPTS += $(foreach library, $(patsubst -l%, $(LIB_PREFIX)%$(DLL_SUFFIX), $(filter -l%, $(NSPR_LIBS))), -dylib_file @executable_path/$(library):$(DIST)/bin/$(library))
++endif
+ endif # OS_ARCH=Darwin
+ 
+ 

Added: trunk/dports/devel/xulrunner/files/patch-pthread.diff
===================================================================
--- trunk/dports/devel/xulrunner/files/patch-pthread.diff	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/patch-pthread.diff	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,11 @@
+--- nsprpub/pr/include/md/_pth.h.orig	2005-07-21 20:22:53.000000000 +0200
++++ nsprpub/pr/include/md/_pth.h	2007-11-05 09:01:53.000000000 +0100
+@@ -98,7 +98,7 @@
+ #else
+ #define _PT_PTHREAD_MUTEX_IS_LOCKED(m)    (EBUSY == pthread_mutex_trylock(&(m)))
+ #endif
+-#if defined(DARWIN)
++#if defined(DARWIN) && !defined(__DARWIN_UNIX03)
+ #define _PT_PTHREAD_CONDATTR_INIT(x)      0
+ #else
+ #define _PT_PTHREAD_CONDATTR_INIT         pthread_condattr_init

Added: trunk/dports/devel/xulrunner/files/system-nss.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/system-nss.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/system-nss.patch	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,13 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=485862
+
+--- config/autoconf.mk.in.orig	2009-03-29 22:07:24.000000000 -0700
++++ config/autoconf.mk.in	2009-03-29 22:07:54.000000000 -0700
+@@ -278,7 +278,7 @@ OS_LDFLAGS	= @LDFLAGS@
+ OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@
+ OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@
+ 
+-OS_INCLUDES	= $(NSPR_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) $(LCMS_CFLAGS)
++OS_INCLUDES	= $(NSPR_CFLAGS) $(NSS_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) $(LCMS_CFLAGS)
+ OS_LIBS		= @LIBS@
+ ACDEFINES	= @MOZ_DEFINES@
+ 

Added: trunk/dports/devel/xulrunner/files/xpcom-Makefile.patch
===================================================================
--- trunk/dports/devel/xulrunner/files/xpcom-Makefile.patch	                        (rev 0)
+++ trunk/dports/devel/xulrunner/files/xpcom-Makefile.patch	2009-03-31 04:04:06 UTC (rev 48877)
@@ -0,0 +1,11 @@
+--- xpcom/stub/Makefile.in.orig	2009-03-29 20:11:15.000000000 -0700
++++ xpcom/stub/Makefile.in	2009-03-29 20:11:48.000000000 -0700
+@@ -107,7 +107,7 @@ else
+ DEPENDENT_LIBS_LIST += $(LIB_PREFIX)mozjs$(DLL_SUFFIX)
+ endif
+ 
+-ifeq (Darwin,$(OS_ARCH))
++ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ EXTRA_DSO_LDOPTS += $(DIST)/bin/XUL
+ DEPENDENT_LIBS_LIST += XUL
+ else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090330/878a4231/attachment-0001.html>


More information about the macports-changes mailing list