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