Magellan Linux

Contents 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 3418 - (show annotations) (download)
Wed Apr 4 22:38:27 2012 UTC (12 years, 1 month ago) by niro
File size: 8628 byte(s)
-disable angle support, enable system-pixman and export MOZ_MEDIA=0 to disable all media support
1 # $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 >= dev-libs/nspr-4.9
28 >= dev-libs/nss-3.13
29 >= 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 )
80
81 UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
82
83 export MOZ_PHOENIX=1
84 # no media support on alx
85 export MOZ_MEDIA=0
86
87 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
88 export MOZILLA_CLIENT=1
89 export BUILD_OPT=1
90 export NO_STATIC_LIB=1
91 export USE_PTHREADS=1
92
93 # now strip optimization from CFLAGS so it doesn't end up in the
94 # compile string
95 export CFLAGS="${CFLAGS/-O*/}"
96 export CXXFLAGS="${CFLAGS}"
97
98 # needed to build without warnings on gcc-3
99 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
100
101 src_prepare()
102 {
103 munpack ${SRCFILE} || die
104 cd ${SRCDIR}
105
106 # patches, patches, patches
107
108 # fix pkgconfig pathes
109 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
110
111 # fix some compile issues on multilib systems
112 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
113
114 # enable variable languages via environment vars
115 mpatch mozilla-firefox-2.0.0.9-language.patch || die
116
117 # fix newer curl-headers
118 sed -i '/#include <curl\/types.h>/d' \
119 toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
120 toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
121 config/system-headers \
122 js/src/config/system-headers || die
123
124 export WANT_AUTOCONF="2.1"
125 autoconf || die
126 }
127
128 src_compile()
129 {
130 cd ${SRCDIR}
131
132 # setup .mozconfig
133 cp browser/config/mozconfig .mozconfig || die
134
135 # where shall the files go ?
136 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
137
138 # set optimization level based on CFLAGS
139 if [[ ${ARCH} = x86_64 ]]
140 then
141 # opts may cause segfaults on 64bit arches
142 mozconf_add --enable-optimize=-O1
143 export CFLAGS="${CFLAGS} -fPIC"
144 export CXXFLAGS="${CXXFLAGS} -fPIC"
145 else
146 mozconf_add --enable-optimize=-O2
147 fi
148
149 # enable compat mode for plugins build with gcc2
150 mozconf_add --enable-old-abi-compat-wrappers
151
152 # we don't need the installer
153 mozconf_add --disable-installer
154
155 # issue all warnings demanded by strict ANSI C
156 mozconf_add --disable-pedantic
157
158 # enable crypto support (Personal Security Manager)
159 mozconf_add --enable-crypto
160
161 # want system jpeg, pngm, zlib, nspr and nss
162 #mozconf_add --with-system-jpeg # prefer libjpeg-turbo
163 # doesn't work atm
164 #mozconf_add --with-system-png
165 mozconf_add --with-system-zlib
166 mozconf_add --with-system-nspr
167 mozconf_add --with-system-nss
168 mozconf_add --with-system-pixman
169
170 # enable cairo-gtk2 as default
171 mozconf_add --enable-default-toolkit=cairo-gtk2
172
173 # libnotify support (disabled atm)
174 mozconf_add --disable-libnotify
175
176 # ipv6 support
177 mozconf_add --enable-ipv6
178
179 # want xinerama
180 mozconf_add --enable-xinerama
181
182 # no xprint ?
183 mozconf_add --disable-xprint
184
185 # >= firefox-1.0.7 should use xft + pango, svg with cairo
186 mozconf_add --disable-freetype2
187 mozconf_add --enable-xft
188 mozconf_add --enable-pango
189 mozconf_add --enable-system-cairo
190 mozconf_add --enable-svg
191 mozconf_add --enable-canvas
192
193 # enable all image encoders
194 mozconf_add --enable-image-encoder=all
195
196 # disable debug build && enable stripping
197 mozconf_add --disable-debug
198 mozconf_add --disable-tests
199 mozconf_add --enable-reorder
200 mozconf_add --enable-strip
201 mozconf_add --enable-strip-libs
202
203 if [[ ${ARCH} = i*86 ]]
204 then
205 # optimze build for x86
206 mozconf_add --enable-elf-dynstr-gc
207 fi
208
209 # both needed to build galeon
210 mozconf_add --enable-oji
211 mozconf_add --enable-mathml
212
213 # enable storage, places and safe-browsing
214 mozconf_add --enable-storage
215 mozconf_add --enable-places
216 mozconf_add --enable-safe-browsing
217
218 # enable default extensions
219 mozconf_add --enable-extensions=default
220
221 # gnome support (needs gnome-vfs)
222 mozconf_add --disable-gnomevfs
223 mozconf_add --enable-extension=-gnomevfs
224
225 # broken with firefox-3.0.10
226 mozconf_add --disable-mochitest
227 mozconf_add --disable-crashreporter
228
229 # disable libnotify support on alx
230 mozconf_add --disable-libnotify
231 # and no dbus on alx too
232 mozconf_add --disable-dbus
233 # no yasm on alx atm, disable webm video format
234 # and jpeg-turbo needs yasm too
235 mozconf_add --disable-webm
236 mozconf_add --disable-libjpeg-turbo
237 # no libalsa too
238 mozconf_add --disable-ogg
239 mozconf_add --disable-wave
240 # no opengl
241 mozconf_add --disable-angle
242
243 # resolve multiple --enable-extensions down to one
244 rebuild_extension_list
245
246 # now run configure
247 mconfigure || die
248
249 # removes extraneous CFLAGS
250 # to reduce RAM requirements while compiling
251 mozilla_remove_cflags || die
252
253 mmake || die
254 }
255
256 src_install()
257 {
258 cd ${SRCDIR}
259
260 # install
261 make DESTDIR=${BINDIR} install || die
262
263 # fix permissions
264 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
265
266 # environment
267 # mozilla-1.7* uses already the env var mozilla_five_home
268 # firefox does not need this, the env var is only to compile
269 # mozilla-based sources
270 minstalldir /etc/env.d || die
271 MCONFIG="/etc/env.d/90mozilla-firefox"
272 mclearconfig || die
273 maddconfig "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" || die
274 maddconfig "LDPATH=/usr/$(mlibdir)/mozilla-firefox" || die
275
276 # vendor information
277 msetpref general.useragent.vendor Magellan-Linux || die
278
279 # disable app.update in default config
280 msetpref app.update.auto false || die
281 msetpref app.update.enabled false || die
282 msetpref app.update.autoInstallEnabled false || die
283
284 # use system-colors
285 msetpref browser.display.use_system_colors true || die
286 # disable default-browser check
287 msetpref browser.shell.checkDefaultBrowser false || die
288
289 # menu entries
290 minstallpixmap firefox.png || die
291 minstalldir /usr/share/applications || die
292 minstallfile -s firefox.desktop /usr/share/applications || die
293
294 # now move all plugins to /usr/lib/nsbrowser/plugins
295 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
296 if [[ -d ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins ]]
297 then
298 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
299 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
300 fi
301 # and symlink them (we need a defined location for the plugins of all browsers)
302 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
303
304 # alx-only - alway export LANG=de_DE
305 # we don't support any locales but firefox needs this to load the german i18n plugin
306 sed -i 's:^\(#!/.*\):\1\nexport LANG="de_DE":' /usr/$(mlibdir)/mozilla-firefox/firefox || die
307 }