source: trunk/dports/www/firefox-x11-devel/Portfile @ 54958

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

firefox-x11-devel: Bump to 3.5.2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.1 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 54958 2009-08-05 00:27:05Z jeremyhu@macports.org $
3
4PortSystem      1.0
5
6name            firefox-x11-devel
7set component   firefox
8categories      www x11
9version         3.5.2
10platforms       darwin
11maintainers     jeremyhu openmaintainer
12description     Mozilla.org's popular stand-alone web browser, Beta and Release Candidates
13
14long_description \
15    Firefox empowers you to browse faster, more safely and more \
16    efficiently than with any other browser.
17
18universal_variant no
19
20homepage        http://www.mozilla.com/${component}/
21master_sites    http://mozilla.isc.org/pub/mozilla.org/${component}/releases/${version}/source/ \
22                http://www.mirrorservice.org/sites/releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/ \
23                http://mirror.internode.on.net/pub/mozilla/${component}/releases/${version}/source/ \
24                http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org/${component}/releases/${version}/source/ \
25                http://mirror.yandex.ru/mozilla/${component}/releases/${version}/source/ \
26                http://mozilla.c3sl.ufpr.br/releases/${component}/releases/${version}/source/ \
27                http://releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/
28distname        ${component}-${version}-source
29use_bzip2       yes
30
31checksums           md5     136867f95c86f3988b7f825e874b85de \
32                    sha1    6439923ff9d316297926ebe193bac3ac1a41b494 \
33                    rmd160  d5e0b5f0e8b19b216394584ccabf37d776b89a39
34
35worksrcdir      mozilla-1.9.1
36
37depends_build \
38        port:findutils \
39        port:pkgconfig \
40        port:autoconf213
41
42depends_lib \
43        port:xulrunner-devel
44
45use_autoconf yes
46autoconf.cmd autoconf213
47
48if {[variant_isset internal_dependencies]} {
49        set pkg_name ${name}-standalone
50} else {
51        set pkg_name ${component}-x11
52}
53
54configure.args \
55        --with-xulrunner-stub-name=xulrunner-stub \
56        --disable-static \
57        --enable-shared \
58        --disable-official-branding \
59        --with-branding=browser/branding/unofficial \
60        --with-distribution-id=org.macports \
61        --enable-default-toolkit=cairo-gtk2 \
62        --x-includes=${prefix}/include \
63        --x-libraries=${prefix}/lib \
64        --with-system-nspr \
65        --with-nspr-prefix=${prefix} \
66        --with-system-nss \
67        --with-nss-prefix=${prefix} \
68        --with-system-libxul \
69        --with-libxul-sdk=${prefix}/lib/xulrunner \
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/${pkg_name} \
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        --enable-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        --enable-postscript \
97        --enable-safe-browsing \
98        --disable-crashreporter \
99        --enable-optimize='-O2' \
100        --disable-prebinding \
101        --enable-strip \
102        --enable-install-strip \
103        --disable-debug \
104        --disable-installer \
105        --disable-updater \
106        --disable-pedantic \
107        --disable-tests \
108        --disable-mochitest
109
110variant debug description {build with debugging symbols} {
111    configure.args-delete   --disable-debug \
112                            --disable-mochitest \
113                            --enable-optimize='-O2' \
114                            --enable-strip \
115                            --enable-install-strip
116
117    configure.args-append   --enable-debug='-ggdb3' \
118                            --enable-mochitest \
119                            --disable-optimize \
120                            --disable-strip \
121                            --disable-install-strip
122}
123
124variant gnome description {use gnome libraries where appropriate} {
125    depends_lib-append \
126        port:gnome-vfs \
127        port:libgnomeui \
128        port:libgnome \
129        port:gnome-icon-theme
130
131    configure.args-delete --disable-gnomevfs \
132                          --disable-gnomeui
133
134    configure.args-append --enable-gnomevfs \
135                          --enable-gnomeui
136}
137
138variant official_branding description {Enables official Firefox branding.  You may not redistribute resulting packages built with this variant.} {
139    configure.args-delete \
140        --disable-official-branding \
141        --with-branding=browser/branding/unofficial
142    configure.args-append \
143        --enable-official-branding
144}
145
146variant internal_dependencies description {Use internal versions of nspr, nss, and xulrunner} {
147    configure.args-delete \
148        --with-system-nspr \
149        --with-nspr-prefix=${prefix} \
150        --with-system-nss \
151        --with-nss-prefix=${prefix} \
152        --with-system-libxul \
153        --with-libxul-sdk=${prefix}/lib/xulrunner
154
155    configure.args-append \
156        --enable-libxul
157
158    depends_lib-delete \
159        port:xulrunner-devel
160
161    depends_lib-append \
162        port:heimdal \
163        port:lcms \
164        port:gconf \
165        port:esound \
166        port:libcanberra \
167        port:findutils \
168        port:gtk2 \
169        port:xorg-libXt
170}
171
172post-extract {
173    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
174    move ${worksrcpath}/modules/libjar/nsWildCard.cpp ${worksrcpath}/modules/libjar/nsWildCard_jar.cpp
175}
176
177# Upstream bugs (http://bugzilla.mozilla.org)
178# #485827 (xpcom-Makefile, in mozilla-1.9.2)
179# #486782 (configure, in mozilla-1.9.2)
180# #485862 (system-nss, in mozilla-1.9.2)
181# #486036 (make-install, in mozilla-1.9.2)
182# #485863 (icon-Makefile, in mozilla-1.9.2)
183# #492119 (nsFilePicker)
184# #486892 (plugins, in mozilla-1.9.2)
185# #486890 (sydneyaudio, 3.1b3 and later, in mozilla-1.9.2)
186# #487367 (browser-xulrunner-stub, in mozilla-1.9.2)
187# #484457 (gdk-Status, in mozilla-1.9.2)
188# #487371 (xulrunner-app-Makefile, in mozilla-1.9.2)
189# #492138 #490995 (netwerk-wifi-src-Makefile, in mozilla-1.9.2)
190# Previous firefox-x11 port, not sure if still needed, but safe to keep: patch-dylib_file.diff
191patchfiles configure.patch xpcom-Makefile.patch system-nss.patch make-install.patch patch-dylib_file.diff icon-Makefile.patch nsFilePicker.patch plugins.patch sydneyaudio.patch browser-xulrunner-stub.patch gdk-Status.patch xulrunner-app-Makefile.patch netwerk-wifi-src-Makefile.patch
192
193post-patch {
194    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
195    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
196
197    # https://bugzilla.mozilla.org/show_bug.cgi?id=484353
198    reinplace "s:nsWildCard.cpp:nsWildCard_jar.cpp:g" ${worksrcpath}/modules/libjar/objs.mk
199
200    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
201    # find -xtype -> gfind -xtype
202    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
203
204    if {[file exists ${prefix}/lib/pkgconfig/x11.pc]} {
205        reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
206    }
207
208    # Set the right install_name on the libs
209    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/rules.mk
210    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/config.mk
211    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure.in
212    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure
213    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
214    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
215
216    # Fix the correct library filenames for loading at runtime
217    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsAppRootAccessible.cpp
218
219    reinplace "s:libgssapi_krb5.so.2:${prefix}/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
220
221    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
222    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
223    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
224
225    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
226
227    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/gfx/src/psshared/nsCUPSShim.cpp
228
229    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
230    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
231
232    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
233    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
234    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
235    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
236    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
237    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsFilePicker.cpp
238
239    # Set our system plugins path
240    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
241
242    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
243        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
244        ${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
245        ${worksrcpath}/xulrunner/installer/Makefile.in
246}
247
248configure.env \
249        MOZCONFIG="${worksrcpath}/browser/config/mozconfig" \
250        MOZILLA_FIVE_HOME="${prefix}/lib/${pkg_name}"
251
252build.args-append \
253        includedir="${prefix}/include/${pkg_name}" \
254        idldir="${prefix}/share/idl/${pkg_name}" \
255        installdir="${prefix}/lib/${pkg_name}" \
256        sdkdir="${prefix}/lib/${pkg_name}" \
257        SKIP_COPY_XULRUNNER=1
258
259destroot.args-append \
260        includedir="${prefix}/include/${pkg_name}" \
261        idldir="${prefix}/share/idl/${pkg_name}" \
262        installdir="${prefix}/lib/${pkg_name}" \
263        sdkdir="${prefix}/lib/${pkg_name}" \
264        SKIP_COPY_XULRUNNER=1
265
266post-destroot   {
267    file mkdir ${destroot}${prefix}/share/applications
268
269    copy \
270        ${filespath}/share-applications-${component}.desktop \
271        ${destroot}${prefix}/share/applications/${name}.desktop
272
273    move ${destroot}${prefix}/bin/${component} ${destroot}${prefix}/bin/${pkg_name}
274    if {![variant_isset internal_dependencies]} {
275        ln -s ${pkg_name} ${destroot}${prefix}/bin/${component}
276
277        # Workaround to get root certs loaded, so https:// works
278        ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${pkg_name}/libnssckbi.dylib
279    } else {
280        # https://bugzilla.mozilla.org/show_bug.cgi?id=486064
281        system "cat ${worksrcpath}/dist/include/gfx/gfxtypes.h ${worksrcpath}/dist/include/thebes/gfxTypes.h > ${destroot}${prefix}/include/${pkg_name}/unstable/gfxtypes.h"
282    }
283}
284
285livecheck.check regex
286livecheck.url   http://releases.mozilla.org/pub/mozilla.org/${component}/releases
287livecheck.regex ">(\\d+(?:\\.\\d+)*).<"
Note: See TracBrowser for help on using the repository browser.