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

Last change on this file since 87969 was 87879, checked in by jeremyhu@…, 8 years ago

firefox-x11*: Set supported_archs i386 x86_64

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.7 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 87879 2011-12-10 18:22:31Z jeremyhu@macports.org $
3
4PortSystem      1.0
5PortGroup       archcheck 1.0
6
7name            firefox-x11-devel
8set component   firefox
9categories      www x11
10version         9.0_alpha20110820
11revision        2
12platforms       darwin
13maintainers     jeremyhu openmaintainer
14description     Mozilla.org's popular stand-alone web browser, Beta and Release Candidates
15
16long_description \
17    Firefox empowers you to browse faster, more safely and more \
18    efficiently than with any other browser.
19
20universal_variant no
21supported_archs i386 x86_64
22
23homepage        http://www.mozilla.com/${component}/
24
25fetch.type      hg
26hg.url          http://hg.mozilla.org/mozilla-central
27hg.tag          6dc468c41136
28
29worksrcdir      mozilla-central
30
31depends_build \
32        port:findutils \
33        port:pkgconfig \
34        port:autoconf213 \
35        port:yasm
36
37depends_lib \
38        port:heimdal \
39        port:gconf \
40        port:esound \
41        port:libcanberra \
42        port:findutils \
43        port:gtk2 \
44        port:mesa \
45        port:xorg-libXt \
46        port:libnotify
47
48archcheck.files \
49        libexec/heimdal/lib/libkrb5.dylib \
50        lib/libcanberra.dylib \
51        lib/libgconf-2.dylib \
52        lib/libgtk-x11-2.0.dylib \
53        lib/libnotify.dylib \
54        lib/libXt.dylib
55
56use_autoconf yes
57autoconf.cmd autoconf213
58
59set pkg_name ${name}
60
61configure.args \
62        --with-xulrunner-stub-name=xulrunner-stub \
63        --disable-static \
64        --enable-shared \
65        --disable-official-branding \
66        --with-branding=browser/branding/unofficial \
67        --with-distribution-id=org.macports \
68        --enable-default-toolkit=cairo-gtk2 \
69        --x-includes=${prefix}/include \
70        --x-libraries=${prefix}/lib \
71        --enable-libxul \
72        --disable-system-lcms \
73        --disable-system-cairo \
74        --disable-system-sqlite \
75        --with-default-mozilla-five-home=${prefix}/lib/${pkg_name} \
76        --enable-oji \
77        --enable-plugins \
78        --enable-mathml \
79        --enable-extensions="default,spellcheck" \
80        --enable-permissions \
81        --enable-cookie \
82        --enable-image-decoders=all \
83        --enable-image-encoder=all \
84        --enable-canvas \
85        --enable-jsd \
86        --disable-xpctools \
87        --enable-crypto \
88        --enable-pango \
89        --enable-svg \
90        --enable-svg-renderer=cairo \
91        --enable-xinerama \
92        --with-pthreads \
93        --disable-gnomevfs \
94        --disable-gnomeui \
95        --enable-postscript \
96        --enable-safe-browsing \
97        --disable-crashreporter \
98        --enable-optimize='-O2' \
99        --disable-prebinding \
100        --enable-strip \
101        --enable-install-strip \
102        --disable-debug \
103        --disable-installer \
104        --disable-updater \
105        --disable-pedantic \
106        --disable-tests \
107        --disable-mochitest \
108        --disable-necko-wifi
109
110# xpctools and necko-wifi broke in 3.6b1
111
112# XCode 3.1's gcc-4.0 and gcc-4.2 have issues
113# llvm-gcc-4.2 has trouble with some of the mmx asm
114if {${configure.compiler} == "gcc-4.0"} {
115    depends_build-append path:bin/clang:clang
116    configure.compiler macports-clang
117} elseif {${configure.compiler} == "llvm-gcc-4.2"} {
118    configure.compiler clang
119}
120
121# Yes, this is ugly... but the real fix is in the works
122# https://bugzilla.mozilla.org/show_bug.cgi?id=529878
123configure.cc ${configure.cc} -arch ${configure.build_arch}
124configure.cxx ${configure.cxx} -arch ${configure.build_arch}
125
126variant debug description {build with debugging symbols} {
127    configure.args-delete   --disable-debug \
128                            --disable-mochitest \
129                            --enable-optimize='-O2' \
130                            --enable-strip \
131                            --enable-install-strip
132
133    configure.args-append   --enable-debug='-ggdb3' \
134                            --enable-mochitest \
135                            --disable-optimize \
136                            --disable-strip \
137                            --disable-install-strip
138}
139
140variant gnome description {use gnome libraries where appropriate} {
141    depends_lib-append \
142        port:gnome-vfs \
143        port:libgnomeui \
144        port:libgnome \
145        port:gnome-icon-theme
146
147    configure.args-delete --disable-gnomevfs \
148                          --disable-gnomeui
149
150    configure.args-append --enable-gnomevfs \
151                          --enable-gnomeui
152}
153
154variant official_branding description {Enables official Firefox branding.  You may not redistribute resulting packages built with this variant.} {
155    configure.args-delete \
156        --disable-official-branding \
157        --with-branding=browser/branding/unofficial
158    configure.args-append \
159        --enable-official-branding
160}
161
162patchfiles patch-dylib_file.diff egrep.patch
163
164post-patch {
165    # https://bugzilla.mozilla.org/show_bug.cgi?id=485857
166    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/xpcom/base/nsStackWalk.cpp
167
168    # https://bugzilla.mozilla.org/show_bug.cgi?id=641755
169    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/gfx/ycbcr/update.sh
170    reinplace "s:XP_MACOSX:__APPLE__:g" ${worksrcpath}/gfx/ycbcr/yuv_row_posix.cpp
171
172    # https://bugzilla.mozilla.org/show_bug.cgi?id=486034
173    # find -xtype -> gfind -xtype
174    reinplace "s:find:gfind:g" ${worksrcpath}/toolkit/mozapps/installer/packager.mk
175
176    # Don't use the system X11
177    reinplace "s:/usr/X11R6:${prefix}:" ${worksrcpath}/dom/plugins/base/nsPluginsDirUnix.cpp
178    reinplace "s/libXt.so.6:libXext.so/libXt.dylib:libXext.dylib/" ${worksrcpath}/dom/plugins/base/nsPluginsDirUnix.cpp
179
180    # Set the right install_name on the libs
181    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/config.mk
182    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/config/rules.mk
183    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/config.mk
184    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/js/src/config/rules.mk
185    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure.in
186    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/nsprpub/configure
187    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/coreconf/Darwin.mk
188    reinplace "s:@executable_path:${prefix}/lib/${pkg_name}:g" ${worksrcpath}/security/nss/lib/freebl/config.mk
189
190    # Fix the correct library filenames for loading at runtime
191    reinplace "s:libatk-1.0.so.0:${prefix}/lib/libatk-1.0.dylib:" ${worksrcpath}/accessible/src/atk/nsApplicationAccessibleWrap.cpp
192
193    reinplace "s:libgssapi_krb5.so.2:${prefix}/libexec/heimdal/lib/libgssapi.2.dylib:" ${worksrcpath}/extensions/auth/nsAuthGSSAPI.cpp
194
195    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
196    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
197    reinplace "s:libgnomevfs-2.so.0:${prefix}/lib/libgnomevfs-2.dylib:" ${worksrcpath}/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
198
199    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
200
201    reinplace "s:libcups.so.2:/usr/lib/libcups.2.dylib:" ${worksrcpath}/widget/src/gtk2/nsCUPSShim.cpp
202
203    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
204    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/xre/nsNativeAppSupportUnix.cpp
205
206    reinplace "s:libgnomeui-2.so.0:${prefix}/lib/libgnomeui-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_linux.cpp
207    reinplace "s:libgnome-2.so.0:${prefix}/lib/libgnome-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_linux.cpp
208
209    reinplace "s:libgconf-2.so.4:${prefix}/lib/libgconf-2.dylib:" ${worksrcpath}/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
210
211    reinplace "s:libgtk-x11-2.0.so.0:${prefix}/lib/libgtk-x11-2.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsBidiKeyboard.cpp
212    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsIdleServiceGTK.cpp
213    reinplace "s:libXinerama.so.1:${prefix}/lib/libXinerama.1.dylib:" ${worksrcpath}/widget/src/gtk2/nsScreenManagerGtk.cpp
214    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
215    reinplace "s:libcanberra.so.0:${prefix}/lib/libcanberra.0.dylib:" ${worksrcpath}/widget/src/gtk2/nsSound.cpp
216
217    reinplace "s:libXss.so.1:${prefix}/lib/libXss.1.0.0.dylib:" ${worksrcpath}/widget/src/qt/nsIdleServiceQt.cpp
218    reinplace "s:libesd.so.0:${prefix}/lib/libesd.0.dylib:" ${worksrcpath}/widget/src/qt/nsSound.cpp
219
220    # Set our system plugins path
221    reinplace "s:/usr/lib/mozilla/plugins:${prefix}/lib/nsplugins:" ${worksrcpath}/xpcom/io/nsAppFileLocationProvider.cpp
222
223    reinplace "s:/etc/gre\.:${prefix}/etc/gre.:g" \
224        ${worksrcpath}/xpcom/build/nsXPCOMPrivate.h
225}
226
227pre-configure {
228    system "cd ${worksrcpath}/js/src && ${autoconf.cmd}"
229}
230
231configure.env \
232        MOZCONFIG="${worksrcpath}/browser/config/mozconfig" \
233        MOZILLA_FIVE_HOME="${prefix}/lib/${pkg_name}" \
234        _MACOSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
235
236build.args-append \
237        includedir="${prefix}/include/${pkg_name}" \
238        idldir="${prefix}/share/idl/${pkg_name}" \
239        installdir="${prefix}/lib/${pkg_name}" \
240        sdkdir="${prefix}/lib/${pkg_name}" \
241        SKIP_COPY_XULRUNNER=1
242
243destroot.args-append \
244        includedir="${prefix}/include/${pkg_name}" \
245        idldir="${prefix}/share/idl/${pkg_name}" \
246        installdir="${prefix}/lib/${pkg_name}" \
247        sdkdir="${prefix}/lib/${pkg_name}" \
248        SKIP_COPY_XULRUNNER=1
249
250post-destroot   {
251    file mkdir ${destroot}${prefix}/share/applications
252
253    copy \
254        ${filespath}/share-applications-${component}.desktop \
255        ${destroot}${prefix}/share/applications/${name}.desktop
256
257    move ${destroot}${prefix}/bin/${component} ${destroot}${prefix}/bin/${pkg_name}
258}
259
260livecheck.type  regex
261livecheck.url   http://releases.mozilla.org/pub/mozilla.org/${component}/releases
262livecheck.regex ">(\\d+(?:\\.\\d+)*).<"
Note: See TracBrowser for help on using the repository browser.