Contents of /trunk/extras/firefox-esr/firefox-esr-17.0.7-r1.smage2
Parent Directory | Revision Log
Revision 17724 -
(show annotations)
(download)
Wed Jun 26 11:08:43 2013 UTC (11 years, 3 months ago) by niro
File size: 10909 byte(s)
Wed Jun 26 11:08:43 2013 UTC (11 years, 3 months ago) by niro
File size: 10909 byte(s)
-added patch to fix build of webrtc with system nspr and fixed the install-dir patch version
1 | # $Id$ |
2 | |
3 | PNAME="firefox-esr" |
4 | PVER="17.0.7" |
5 | PBUILD="r1" |
6 | |
7 | SPLIT_PACKAGES="firefox-esr firefox-esr-sdk" |
8 | |
9 | PCAT="net-www" |
10 | HOMEPAGE="http://www.mozilla.org/products/firefox/" |
11 | |
12 | FIREFOX_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 |
18 | >= sys-apps/dbus-1.6 |
19 | >= dev-libs/dbus-glib-0.100 |
20 | >= media-libs/fontconfig-2.10 |
21 | >= media-libs/libjpeg-8 |
22 | >= media-libs/libpng-1.5 |
23 | >= media-libs/alsa-lib-1.0.26 |
24 | >= media-libs/libogg-1.3 |
25 | >= dev-libs/glib2-2.34 |
26 | >= dev-libs/libidl-0.8.14 |
27 | >= app-arch/unzip-6 |
28 | >= x11-libs/pango-1.32 |
29 | >= x11-libs/cairo-1.12 |
30 | >= x11-libs/gtk2+-2.24 |
31 | >= x11-libs/libnotify-0.7 |
32 | >= dev-libs/nspr-4.9 |
33 | >= dev-libs/nss-3.14 |
34 | >= media-fonts/corefonts-2 |
35 | >= app-text/hunspell-1.3 |
36 | >= dev-db/sqlite-3.7 |
37 | >= dev-libs/libffi-3 |
38 | >= x11-libs/startup-notification-0.12 |
39 | >= x11-libs/pixman-0.28" |
40 | |
41 | SDEPEND="${FIREFOX_DEPEND} |
42 | >= x11-proto/xineramaproto-1 |
43 | >= x11-proto/compositeproto-0.4 |
44 | >= dev-util/pkgconfig-0.25 |
45 | >= sys-dev/autoconf-5 |
46 | >= sys-dev/automake-4 |
47 | >= virtual/sed |
48 | >= app-arch/zip-3 |
49 | >= dev-lang/yasm-1.2" |
50 | |
51 | SRCFILE="firefox-${PVER}esr.source.tar.bz2" |
52 | SRCDIR="${BUILDDIR}/mozilla-esr${PVER%%.*}" |
53 | |
54 | sminclude mozilla mtools cleanutils python |
55 | |
56 | SRC_URI=( |
57 | ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/-esr/}/releases/${PVER}esr/source/${SRCFILE} |
58 | mirror://mozilla-firefox/${SRCFILE} |
59 | mirror://mozilla-firefox/menu/firefox-esr.png |
60 | mirror://mozilla-firefox/menu/firefox-esr.desktop |
61 | mirror://mozilla-firefox/firefox-18.0-install-dir.patch |
62 | mirror://mozilla-firefox/firefox-17.0-webrtc-fix-system-nspr.patch |
63 | ) |
64 | |
65 | UP2SUBSTITUTE="esr" |
66 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/firefox/releases/latest-esr/source/ | sed 's:[-|.]source::' | lasttarball" |
67 | |
68 | split_info_firefox-esr() |
69 | { |
70 | DESCRIPTION="Firefox ESR is Mozilla's web browser with an extended support release cycle." |
71 | DEPEND="${FIREFOX_DEPEND}" |
72 | PROVIDE="virtual/webbrowser" |
73 | } |
74 | |
75 | split_info_firefox-esr-sdk() |
76 | { |
77 | DESCRIPTION="Firefox SDK to build plugins and programs for the ESR version." |
78 | DEPEND="== net-www/firefox-esr-${PVER}" |
79 | } |
80 | |
81 | export MOZ_PHOENIX=1 |
82 | |
83 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
84 | export MOZILLA_CLIENT=1 |
85 | export BUILD_OPT=1 |
86 | export NO_STATIC_LIB=1 |
87 | export USE_PTHREADS=1 |
88 | |
89 | # now strip optimization from CFLAGS so it doesn't end up in the |
90 | # compile string |
91 | export CFLAGS="${CFLAGS/-O*/}" |
92 | export CXXFLAGS="${CFLAGS}" |
93 | |
94 | # needed to build without warnings on gcc-3 |
95 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
96 | |
97 | # setup branding |
98 | # nightly, aurora, official, unofficial, magellan |
99 | __MOZ_BRANDING="magellan" |
100 | |
101 | src_prepare() |
102 | { |
103 | munpack ${SRCFILE} || die |
104 | cd ${SRCDIR} |
105 | |
106 | # patches, patches, patches |
107 | |
108 | # remove version from mozilla-five-home |
109 | mpatch firefox-18.0-install-dir.patch || die |
110 | |
111 | # fix build of webrtc with system nspr |
112 | mpatch firefox-17.0-webrtc-fix-system-nspr.patch || die |
113 | |
114 | # fix newer curl-headers |
115 | sed -i '/#include <curl\/types.h>/d' \ |
116 | toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ |
117 | toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ |
118 | config/system-headers \ |
119 | js/src/config/system-headers || die |
120 | |
121 | # don't exit with error when some libs are missing which we have in system |
122 | sed -i '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' browser/installer/Makefile.in || die |
123 | |
124 | # don't error out when there's no files to be removed |
125 | sed -i 's@\(xargs rm\)$@\1 -f@' toolkit/mozapps/installer/packager.mk || die |
126 | |
127 | # create missing python execs on multilib systems |
128 | if [[ ${ARCH} = x86_64 ]] && [[ $(mlibdir) != lib ]] |
129 | then |
130 | sed -i '/^rm -rf _virtualenv/d' configure.in || die |
131 | sed -i '/^mkdir -p _virtualenv/d' configure.in || die |
132 | |
133 | # seems that firefox ignores all chost settings on x86_64: |
134 | local _mychost="${CHOST}" |
135 | [[ ${ARCH} = x86_64 ]] && _mychost="${CHOST/pc/unknown}" |
136 | |
137 | install -d obj-${_mychost}/_virtualenv/bin || die |
138 | cp -a /usr/bin/python-m32 obj-${_mychost}/_virtualenv/bin || die |
139 | cp -a /usr/bin/python-m64 obj-${_mychost}/_virtualenv/bin || die |
140 | cp -a /usr/bin/python$(get_python_version)-m32 obj-${_mychost}/_virtualenv/bin || die |
141 | cp -a /usr/bin/python$(get_python_version)-m64 obj-${_mychost}/_virtualenv/bin || die |
142 | fi |
143 | |
144 | if [[ ${__MOZ_BRANDING} = magellan ]] |
145 | then |
146 | cp -R browser/branding/unofficial browser/branding/magellan || die |
147 | sed -i "s:Mozilla Developer Preview:Mozilla Unofficial:g" \ |
148 | browser/branding/magellan/branding.nsi \ |
149 | browser/branding/magellan/locales/en-US/brand.dtd \ |
150 | browser/branding/magellan/locales/en-US/brand.properties || die |
151 | fi |
152 | |
153 | export WANT_AUTOCONF=2.1 |
154 | autoconf || die |
155 | } |
156 | |
157 | src_compile() |
158 | { |
159 | cd ${SRCDIR} |
160 | |
161 | # setup .mozconfig |
162 | cp browser/config/mozconfig .mozconfig || die |
163 | |
164 | # setup branding |
165 | case ${__MOZ_BRANDING} in |
166 | nightly|aurora|unofficial|magellan) |
167 | mozconf_add --with-branding=browser/branding/${__MOZ_BRANDING} |
168 | ;; |
169 | official) |
170 | mozconf_add --enable-official-branding |
171 | ;; |
172 | esac |
173 | |
174 | # where shall the files go ? |
175 | mozconf_add --prefix=/usr |
176 | mozconf_add --libdir=/usr/$(mlibdir) |
177 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/firefox-esr |
178 | |
179 | mozconf_add --host="${CHOST}" |
180 | mozconf_add --build="${CHOST}" |
181 | |
182 | # set optimization level based on CFLAGS |
183 | if [[ ${ARCH} = x86_64 ]] |
184 | then |
185 | # opts may cause segfaults on 64bit arches |
186 | mozconf_add --enable-optimize=-O1 |
187 | export CFLAGS="${CFLAGS} -fPIC" |
188 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
189 | else |
190 | mozconf_add --enable-optimize=-O2 |
191 | fi |
192 | |
193 | # enable compat mode for plugins build with gcc2 |
194 | mozconf_add --enable-old-abi-compat-wrappers |
195 | |
196 | # we don't need the installer |
197 | mozconf_add --disable-installer |
198 | |
199 | # issue all warnings demanded by strict ANSI C |
200 | mozconf_add --disable-pedantic |
201 | |
202 | # enable crypto support (Personal Security Manager) |
203 | mozconf_add --enable-crypto |
204 | |
205 | # want system jpeg, pngm, zlib, nspr and nss |
206 | #mozconf_add --with-system-jpeg # prefer libjpeg-turbo |
207 | # doesn't work atm |
208 | #mozconf_add --with-system-png |
209 | mozconf_add --with-system-zlib |
210 | mozconf_add --with-system-nspr |
211 | mozconf_add --with-system-nss |
212 | mozconf_add --with-system-bz2 |
213 | mozconf_add --enable-system-hunspell |
214 | mozconf_add --enable-system-sqlite |
215 | mozconf_add --enable-system-ffi |
216 | mozconf_add --enable-system-pixman |
217 | |
218 | # enable cairo-gtk2 as default |
219 | mozconf_add --enable-default-toolkit=cairo-gtk2 |
220 | |
221 | # ipv6 support |
222 | mozconf_add --enable-ipv6 |
223 | |
224 | # want xinerama |
225 | mozconf_add --enable-xinerama |
226 | |
227 | # no xprint ? |
228 | mozconf_add --disable-xprint |
229 | |
230 | # >= firefox-1.0.7 should use xft + pango, svg with cairo |
231 | mozconf_add --disable-freetype2 |
232 | mozconf_add --enable-xft |
233 | mozconf_add --enable-pango |
234 | #mozconf_add --enable-system-cairo # cairo-1.12 fails atm |
235 | mozconf_add --enable-svg |
236 | mozconf_add --enable-canvas |
237 | |
238 | # enable all image encoders |
239 | mozconf_add --enable-image-encoder=all |
240 | |
241 | # disable debug build && enable stripping |
242 | mozconf_add --disable-debug |
243 | mozconf_add --disable-tests |
244 | mozconf_add --enable-reorder |
245 | mozconf_add --enable-strip |
246 | mozconf_add --enable-strip-libs |
247 | |
248 | if [[ ${ARCH} = i*86 ]] |
249 | then |
250 | # optimze build for x86 |
251 | mozconf_add --enable-elf-dynstr-gc |
252 | fi |
253 | |
254 | # both needed to build galeon |
255 | mozconf_add --enable-oji |
256 | mozconf_add --enable-mathml |
257 | |
258 | # enable storage, places and safe-browsing |
259 | mozconf_add --enable-storage |
260 | mozconf_add --enable-places |
261 | mozconf_add --enable-safe-browsing |
262 | |
263 | # enable default extensions |
264 | mozconf_add --enable-extensions=default |
265 | |
266 | # gnome support (needs gnome-vfs) |
267 | mozconf_add --disable-gnomevfs |
268 | mozconf_add --enable-extension=-gnomevfs |
269 | |
270 | # broken with firefox-3.0.10 |
271 | mozconf_add --disable-mochitest |
272 | mozconf_add --disable-crashreporter |
273 | |
274 | # enable libnotify |
275 | mozconf_add --enable-libnotify |
276 | # enable gio |
277 | mozconf_add --enable-gio |
278 | # enable startup-notification |
279 | mozconf_add --enable-startup-notification |
280 | # enable dbus |
281 | mozconf_add --enable-dbus |
282 | # enable webm and libjpeg-turbo format |
283 | # both needs yasm |
284 | mozconf_add --enable-webm |
285 | mozconf_add --enable-libjpeg-turbo |
286 | # enable libalsa and ogg |
287 | mozconf_add --enable-ogg |
288 | mozconf_add --enable-wave |
289 | |
290 | # resolve multiple --enable-extensions down to one |
291 | rebuild_extension_list |
292 | |
293 | MOZ_MAKE_FLAGS="${MAKEOPTS}" mmake -f client.mk || die |
294 | } |
295 | |
296 | src_install_firefox-esr() |
297 | { |
298 | cd ${SRCDIR} |
299 | |
300 | # install |
301 | mmake -j1 -f client.mk DESTDIR=${BINDIR} install || die |
302 | |
303 | # fix permissions |
304 | mchown -R root:root /usr/$(mlibdir)/firefox-esr || die |
305 | |
306 | # init our pref file |
307 | msetpref --init || die |
308 | |
309 | # vendor information |
310 | msetpref general.useragent.vendor Magellan-Linux || die |
311 | |
312 | # disable app.update in default config |
313 | msetpref app.update.auto false || die |
314 | msetpref app.update.enabled false || die |
315 | msetpref app.update.autoInstallEnabled false || die |
316 | |
317 | # use system-colors |
318 | msetpref browser.display.use_system_colors true || die |
319 | # disable default-browser check |
320 | msetpref browser.shell.checkDefaultBrowser false || die |
321 | |
322 | # use LANG environment variable to choose locale |
323 | msetpref intl.locale.matchOS true || die |
324 | |
325 | # menu entries |
326 | minstallpixmap firefox-esr.png || die |
327 | minstalldir /usr/share/applications || die |
328 | minstallfile -s firefox-esr.desktop /usr/share/applications || die |
329 | |
330 | # now move all plugins to /usr/lib/nsbrowser/plugins |
331 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die |
332 | if [[ -d ${BINDIR}/usr/$(mlibdir)/firefox-esr/plugins ]] |
333 | then |
334 | mcopy -a ${BINDIR}/usr/$(mlibdir)/firefox-esr/plugins/\* /usr/$(mlibdir)/nsbrowser/plugins || die |
335 | mdelete -r /usr/$(mlibdir)/firefox-esr/plugins || die |
336 | fi |
337 | # and symlink them (we need a defined location for the plugins of all browsers) |
338 | mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/firefox-esr/plugins || die |
339 | |
340 | # rename binary, that an user is able to install firefox and firefox-esr side-by-side |
341 | mv ${BINDIR}/usr/bin/firefox{,-esr} || die |
342 | |
343 | # fix missing binary |
344 | #https://bugzilla.mozilla.org/show_bug.cgi?id=658850 |
345 | mlink firefox-esr /usr/$(mlibdir)/firefox/firefox-esr-bin || die |
346 | |
347 | # environment |
348 | minstalldir /etc/env.d || die |
349 | MCONFIG="/etc/env.d/90firefox-esr" |
350 | mclearconfig || die |
351 | maddconfig "LDPATH=/usr/$(mlibdir)/firefox-esr" || die |
352 | |
353 | # remove sdk files |
354 | mdelete -r /usr/include || die |
355 | mdelete -r /usr/share/idl || die |
356 | mdelete -r /usr/$(mlibdir)/firefox-esr-devel || die |
357 | } |
358 | |
359 | src_install_firefox-sdk() |
360 | { |
361 | cd ${SRCDIR} |
362 | |
363 | mmake -j1 -f client.mk DESTDIR=${BINDIR} install || die |
364 | mchown -R root:root /usr/$(mlibdir)/firefox-esr || die |
365 | |
366 | # environment |
367 | # mozilla-1.7* uses already the env var mozilla_five_home |
368 | # firefox does not need this, the env var is only to compile |
369 | # mozilla-based sources |
370 | minstalldir /etc/env.d || die |
371 | MCONFIG="/etc/env.d/90firefox-esr-sdk" |
372 | mclearconfig || die |
373 | maddconfig "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/firefox-esr" || die |
374 | maddconfig "LDPATH=/usr/$(mlibdir)/firefox-esr" || die |
375 | |
376 | # keep only sdk files |
377 | zapmost ${BINDIR} \ |
378 | etc/env.d \ |
379 | usr/include \ |
380 | usr/share/idl \ |
381 | usr/$(mlibdir)/firefox-esr-devel \ |
382 | || die |
383 | } |
384 | |
385 | preinstall_firefox() |
386 | { |
387 | # remove old 90mozilla-firefox env-file |
388 | if [[ -f ${MROOT}/etc/env.d/90mozilla-firefox ]] |
389 | then |
390 | rm ${MROOT}/etc/env.d/90mozilla-firefox |
391 | env-rebuild |
392 | fi |
393 | } |