source: trunk/dports/devel/xulrunner/Portfile

Last change on this file was 111562, checked in by devans@…, 4 years ago

libnotify dependents: disable libnotify support where incompatible with version 0.7.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 111562 2013-09-25 20:48:33Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name            xulrunner
7set component   xulrunner
8categories      devel
9license         {MPL-1.1 LGPL-2.1+}
10version         1.9.2.16
11revision        3
12#set ff_version  3.6
13platforms       darwin
14maintainers     nomaintainer
15description     Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications
16
17long_description ${description}
18
19universal_variant no
20
21homepage        http://developer.mozilla.org/en/docs/XULRunner
22
23master_sites    http://releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/
24distname        ${component}-${version}.source
25
26#master_sites    http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${ff_version}/source
27#distname        firefox-${ff_version}.source
28
29use_bzip2       yes
30dist_subdir     ${component}
31
32checksums           md5     229fc3f629200561ad725fcddd435bf6 \
33                    sha1    57d417b19f11c7a1c067c4a63b4292dbca1d5669 \
34                    rmd160  21e4c1d9e5d1571e43d3dd11fe9085875e7691ce
35
36worksrcdir      mozilla-1.9.2
37
38depends_build \
39        port:findutils \
40        port:pkgconfig \
41        port:autoconf213
42
43depends_lib \
44        port:heimdal \
45        port:lcms \
46        port:gconf \
47        port:esound \
48        port:libcanberra \
49        port:findutils \
50        port:nss \
51        port:nspr \
52        port:gtk2 \
53        port:xorg-libXt
54
55use_autoconf yes
56autoconf.cmd autoconf213
57
58configure.args \
59        --with-xulrunner-stub-name=xulrunner-stub \
60        --disable-static \
61        --enable-shared \
62        --with-distribution-id=org.macports \
63        --enable-default-toolkit=cairo-gtk2 \
64        --x-includes=${prefix}/include \
65        --x-libraries=${prefix}/lib \
66        --with-system-nspr \
67        --with-nspr-prefix=${prefix} \
68        --with-system-nss \
69        --with-nss-prefix=${prefix} \
70        --with-system-bzip2=${prefix} \
71        --with-system-jpeg=${prefix} \
72        --with-system-zlib=${prefix} \
73        --enable-system-lcms \
74        --enable-system-cairo \
75        --enable-system-sqlite \
76        --with-default-mozilla-five-home=${prefix}/lib/${component} \
77        --enable-oji \
78        --enable-plugins \
79        --enable-mathml \
80        --enable-extensions="default,spellcheck" \
81        --enable-permissions \
82        --enable-cookie \
83        --enable-image-decoders=all \
84        --enable-image-encoder=all \
85        --enable-canvas \
86        --enable-jsd \
87        --disable-xpctools \
88        --enable-crypto \
89        --enable-pango \
90        --enable-svg \
91        --enable-svg-renderer=cairo \
92        --enable-xinerama \
93        --with-pthreads \
94        --disable-gnomevfs \
95        --disable-gnomeui \
96    --disable-libnotify \
97        --enable-postscript \
98        --enable-safe-browsing \
99        --disable-crashreporter \
100        --enable-optimize='-O2' \
101        --disable-prebinding \
102        --enable-strip \
103        --enable-install-strip \
104        --disable-debug \
105        --disable-installer \
106        --disable-updater \
107        --disable-pedantic \
108        --disable-tests \
109        --disable-mochitest \
110        --disable-necko-wifi \
111        --enable-libxul
112
113# xpctools and necko-wifi broke in 3.6b1
114
115# Force 32-bit, inline-asm
116supported_archs i386 ppc
117
118# Yes, this is ugly... but the real fix is in the works
119# https://bugzilla.mozilla.org/show_bug.cgi?id=529878
120configure.cc ${configure.cc} -arch ${configure.build_arch}
121configure.cxx ${configure.cxx} -arch ${configure.build_arch}
122
123variant debug description {build with debugging symbols} {
124    configure.args-delete   --disable-debug \
125                            --disable-mochitest \
126                            --enable-optimize='-O2' \
127                            --enable-strip \
128                            --enable-install-strip
129
130    configure.args-append   --enable-debug='-ggdb3' \
131                            --enable-mochitest \
132                            --disable-optimize \
133                            --disable-strip \
134                            --disable-install-strip
135}
136
137variant gnome description {use gnome libraries where appropriate} {
138    depends_lib-append \
139        port:gnome-vfs \
140        port:libgnomeui \
141        port:libgnome \
142        port:gnome-icon-theme
143
144    configure.args-delete --disable-gnomevfs \
145                          --disable-gnomeui
146
147    configure.args-append --enable-gnomevfs \
148                          --enable-gnomeui
149}
150
151variant internal_dependencies description {Use internal versions of nspr and nss} {
152    configure.args-delete \
153        --with-system-nspr \
154        --with-nspr-prefix=${prefix} \
155        --with-system-nss \
156        --with-nss-prefix=${prefix}
157       
158    depends_lib-delete \
159        port:nss \
160        port:nspr
161}
162
163patchfiles patch-dylib_file.diff
164
165post-patch {
166    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
167    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
168
169    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
170    # find -xtype -> gfind -xtype
171    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
172
173    # Don't use the system X11
174    reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
175
176    # Set the right install_name on the libs
177    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/config/config.mk
178    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/config/rules.mk
179    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/js/src/config/config.mk
180    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/js/src/config/rules.mk
181    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/nsprpub/configure.in
182    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/nsprpub/configure
183    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/security/coreconf/Darwin.mk
184    reinplace "s:@executable_path:${prefix}/lib/${component}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
185
186    # Fix the correct library filenames for loading at runtime
187    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsAppRootAccessible.cpp
188
189    reinplace "s:libgssapi_krb5.so.2:${prefix}/libexec/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
190
191    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
192    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
193    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
194
195    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
196
197    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/gfx/src/psshared/nsCUPSShim.cpp
198
199    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
200    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
201
202    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
203    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
204    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
205    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
206    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
207    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsFilePicker.cpp
208
209    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/qt/nsIdleServiceQt.cpp
210    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/qt/nsSound.cpp
211
212    # Set our system plugins path
213    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
214
215    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
216        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
217        ${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
218        ${worksrcpath}/xulrunner/installer/Makefile.in
219}
220
221configure.env \
222        MOZCONFIG="${worksrcpath}/xulrunner/config/mozconfig" \
223        MOZILLA_FIVE_HOME="${prefix}/lib/${component}"
224
225build.args-append \
226        includedir="${prefix}/include/${component}" \
227        idldir="${prefix}/share/idl/${component}" \
228        installdir="${prefix}/lib/${component}" \
229        sdkdir="${prefix}/lib/${component}"
230
231destroot.args-append \
232        includedir="${prefix}/include/${component}" \
233        idldir="${prefix}/share/idl/${component}" \
234        installdir="${prefix}/lib/${component}" \
235        sdkdir="${prefix}/lib/${component}"
236
237post-destroot   {
238    ## Workaround to get root certs loaded, so https:// works
239    #ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${component}/libnssckbi.dylib
240}
Note: See TracBrowser for help on using the repository browser.