source: trunk/dports/www/firefox-x11/Portfile @ 69820

Last change on this file since 69820 was 69820, checked in by michaelld@…, 7 years ago

Update location of Heimdal.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.2 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 69820 2010-07-17 03:38:51Z michaelld@macports.org $
3
4PortSystem      1.0
5PortGroup       archcheck 1.0
6
7name            firefox-x11
8set component   firefox
9categories      www x11
10version         3.6.6
11platforms       darwin
12maintainers     jeremyhu openmaintainer
13description     Mozilla.org's popular stand-alone web browser, Beta and Release Candidates
14
15long_description \
16    Firefox empowers you to browse faster, more safely and more \
17    efficiently than with any other browser.
18
19universal_variant no
20
21homepage        http://www.mozilla.com/${component}/
22master_sites    http://mozilla.isc.org/pub/mozilla.org/${component}/releases/${version}/source/ \
23                http://www.mirrorservice.org/sites/releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/ \
24                http://mirror.internode.on.net/pub/mozilla/${component}/releases/${version}/source/ \
25                http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org/${component}/releases/${version}/source/ \
26                http://mirror.yandex.ru/mozilla/${component}/releases/${version}/source/ \
27                http://mozilla.c3sl.ufpr.br/releases/${component}/releases/${version}/source/ \
28                http://releases.mozilla.org/pub/mozilla.org/${component}/releases/${version}/source/
29distname        ${component}-${version}.source
30use_bzip2       yes
31
32checksums           md5     c9a071b31bb90d05edfb93117d0a7537 \
33                    sha1    907bbf357bd652893a58fbb641f7e7b2b4dc1f57 \
34                    rmd160  c1cf5b72ae42e9ce98b8decfe889c332e78850c8
35
36worksrcdir      mozilla-1.9.2
37
38depends_build \
39        port:findutils \
40        port:pkgconfig \
41        port:autoconf213
42
43depends_lib \
44        port:xulrunner
45
46use_autoconf yes
47autoconf.cmd autoconf213
48
49if {[variant_isset internal_dependencies]} {
50        set pkg_name ${name}-standalone
51} else {
52        set pkg_name ${component}-x11
53}
54
55configure.args \
56        --with-xulrunner-stub-name=xulrunner-stub \
57        --disable-static \
58        --enable-shared \
59        --disable-official-branding \
60        --with-branding=browser/branding/unofficial \
61        --with-distribution-id=org.macports \
62        --enable-default-toolkit=cairo-gtk2 \
63        --x-includes=${prefix}/include \
64        --x-libraries=${prefix}/lib \
65        --with-system-nspr \
66        --with-nspr-prefix=${prefix} \
67        --with-system-nss \
68        --with-nss-prefix=${prefix} \
69        --with-system-libxul \
70        --with-libxul-sdk=${prefix}/lib/xulrunner \
71        --with-system-bzip2=${prefix} \
72        --with-system-jpeg=${prefix} \
73        --with-system-zlib=${prefix} \
74        --enable-system-lcms \
75        --enable-system-cairo \
76        --enable-system-sqlite \
77        --with-default-mozilla-five-home=${prefix}/lib/${pkg_name} \
78        --enable-oji \
79        --enable-plugins \
80        --enable-mathml \
81        --enable-extensions="default,spellcheck" \
82        --enable-permissions \
83        --enable-cookie \
84        --enable-image-decoders=all \
85        --enable-image-encoder=all \
86        --enable-canvas \
87        --enable-jsd \
88        --disable-xpctools \
89        --enable-crypto \
90        --enable-pango \
91        --enable-svg \
92        --enable-svg-renderer=cairo \
93        --enable-xinerama \
94        --with-pthreads \
95        --disable-gnomevfs \
96        --disable-gnomeui \
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
112# xpctools and necko-wifi broke in 3.6b1
113
114# Force 32-bit, inline-asm
115if {$build_arch == "x86_64"} {
116    configure.build_arch i386
117
118    # Yes, this is ugly... but the real fix is in the works
119    # https://bugzilla.mozilla.org/show_bug.cgi?id=529878
120    configure.cc ${configure.cc} -arch i386
121    configure.cxx ${configure.cxx} -arch i386
122
123    # Take this out when we ship >1.8.1
124    configure.ldflags-append -arch i386
125} elseif {$build_arch == "ppc64"} {
126    configure.build_arch ppc
127
128    # Yes, this is ugly... but the real fix is in the works
129    # https://bugzilla.mozilla.org/show_bug.cgi?id=529878
130    configure.cc ${configure.cc} -arch ppc
131    configure.cxx ${configure.cxx} -arch ppc
132
133    # Take this out when we ship >1.8.1
134    configure.ldflags-append -arch ppc
135}
136
137variant debug description {build with debugging symbols} {
138    configure.args-delete   --disable-debug \
139                            --disable-mochitest \
140                            --enable-optimize='-O2' \
141                            --enable-strip \
142                            --enable-install-strip
143
144    configure.args-append   --enable-debug='-ggdb3' \
145                            --enable-mochitest \
146                            --disable-optimize \
147                            --disable-strip \
148                            --disable-install-strip
149}
150
151variant gnome description {use gnome libraries where appropriate} {
152    depends_lib-append \
153        port:gnome-vfs \
154        port:libgnomeui \
155        port:libgnome \
156        port:gnome-icon-theme
157
158    configure.args-delete --disable-gnomevfs \
159                          --disable-gnomeui
160
161    configure.args-append --enable-gnomevfs \
162                          --enable-gnomeui
163}
164
165variant official_branding description {Enables official Firefox branding.  You may not redistribute resulting packages built with this variant.} {
166    configure.args-delete \
167        --disable-official-branding \
168        --with-branding=browser/branding/unofficial
169    configure.args-append \
170        --enable-official-branding
171}
172
173variant internal_dependencies description {Use internal versions of nspr, nss, and xulrunner} {
174    configure.args-delete \
175        --with-system-nspr \
176        --with-nspr-prefix=${prefix} \
177        --with-system-nss \
178        --with-nss-prefix=${prefix} \
179        --with-system-libxul \
180        --with-libxul-sdk=${prefix}/lib/xulrunner
181
182    configure.args-append \
183        --enable-libxul
184
185    depends_lib-delete \
186        port:xulrunner-devel
187
188    depends_lib-append \
189        port:heimdal \
190        port:lcms \
191        port:gconf \
192        port:esound \
193        port:libcanberra \
194        port:findutils \
195        port:gtk2 \
196        port:xorg-libXt \
197        port:libnotify
198
199    archcheck.files-append \
200        libexec/heimdal/lib/libkrb5.dylib \
201        lib/libcanberra.dylib \
202        lib/libgconf-2.dylib \
203        lib/libgtk-x11-2.0.dylib \
204        lib/liblcms.dylib \
205        lib/libnotify.dylib \
206        lib/libXt.dylib
207}
208
209patchfiles patch-dylib_file.diff 527612.patch 549746.patch
210
211post-patch {
212    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
213    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
214
215    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
216    # find -xtype -> gfind -xtype
217    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
218
219     # Don't use the system X11
220     reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/modules/plugin/base/src/nsPluginsDirUnix.cpp
221
222    # Set the right install_name on the libs
223    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/config.mk
224    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/rules.mk
225    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/config.mk
226    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/rules.mk
227    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/config.mk
228    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure.in
229    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure
230    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
231    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
232
233    # Fix the correct library filenames for loading at runtime
234    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsAppRootAccessible.cpp
235
236    reinplace "s:libgssapi_krb5.so.2:${prefix}/libexec/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
237
238    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
239    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
240    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
241
242    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
243
244    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/gfx/src/psshared/nsCUPSShim.cpp
245
246    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
247    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
248
249    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
250    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
251    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
252    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
253    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
254    reinplace "s:libgtk-x11-2.0.dylib:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsFilePicker.cpp
255
256    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/qt/nsIdleServiceQt.cpp
257    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/qt/nsSound.cpp
258
259    # Set our system plugins path
260    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
261
262    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
263        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h \
264        ${worksrcpath}/xulrunner/app/nsRegisterGREUnix.cpp \
265        ${worksrcpath}/xulrunner/installer/Makefile.in
266}
267
268configure.env \
269        MOZCONFIG="${worksrcpath}/browser/config/mozconfig" \
270        MOZILLA_FIVE_HOME="${prefix}/lib/${pkg_name}"
271
272build.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        SKIP_COPY_XULRUNNER=1
278
279destroot.args-append \
280        includedir="${prefix}/include/${pkg_name}" \
281        idldir="${prefix}/share/idl/${pkg_name}" \
282        installdir="${prefix}/lib/${pkg_name}" \
283        sdkdir="${prefix}/lib/${pkg_name}" \
284        SKIP_COPY_XULRUNNER=1
285
286post-destroot   {
287    file mkdir ${destroot}${prefix}/share/applications
288
289    copy \
290        ${filespath}/share-applications-${component}.desktop \
291        ${destroot}${prefix}/share/applications/${name}.desktop
292
293    move ${destroot}${prefix}/bin/${component} ${destroot}${prefix}/bin/${pkg_name}
294    if {![variant_isset internal_dependencies]} {
295        ln -s ${pkg_name} ${destroot}${prefix}/bin/${component}
296
297        # Workaround to get root certs loaded, so https:// works
298        ln -s ${prefix}/lib/nss/libnssckbi.dylib ${destroot}${prefix}/lib/${pkg_name}/libnssckbi.dylib
299    } 
300}
301
302livecheck.type  regex
303livecheck.url   http://releases.mozilla.org/pub/mozilla.org/${component}/releases
304livecheck.regex ">(\\d+(?:\\.\\d+)*).<"
Note: See TracBrowser for help on using the repository browser.