source: trunk/dports/devel/xulrunner-devel/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: 10.6 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-devel
7set component   xulrunner
8categories      devel
9version         2.0
10revision        3
11#set ff_version  4.0
12platforms       darwin
13maintainers     nomaintainer
14description     Mozilla.org's runtime package that can be used to bootstrap XUL+XPCOM applications
15
16long_description ${description}
17
18universal_variant no
19
20homepage        http://developer.mozilla.org/en/docs/XULRunner
21
22master_sites    http://releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/
23distname        ${component}-${version}.source
24dist_subdir     ${component}
25
26#master_sites    http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${ff_version}/source
27#distname        firefox-${ff_version}.source
28#dist_subdir     firefox
29
30use_bzip2       yes
31
32checksums           md5     a3b387489ba1738ea504e83cb811c82a \
33                    sha1    45ce820989e0bb7b5758f94c087f21d4190c2441 \
34                    rmd160  7179df8c2af30015413db403884a729cde4a650b
35
36worksrcdir      mozilla-2.0
37
38depends_build \
39        port:findutils \
40        port:pkgconfig \
41        port:autoconf213 \
42        port:yasm
43
44depends_lib \
45        port:heimdal \
46        port:lcms \
47        port:gconf \
48        port:esound \
49        port:libcanberra \
50        port:findutils \
51        port:mesa \
52        port:nss \
53        port:nspr \
54        port:gtk2 \
55        port:xorg-libXt
56
57use_autoconf yes
58autoconf.cmd autoconf213
59
60#if {[variant_isset internal_dependencies]} {
61#        set pkg_name ${name}-standalone
62#} else {
63#        set pkg_name ${component}-x11
64#}
65
66set pkg_name ${name}
67
68configure.args \
69        --with-xulrunner-stub-name=xulrunner-stub \
70        --disable-static \
71        --enable-shared \
72        --with-distribution-id=org.macports \
73        --enable-default-toolkit=cairo-gtk2 \
74        --x-includes=${prefix}/include \
75        --x-libraries=${prefix}/lib \
76        --with-system-nspr \
77        --with-nspr-prefix=${prefix} \
78        --with-system-nss \
79        --with-nss-prefix=${prefix} \
80        --with-system-bzip2=${prefix} \
81        --with-system-jpeg=${prefix} \
82        --with-system-zlib=${prefix} \
83        --enable-system-lcms \
84        --enable-system-cairo \
85        --enable-system-sqlite \
86        --with-default-mozilla-five-home=${prefix}/lib/${pkg_name} \
87        --enable-oji \
88        --enable-plugins \
89        --enable-mathml \
90        --enable-extensions="default,spellcheck" \
91        --enable-permissions \
92        --enable-cookie \
93        --enable-image-decoders=all \
94        --enable-image-encoder=all \
95        --enable-canvas \
96        --enable-jsd \
97        --disable-xpctools \
98        --enable-crypto \
99        --enable-pango \
100        --enable-svg \
101        --enable-svg-renderer=cairo \
102        --enable-xinerama \
103        --with-pthreads \
104        --disable-gnomevfs \
105        --disable-gnomeui \
106    --disable-libnotify \
107        --enable-postscript \
108        --enable-safe-browsing \
109        --disable-crashreporter \
110        --enable-optimize='-O2' \
111        --disable-prebinding \
112        --enable-strip \
113        --enable-install-strip \
114        --disable-debug \
115        --disable-installer \
116        --disable-updater \
117        --disable-pedantic \
118        --disable-tests \
119        --disable-mochitest \
120        --disable-necko-wifi \
121        --enable-libxul
122
123# xpctools and necko-wifi broke in 3.6b1
124
125# gcc-4.0 has issues, so force gcc-4.2 on Leopard
126compiler.blacklist gcc-4.0
127
128platform darwin 8 {
129    depends_build
130    depends_lib
131    pre-fetch {
132        error "$name requires Core Text which is only available on OS X 10.5+"
133    }
134}
135
136# Yes, this is ugly... but the real fix is in the works
137# https://bugzilla.mozilla.org/show_bug.cgi?id=529878
138configure.cc ${configure.cc} -arch ${configure.build_arch}
139configure.cxx ${configure.cxx} -arch ${configure.build_arch}
140
141variant debug description {build with debugging symbols} {
142    configure.args-delete   --disable-debug \
143                            --disable-mochitest \
144                            --enable-optimize='-O2' \
145                            --enable-strip \
146                            --enable-install-strip
147
148    configure.args-append   --enable-debug='-ggdb3' \
149                            --enable-mochitest \
150                            --disable-optimize \
151                            --disable-strip \
152                            --disable-install-strip
153}
154
155variant gnome description {use gnome libraries where appropriate} {
156    depends_lib-append \
157        port:gnome-vfs \
158        port:libgnomeui \
159        port:libgnome \
160        port:gnome-icon-theme
161
162    configure.args-delete --disable-gnomevfs \
163                          --disable-gnomeui
164
165    configure.args-append --enable-gnomevfs \
166                          --enable-gnomeui
167}
168
169variant internal_dependencies description {Use internal versions of nspr and nss} {
170    configure.args-delete \
171        --with-system-nspr \
172        --with-nspr-prefix=${prefix} \
173        --with-system-nss \
174        --with-nss-prefix=${prefix} \
175        --with-system-bzip2=${prefix} \
176        --with-system-jpeg=${prefix} \
177        --with-system-zlib=${prefix} \
178        --enable-system-lcms \
179        --enable-system-cairo \
180        --enable-system-sqlite
181
182    configure.args-append \
183        --disable-system-lcms \
184        --disable-system-cairo \
185        --disable-system-sqlite       
186       
187    depends_lib-delete \
188        port:lcms \
189        port:nss \
190        port:nspr
191}
192
193# plugin-instance-nococoa.patch : https://bugzilla.mozilla.org/show_bug.cgi?id=587370
194patchfiles patch-dylib_file.diff plugin-instance-nococoa.patch
195
196post-patch {
197    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
198    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
199
200    # https://bugzilla.mozilla.org/show_bug.cgi?id=641755
201    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/gfx/ycbcr/update.sh
202    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/gfx/ycbcr/yuv_row_posix.cpp
203
204    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
205    # find -xtype -> gfind -xtype
206    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
207
208    # Don't use the system X11
209    reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
210
211    # Set the right install_name on the libs
212    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/config.mk
213    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/rules.mk
214    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/config.mk
215    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/rules.mk
216    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure.in
217    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure
218    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
219    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
220
221    # Fix the correct library filenames for loading at runtime
222    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsApplicationAccessibleWrap.cpp
223
224    reinplace "s:libgssapi_krb5.so.2:${prefix}/libexec/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
225
226    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
227    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
228    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
229
230    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
231
232    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/widget/src/gtk2/nsCUPSShim.cpp
233
234    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
235    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
236
237    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_linux.cpp
238    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_linux.cpp
239
240    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
241
242    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
243    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
244    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
245    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
246    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
247
248    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/dom/plugins/PluginModuleChild.cpp
249
250    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/qt/nsIdleServiceQt.cpp
251    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/qt/nsSound.cpp
252
253    # Set our system plugins path
254    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
255
256    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
257        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
258        ${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
259        ${worksrcpath}/xulrunner/installer/Makefile.in
260}
261
262configure.env \
263        MOZCONFIG="${worksrcpath}/xulrunner/config/mozconfig" \
264        MOZILLA_FIVE_HOME="${prefix}/lib/${pkg_name}"
265
266build.args-append \
267        includedir="${prefix}/include/${pkg_name}" \
268        idldir="${prefix}/share/idl/${pkg_name}" \
269        installdir="${prefix}/lib/${pkg_name}" \
270        sdkdir="${prefix}/lib/${pkg_name}"
271
272destroot.args-append \
273        includedir="${prefix}/include/${pkg_name}" \
274        idldir="${prefix}/share/idl/${pkg_name}" \
275        installdir="${prefix}/lib/${pkg_name}" \
276        sdkdir="${prefix}/lib/${pkg_name}"
277
278post-destroot   {
279    move ${destroot}${prefix}/bin/${component} ${destroot}${prefix}/bin/${pkg_name}
280    if {![variant_isset internal_dependencies]} {
281        ln -s ${pkg_name} ${destroot}${prefix}/bin/${component}
282
283        # Workaround to get root certs loaded, so https:// works
284        ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${pkg_name}/libnssckbi.dylib
285    }
286}
287
288livecheck.type  regex
289livecheck.url   http://releases.mozilla.org/pub/mozilla.org/${component}/releases
290livecheck.regex ">(\\d+(?:\\.\\d+)*).<"
Note: See TracBrowser for help on using the repository browser.