source: trunk/dports/devel/xulrunner/Portfile @ 52873

Last change on this file since 52873 was 52873, checked in by jeremyhu@…, 11 years ago

xulrunner-devel: Upgrade 1.9.0.11

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.1 KB
Line 
1# $Id: Portfile 52873 2009-06-25 00:48:00Z jeremyhu@macports.org $
2
3PortSystem      1.0
4
5name            xulrunner
6version         1.9.0.11
7categories      devel
8maintainers     jeremyhu openmaintainer
9platforms       darwin
10description     Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications
11
12long_description ${description}
13
14homepage        http://developer.mozilla.org/en/docs/XULRunner
15master_sites    http://mozilla.isc.org/pub/mozilla.org/xulrunner/releases/${version}/source
16
17distname        ${name}-${version}-source
18use_bzip2       yes
19
20checksums           md5     b509f7c05e9566ed290e2c098316c7c3 \
21                    sha1    ca792dcdb67af40c91a4fcece25d6adfb6fef2c3 \
22                    rmd160  d07a97e0a309bb7a872ba256bc270ee47b2c938b
23
24# nspr and nss aren't universal
25universal_variant no
26
27worksrcdir      mozilla
28
29depends_lib \
30        port:heimdal \
31        port:lcms \
32        port:gconf \
33        port:esound \
34        port:libcanberra \
35        port:findutils \
36        port:nss \
37        port:nspr \
38        port:gtk2 \
39        port:xorg-libXt
40
41configure.args \
42        --with-xulrunner-stub-name=xulrunner-stub \
43        --disable-static \
44        --enable-shared \
45        --with-distribution-id=org.macports \
46        --enable-default-toolkit=cairo-gtk2 \
47        --x-includes=${prefix}/include \
48        --x-libraries=${prefix}/lib \
49        --with-system-nspr \
50        --with-nspr-prefix=${prefix} \
51        --with-system-nss \
52        --with-nss-prefix=${prefix} \
53        --with-system-bzip2=${prefix} \
54        --with-system-jpeg=${prefix} \
55        --with-system-zlib=${prefix} \
56        --enable-system-lcms \
57        --enable-system-cairo \
58        --enable-system-sqlite \
59        --with-default-mozilla-five-home=${prefix}/lib/${name} \
60        --enable-oji \
61        --enable-plugins \
62        --enable-mathml \
63        --enable-extensions="default,spellcheck" \
64        --enable-permissions \
65        --enable-cookie \
66        --enable-image-decoders=all \
67        --enable-image-encoder=all \
68        --enable-canvas \
69        --enable-jsd \
70        --enable-xpctools \
71        --enable-crypto \
72        --enable-pango \
73        --enable-svg \
74        --enable-svg-renderer=cairo \
75        --enable-xinerama \
76        --with-pthreads \
77        --disable-gnomevfs \
78        --disable-gnomeui \
79        --enable-postscript \
80        --enable-safe-browsing \
81        --disable-crashreporter \
82        --enable-optimize='-O2' \
83        --disable-prebinding \
84        --enable-strip \
85        --enable-install-strip \
86        --disable-debug \
87        --disable-installer \
88        --disable-updater \
89        --disable-pedantic \
90        --disable-tests \
91        --disable-mochitest
92
93variant debug description "build with debugging symbols" {
94    configure.args-delete   --disable-debug \
95                            --disable-mochitest \
96                            --enable-optimize='-O2' \
97                            --enable-strip \
98                            --enable-install-strip
99
100    configure.args-append   --enable-debug='-ggdb3' \
101                            --enable-mochitest \
102                            --disable-optimize \
103                            --disable-strip \
104                            --disable-install-strip
105}
106
107variant gnome description {use gnome libraries where appropriate} {
108    depends_lib-append \
109        port:gnome-vfs \
110        port:libgnomeui \
111        port:libgnome \
112        port:gnome-icon-theme
113
114    configure.args-delete --disable-gnomevfs \
115                          --disable-gnomeui
116
117    configure.args-append --enable-gnomevfs \
118                          --enable-gnomeui
119}
120
121post-extract {
122    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
123    move ${worksrcpath}/modules/libjar/nsWildCard.cpp ${worksrcpath}/modules/libjar/nsWildCard_jar.cpp
124}
125
126# Upstream bugs (http://bugzilla.mozilla.org)
127# #485827 (xpcom-Makefile)
128# #485856 (configure)
129# #485862 (system-nss)
130# #486036 (make-install)
131# #485863 (icon-Makefile)
132# NOTFILED (nsFilePicker)
133# #486892 (plugins)
134# #487367 (browser-xulrunner-stub)
135# #487371 (xulrunner-app-Makefile)
136# Previous firefox-x11 port (patch-dylib_file.diff patch-pthread.diff)
137patchfiles 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
138
139post-patch {
140    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
141    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
142
143    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
144    reinplace "s:nsWildCard.cpp:nsWildCard_jar.cpp:g" ${worksrcpath}/modules/libjar/objs.mk
145
146    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
147    # find -xtype -> gfind -xtype
148    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
149
150    if {[file exists ${prefix}/lib/pkgconfig/x11.pc]} {
151        reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
152    }
153
154    # Set the right install_name on the libs
155    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/config/rules.mk
156    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/config/config.mk
157    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/nsprpub/configure.in
158    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/nsprpub/configure
159    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
160    reinplace "s:@executable_path:${prefix}/lib/${name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
161
162    # Fix the correct library filenames for loading at runtime
163    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsAppRootAccessible.cpp
164
165    reinplace "s:libgssapi_krb5.so.2:${prefix}/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
166
167    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
168    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
169    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
170
171    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
172
173    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/gfx/src/psshared/nsCUPSShim.cpp
174
175    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
176    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
177
178    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
179    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
180    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
181    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
182    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
183    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsFilePicker.cpp
184
185    # Set our system plugins path
186    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
187
188    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
189        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
190        ${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
191        ${worksrcpath}/xulrunner/installer/Makefile.in
192}
193
194configure.env \
195        MOZCONFIG="${worksrcpath}/xulrunner/config/mozconfig" \
196        MOZILLA_FIVE_HOME="${prefix}/lib/${name}"
197
198build.args-append \
199        includedir="${prefix}/include/${name}" \
200        idldir="${prefix}/share/idl/${name}" \
201        installdir="${prefix}/lib/${name}" \
202        sdkdir="${prefix}/lib/${name}"
203
204destroot.args-append \
205        includedir="${prefix}/include/${name}" \
206        idldir="${prefix}/share/idl/${name}" \
207        installdir="${prefix}/lib/${name}" \
208        sdkdir="${prefix}/lib/${name}"
209
210post-destroot {
211    # Workaround to get root certs loaded, so https:// works
212    ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${name}/libnssckbi.dylib
213
214    # https://bugzilla.mozilla.org/show_bug.cgi?id=486064
215    system "cat ${worksrcpath}/dist/include/gfx/gfxtypes.h ${worksrcpath}/dist/include/thebes/gfxTypes.h > ${destroot}${prefix}/include/${name}/unstable/gfxtypes.h"
216}
Note: See TracBrowser for help on using the repository browser.