Magellan Linux

Annotation of /smage/branches/alx-0_6_0/extras/mozilla-firefox/mozilla-firefox-11.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3446 - (hide annotations) (download)
Thu Apr 12 07:08:02 2012 UTC (12 years, 1 month ago) by niro
File size: 8772 byte(s)
-no parallel make
1 niro 3413 # $Id$
2    
3     PNAME="mozilla-firefox"
4     PVER="11.0"
5     PBUILD="r1"
6    
7     PCAT="net-www"
8    
9     DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser."
10     HOMEPAGE="http://www.mozilla.org/products/firefox/"
11    
12     DEPEND=">= x11-libs/libXrender-0.9
13     >= x11-libs/libXcomposite-0.4
14     >= x11-libs/libXt-1
15     >= x11-libs/libXmu-1
16     >= dev-libs/expat-2
17     >= sys-libs/zlib-1.2.3
18     >= media-libs/fontconfig-2.8
19     >= media-libs/libjpeg-8
20     >= media-libs/libpng-1.5
21     >= dev-libs/glib2-2.28
22     >= dev-libs/libidl-0.8.14
23     >= app-arch/unzip-6
24     >= x11-libs/pango-1.28
25     >= x11-libs/cairo-1.10
26     >= x11-libs/gtk2+-2.24
27 niro 3417 >= dev-libs/nspr-4.9
28     >= dev-libs/nss-3.13
29 niro 3413 >= media-fonts/corefonts-2"
30    
31     SDEPEND=">= x11-proto/xineramaproto-1
32     >= x11-proto/compositeproto-0.4
33     >= dev-util/pkgconfig-0.25
34     >= sys-dev/autoconf-5
35     >= sys-dev/automake-4
36     >= sys-apps/sed-4
37     >= app-arch/zip-3"
38    
39     PROVIDE="virtual/webbrowser"
40    
41     SRCFILE="firefox-${PVER}.source.tar.bz2"
42     SRCDIR="${BUILDDIR}/mozilla-release"
43    
44     ALX_ONLY_KEEP="etc/env.d
45     usr/bin
46     usr/share
47     usr/$(mlibdir)/nsbrowser
48     usr/$(mlibdir)/mozilla-firefox/firefox
49     usr/$(mlibdir)/mozilla-firefox/firefox-bin
50     usr/$(mlibdir)/mozilla-firefox/mozilla-xrmote-client
51     usr/$(mlibdir)/mozilla-firefox/plugin-container
52     usr/$(mlibdir)/mozilla-firefox/plugins
53     usr/$(mlibdir)/mozilla-firefox/run-mozilla.sh
54     usr/$(mlibdir)/mozilla-firefox/*.ini
55     usr/$(mlibdir)/mozilla-firefox/*.xml
56     usr/$(mlibdir)/mozilla-firefox/*.so
57     usr/$(mlibdir)/mozilla-firefox/*.jar
58     usr/$(mlibdir)/mozilla-firefox/chrome
59     usr/$(mlibdir)/mozilla-firefox/chrome.manifest
60     usr/$(mlibdir)/mozilla-firefox/components
61     usr/$(mlibdir)/mozilla-firefox/default
62     usr/$(mlibdir)/mozilla-firefox/dependentlibs.list
63     usr/$(mlibdir)/mozilla-firefox/dictionaries
64     usr/$(mlibdir)/mozilla-firefox/extensions
65     usr/$(mlibdir)/mozilla-firefox/icons
66     usr/$(mlibdir)/mozilla-firefox/plugins
67     usr/$(mlibdir)/mozilla-firefox/searchplugins
68     usr/$(mlibdir)/mozilla-firefox/update.locale"
69     sminclude mozilla mtools alx-split
70    
71     SRC_URI=(
72     ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
73     mirror://${PNAME}/${SRCFILE}
74     mirror://${PNAME}/menu/firefox.png
75     mirror://${PNAME}/menu/firefox.desktop
76     mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch
77     mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
78     mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch
79 niro 3445 mirror://${PNAME}/mozilla-firefox-11.0-fix-disabled-ogg-ftbfs.patch
80 niro 3413 )
81    
82     UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
83    
84     export MOZ_PHOENIX=1
85    
86     # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
87     export MOZILLA_CLIENT=1
88     export BUILD_OPT=1
89     export NO_STATIC_LIB=1
90     export USE_PTHREADS=1
91    
92     # now strip optimization from CFLAGS so it doesn't end up in the
93     # compile string
94     export CFLAGS="${CFLAGS/-O*/}"
95     export CXXFLAGS="${CFLAGS}"
96    
97     # needed to build without warnings on gcc-3
98     export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
99    
100     src_prepare()
101     {
102     munpack ${SRCFILE} || die
103     cd ${SRCDIR}
104    
105     # patches, patches, patches
106    
107     # fix pkgconfig pathes
108     mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
109    
110     # fix some compile issues on multilib systems
111     mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
112    
113     # enable variable languages via environment vars
114     mpatch mozilla-firefox-2.0.0.9-language.patch || die
115    
116 niro 3445 # fix ftbfs with disabled ogg support (alx only)
117     mpatch mozilla-firefox-11.0-fix-disabled-ogg-ftbfs.patch || die
118    
119 niro 3413 # fix newer curl-headers
120     sed -i '/#include <curl\/types.h>/d' \
121     toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
122     toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
123     config/system-headers \
124     js/src/config/system-headers || die
125    
126     export WANT_AUTOCONF="2.1"
127     autoconf || die
128     }
129    
130     src_compile()
131     {
132     cd ${SRCDIR}
133    
134     # setup .mozconfig
135     cp browser/config/mozconfig .mozconfig || die
136    
137     # where shall the files go ?
138     mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
139    
140     # set optimization level based on CFLAGS
141     if [[ ${ARCH} = x86_64 ]]
142     then
143     # opts may cause segfaults on 64bit arches
144     mozconf_add --enable-optimize=-O1
145     export CFLAGS="${CFLAGS} -fPIC"
146     export CXXFLAGS="${CXXFLAGS} -fPIC"
147     else
148     mozconf_add --enable-optimize=-O2
149     fi
150    
151     # enable compat mode for plugins build with gcc2
152     mozconf_add --enable-old-abi-compat-wrappers
153    
154     # we don't need the installer
155     mozconf_add --disable-installer
156    
157     # issue all warnings demanded by strict ANSI C
158     mozconf_add --disable-pedantic
159    
160     # enable crypto support (Personal Security Manager)
161     mozconf_add --enable-crypto
162    
163     # want system jpeg, pngm, zlib, nspr and nss
164     #mozconf_add --with-system-jpeg # prefer libjpeg-turbo
165     # doesn't work atm
166     #mozconf_add --with-system-png
167     mozconf_add --with-system-zlib
168     mozconf_add --with-system-nspr
169     mozconf_add --with-system-nss
170 niro 3418 mozconf_add --with-system-pixman
171 niro 3413
172     # enable cairo-gtk2 as default
173     mozconf_add --enable-default-toolkit=cairo-gtk2
174    
175     # libnotify support (disabled atm)
176     mozconf_add --disable-libnotify
177    
178     # ipv6 support
179     mozconf_add --enable-ipv6
180    
181     # want xinerama
182     mozconf_add --enable-xinerama
183    
184     # no xprint ?
185     mozconf_add --disable-xprint
186    
187     # >= firefox-1.0.7 should use xft + pango, svg with cairo
188     mozconf_add --disable-freetype2
189     mozconf_add --enable-xft
190     mozconf_add --enable-pango
191     mozconf_add --enable-system-cairo
192     mozconf_add --enable-svg
193     mozconf_add --enable-canvas
194    
195     # enable all image encoders
196     mozconf_add --enable-image-encoder=all
197    
198     # disable debug build && enable stripping
199     mozconf_add --disable-debug
200     mozconf_add --disable-tests
201     mozconf_add --enable-reorder
202     mozconf_add --enable-strip
203     mozconf_add --enable-strip-libs
204    
205     if [[ ${ARCH} = i*86 ]]
206     then
207     # optimze build for x86
208     mozconf_add --enable-elf-dynstr-gc
209     fi
210    
211     # both needed to build galeon
212     mozconf_add --enable-oji
213     mozconf_add --enable-mathml
214    
215     # enable storage, places and safe-browsing
216     mozconf_add --enable-storage
217     mozconf_add --enable-places
218     mozconf_add --enable-safe-browsing
219    
220     # enable default extensions
221     mozconf_add --enable-extensions=default
222    
223     # gnome support (needs gnome-vfs)
224     mozconf_add --disable-gnomevfs
225     mozconf_add --enable-extension=-gnomevfs
226    
227     # broken with firefox-3.0.10
228     mozconf_add --disable-mochitest
229     mozconf_add --disable-crashreporter
230    
231     # disable libnotify support on alx
232     mozconf_add --disable-libnotify
233     # and no dbus on alx too
234     mozconf_add --disable-dbus
235     # no yasm on alx atm, disable webm video format
236     # and jpeg-turbo needs yasm too
237     mozconf_add --disable-webm
238     mozconf_add --disable-libjpeg-turbo
239     # no libalsa too
240     mozconf_add --disable-ogg
241     mozconf_add --disable-wave
242 niro 3418 # no opengl
243     mozconf_add --disable-angle
244 niro 3413
245     # resolve multiple --enable-extensions down to one
246     rebuild_extension_list
247    
248     # now run configure
249     mconfigure || die
250    
251     # removes extraneous CFLAGS
252     # to reduce RAM requirements while compiling
253     mozilla_remove_cflags || die
254    
255 niro 3446 mmake -j1 || die
256 niro 3413 }
257    
258     src_install()
259     {
260     cd ${SRCDIR}
261    
262     # install
263     make DESTDIR=${BINDIR} install || die
264    
265     # fix permissions
266     mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
267    
268     # environment
269     # mozilla-1.7* uses already the env var mozilla_five_home
270     # firefox does not need this, the env var is only to compile
271     # mozilla-based sources
272     minstalldir /etc/env.d || die
273     MCONFIG="/etc/env.d/90mozilla-firefox"
274     mclearconfig || die
275     maddconfig "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" || die
276     maddconfig "LDPATH=/usr/$(mlibdir)/mozilla-firefox" || die
277    
278     # vendor information
279     msetpref general.useragent.vendor Magellan-Linux || die
280    
281     # disable app.update in default config
282     msetpref app.update.auto false || die
283     msetpref app.update.enabled false || die
284     msetpref app.update.autoInstallEnabled false || die
285    
286     # use system-colors
287     msetpref browser.display.use_system_colors true || die
288     # disable default-browser check
289     msetpref browser.shell.checkDefaultBrowser false || die
290    
291     # menu entries
292     minstallpixmap firefox.png || die
293     minstalldir /usr/share/applications || die
294     minstallfile -s firefox.desktop /usr/share/applications || die
295    
296     # now move all plugins to /usr/lib/nsbrowser/plugins
297     minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
298     if [[ -d ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins ]]
299     then
300     cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
301     rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
302     fi
303     # and symlink them (we need a defined location for the plugins of all browsers)
304     mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
305    
306     # alx-only - alway export LANG=de_DE
307     # we don't support any locales but firefox needs this to load the german i18n plugin
308     sed -i 's:^\(#!/.*\):\1\nexport LANG="de_DE":' /usr/$(mlibdir)/mozilla-firefox/firefox || die
309     }