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