Gentoo Archives: gentoo-commits

From: "Ian Stakenvicius (axs)" <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox-bin: firefox-bin-24.8.1.ebuild firefox-bin-32.0.3.ebuild firefox-bin-31.1.1.ebuild ChangeLog firefox-bin-17.0.9.ebuild firefox-bin-32.0.ebuild firefox-bin-17.0.10.ebuild firefox-bin-24.7.0.ebuild firefox-bin-31.1.0.ebuild
Date: Fri, 26 Sep 2014 15:04:49
Message-Id: 20140926150242.B34646555@oystercatcher.gentoo.org
1 axs 14/09/26 15:02:42
2
3 Modified: ChangeLog
4 Added: firefox-bin-24.8.1.ebuild firefox-bin-32.0.3.ebuild
5 firefox-bin-31.1.1.ebuild
6 Removed: firefox-bin-17.0.9.ebuild firefox-bin-32.0.ebuild
7 firefox-bin-17.0.10.ebuild
8 firefox-bin-24.7.0.ebuild firefox-bin-31.1.0.ebuild
9 Log:
10 security bump, bug 523652 ; removed old
11
12 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
13
14 Revision Changes Path
15 1.204 www-client/firefox-bin/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?rev=1.204&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?rev=1.204&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?r1=1.203&r2=1.204
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v
24 retrieving revision 1.203
25 retrieving revision 1.204
26 diff -u -r1.203 -r1.204
27 --- ChangeLog 5 Sep 2014 09:07:24 -0000 1.203
28 +++ ChangeLog 26 Sep 2014 15:02:42 -0000 1.204
29 @@ -1,6 +1,17 @@
30 # ChangeLog for www-client/firefox-bin
31 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v 1.203 2014/09/05 09:07:24 ago Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v 1.204 2014/09/26 15:02:42 axs Exp $
34 +
35 +*firefox-bin-32.0.3 (26 Sep 2014)
36 +*firefox-bin-24.8.1 (26 Sep 2014)
37 +*firefox-bin-31.1.1 (26 Sep 2014)
38 +
39 + 26 Sep 2014; Ian Stakenvicius (_AxS_) <axs@g.o>
40 + +firefox-bin-24.8.1.ebuild, +firefox-bin-31.1.1.ebuild,
41 + +firefox-bin-32.0.3.ebuild, -firefox-bin-17.0.10.ebuild,
42 + -firefox-bin-17.0.9.ebuild, -firefox-bin-24.7.0.ebuild,
43 + -firefox-bin-31.1.0.ebuild, -firefox-bin-32.0.ebuild:
44 + security bump, bug 523652 ; removed old
45
46 05 Sep 2014; Agostino Sarubbo <ago@g.o> firefox-bin-24.8.0.ebuild:
47 Stable for x86, wrt bug #522020
48
49
50
51 1.1 www-client/firefox-bin/firefox-bin-24.8.1.ebuild
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-24.8.1.ebuild?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-24.8.1.ebuild?rev=1.1&content-type=text/plain
55
56 Index: firefox-bin-24.8.1.ebuild
57 ===================================================================
58 # Copyright 1999-2014 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-24.8.1.ebuild,v 1.1 2014/09/26 15:02:42 axs Exp $
61
62 EAPI="5"
63 MOZ_ESR="1"
64
65 # Can be updated using scripts/get_langs.sh from mozilla overlay
66 MOZ_LANGS=(af ak ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
67 en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl
68 gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO
69 nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK
70 te th tr uk vi zh-CN zh-TW zu)
71
72 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
73 MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI
74 MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
75 MOZ_PN="${PN/-bin}"
76 MOZ_P="${MOZ_PN}-${MOZ_PV}"
77
78 if [[ ${MOZ_ESR} == 1 ]]; then
79 # ESR releases have slightly version numbers
80 MOZ_PV="${MOZ_PV}esr"
81 fi
82 MOZ_P="${MOZ_PN}-${MOZ_PV}"
83
84 # Upstream ftp release URI that's used by mozlinguas.eclass
85 # We don't use the http mirror because it deletes old tarballs.
86 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
87
88 inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas nsplugins
89
90 DESCRIPTION="Firefox Web Browser"
91 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
92 SRC_URI="${SRC_URI}
93 amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
94 x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
95 HOMEPAGE="http://www.mozilla.com/firefox"
96 RESTRICT="strip mirror"
97
98 KEYWORDS="-* ~amd64 ~x86"
99 SLOT="0"
100 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
101 IUSE="selinux startup-notification"
102
103 DEPEND="app-arch/unzip
104 selinux? ( sec-policy/selinux-mozilla )"
105 RDEPEND="dev-libs/dbus-glib
106 virtual/freedesktop-icon-theme
107 x11-libs/libXrender
108 x11-libs/libXt
109 x11-libs/libXmu
110
111 selinux? ( sec-policy/selinux-mozilla )
112 >=x11-libs/gtk+-2.2:2
113 >=media-libs/alsa-lib-1.0.16
114 "
115
116 QA_PREBUILT="
117 opt/${MOZ_PN}/*.so
118 opt/${MOZ_PN}/${MOZ_PN}
119 opt/${MOZ_PN}/${PN}
120 opt/${MOZ_PN}/crashreporter
121 opt/${MOZ_PN}/webapprt-stub
122 opt/${MOZ_PN}/plugin-container
123 opt/${MOZ_PN}/mozilla-xremote-client
124 opt/${MOZ_PN}/updater
125 "
126
127 S="${WORKDIR}/${MOZ_PN}"
128
129 src_unpack() {
130 unpack ${A}
131
132 # Unpack language packs
133 mozlinguas_src_unpack
134 }
135
136 src_install() {
137 declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
138
139 local size sizes icon_path icon name
140 sizes="16 32 48"
141 icon_path="${S}/browser/chrome/icons/default"
142 icon="${PN}"
143 name="Mozilla Firefox"
144
145 # Install icons and .desktop for menu entry
146 for size in ${sizes}; do
147 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
148 newins "${icon_path}/default${size}.png" "${icon}.png" || die
149 done
150 # The 128x128 icon has a different name
151 insinto "/usr/share/icons/hicolor/128x128/apps"
152 newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
153 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
154 newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png
155 domenu "${FILESDIR}"/${PN}.desktop
156 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
157 "${ED}/usr/share/applications/${PN}.desktop" || die
158
159 # Add StartupNotify=true bug 237317
160 if use startup-notification; then
161 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop
162 fi
163
164 # Install firefox in /opt
165 dodir ${MOZILLA_FIVE_HOME%/*}
166 mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die
167
168 # Fix prefs that make no sense for a system-wide install
169 insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
170 doins "${FILESDIR}"/local-settings.js
171 insinto ${MOZILLA_FIVE_HOME}/
172 doins "${FILESDIR}"/all-gentoo.js
173
174 # Install language packs
175 mozlinguas_src_install
176
177 local LANG=${linguas%% *}
178 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
179 elog "Setting default locale to ${LANG}"
180 echo "pref(\"general.useragent.locale\", \"${LANG}\");" \
181 >> "${D}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
182 die "sed failed to change locale"
183 fi
184
185 # Create /usr/bin/firefox-bin
186 dodir /usr/bin/
187 cat <<-EOF >"${D}"/usr/bin/${PN}
188 #!/bin/sh
189 unset LD_PRELOAD
190 LD_LIBRARY_PATH="/opt/firefox/"
191 GTK_PATH=/usr/lib/gtk-2.0/
192 exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
193 EOF
194 fperms 0755 /usr/bin/${PN}
195
196 # revdep-rebuild entry
197 insinto /etc/revdep-rebuild
198 doins "${FILESDIR}"/10${PN} || die
199
200 # Plugins dir
201 share_plugins_dir
202
203 # Required in order to use plugins and even run firefox on hardened.
204 pax-mark mr "${ED}"/${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
205 }
206
207 pkg_preinst() {
208 gnome2_icon_savelist
209 }
210
211 pkg_postinst() {
212 if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \
213 || ! has_version 'net-misc/curl'; then
214 einfo
215 einfo "For using the crashreporter, you need gnome-base/gconf,"
216 einfo "gnome-base/orbit and net-misc/curl emerged."
217 einfo
218 fi
219 # Drop requirement of curl not built with nss as it's not necessary anymore
220 #if has_version 'net-misc/curl[nss]'; then
221 # einfo
222 # einfo "Crashreporter won't be able to send reports"
223 # einfo "if you have curl emerged with the nss USE-flag"
224 # einfo
225 #fi
226
227 # Update mimedb for the new .desktop file
228 fdo-mime_desktop_database_update
229 gnome2_icon_cache_update
230 }
231
232 pkg_postrm() {
233 gnome2_icon_cache_update
234 }
235
236
237
238 1.1 www-client/firefox-bin/firefox-bin-32.0.3.ebuild
239
240 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-32.0.3.ebuild?rev=1.1&view=markup
241 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-32.0.3.ebuild?rev=1.1&content-type=text/plain
242
243 Index: firefox-bin-32.0.3.ebuild
244 ===================================================================
245 # Copyright 1999-2014 Gentoo Foundation
246 # Distributed under the terms of the GNU General Public License v2
247 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-32.0.3.ebuild,v 1.1 2014/09/26 15:02:42 axs Exp $
248
249 EAPI="5"
250
251 # Can be updated using scripts/get_langs.sh from mozilla overlay
252 MOZ_LANGS=(af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
253 en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl
254 gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lt lv mai mk ml mr nb-NO
255 nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta
256 te tr uk vi zh-CN zh-TW zu)
257
258 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
259 MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI
260 MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
261 MOZ_PN="${PN/-bin}"
262 MOZ_P="${MOZ_PN}-${MOZ_PV}"
263
264 # Upstream ftp release URI that's used by mozlinguas.eclass
265 # We don't use the http mirror because it deletes old tarballs.
266 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
267
268 inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas nsplugins
269
270 DESCRIPTION="Firefox Web Browser"
271 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
272 SRC_URI="${SRC_URI}
273 amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
274 x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
275 HOMEPAGE="http://www.mozilla.com/firefox"
276 RESTRICT="strip mirror"
277
278 KEYWORDS="-* ~amd64 ~x86"
279 SLOT="0"
280 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
281 IUSE="selinux startup-notification"
282
283 DEPEND="app-arch/unzip
284 selinux? ( sec-policy/selinux-mozilla )"
285 RDEPEND="dev-libs/dbus-glib
286 virtual/freedesktop-icon-theme
287 x11-libs/libXrender
288 x11-libs/libXt
289 x11-libs/libXmu
290
291 selinux? ( sec-policy/selinux-mozilla )
292 >=x11-libs/gtk+-2.2:2
293 >=media-libs/alsa-lib-1.0.16
294 "
295
296 QA_PREBUILT="
297 opt/${MOZ_PN}/*.so
298 opt/${MOZ_PN}/${MOZ_PN}
299 opt/${MOZ_PN}/${PN}
300 opt/${MOZ_PN}/crashreporter
301 opt/${MOZ_PN}/webapprt-stub
302 opt/${MOZ_PN}/plugin-container
303 opt/${MOZ_PN}/mozilla-xremote-client
304 opt/${MOZ_PN}/updater
305 "
306
307 S="${WORKDIR}/${MOZ_PN}"
308
309 src_unpack() {
310 unpack ${A}
311
312 # Unpack language packs
313 mozlinguas_src_unpack
314 }
315
316 src_install() {
317 declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
318
319 local size sizes icon_path icon name
320 sizes="16 32 48"
321 icon_path="${S}/browser/chrome/icons/default"
322 icon="${PN}"
323 name="Mozilla Firefox"
324
325 # Install icons and .desktop for menu entry
326 for size in ${sizes}; do
327 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
328 newins "${icon_path}/default${size}.png" "${icon}.png" || die
329 done
330 # The 128x128 icon has a different name
331 insinto "/usr/share/icons/hicolor/128x128/apps"
332 newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
333 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
334 newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png
335 domenu "${FILESDIR}"/${PN}.desktop
336 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
337 "${ED}/usr/share/applications/${PN}.desktop" || die
338
339 # Add StartupNotify=true bug 237317
340 if use startup-notification; then
341 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop
342 fi
343
344 # Install firefox in /opt
345 dodir ${MOZILLA_FIVE_HOME%/*}
346 mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die
347
348 # Fix prefs that make no sense for a system-wide install
349 insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
350 doins "${FILESDIR}"/local-settings.js
351 # Copy preferences file so we can do a simple rename.
352 cp "${FILESDIR}"/all-gentoo-1.js "${D}"${MOZILLA_FIVE_HOME}/all-gentoo.js
353
354 # Install language packs
355 mozlinguas_src_install
356
357 local LANG=${linguas%% *}
358 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
359 elog "Setting default locale to ${LANG}"
360 echo "pref(\"general.useragent.locale\", \"${LANG}\");" \
361 >> "${D}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
362 die "sed failed to change locale"
363 fi
364
365 # Create /usr/bin/firefox-bin
366 dodir /usr/bin/
367 cat <<-EOF >"${D}"/usr/bin/${PN}
368 #!/bin/sh
369 unset LD_PRELOAD
370 LD_LIBRARY_PATH="/opt/firefox/"
371 GTK_PATH=/usr/lib/gtk-2.0/
372 exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
373 EOF
374 fperms 0755 /usr/bin/${PN}
375
376 # revdep-rebuild entry
377 insinto /etc/revdep-rebuild
378 echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN}
379 doins "${T}"/10${PN} || die
380
381 # Plugins dir
382 share_plugins_dir
383
384 # Required in order to use plugins and even run firefox on hardened.
385 pax-mark mr "${ED}"/${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
386 }
387
388 pkg_preinst() {
389 gnome2_icon_savelist
390 }
391
392 pkg_postinst() {
393 if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \
394 || ! has_version 'net-misc/curl'; then
395 einfo
396 einfo "For using the crashreporter, you need gnome-base/gconf,"
397 einfo "gnome-base/orbit and net-misc/curl emerged."
398 einfo
399 fi
400 # Drop requirement of curl not built with nss as it's not necessary anymore
401 #if has_version 'net-misc/curl[nss]'; then
402 # einfo
403 # einfo "Crashreporter won't be able to send reports"
404 # einfo "if you have curl emerged with the nss USE-flag"
405 # einfo
406 #fi
407
408 # Update mimedb for the new .desktop file
409 fdo-mime_desktop_database_update
410 gnome2_icon_cache_update
411 }
412
413 pkg_postrm() {
414 gnome2_icon_cache_update
415 }
416
417
418
419 1.1 www-client/firefox-bin/firefox-bin-31.1.1.ebuild
420
421 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-31.1.1.ebuild?rev=1.1&view=markup
422 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-31.1.1.ebuild?rev=1.1&content-type=text/plain
423
424 Index: firefox-bin-31.1.1.ebuild
425 ===================================================================
426 # Copyright 1999-2014 Gentoo Foundation
427 # Distributed under the terms of the GNU General Public License v2
428 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-31.1.1.ebuild,v 1.1 2014/09/26 15:02:42 axs Exp $
429
430 EAPI="5"
431 MOZ_ESR="1"
432
433 # Can be updated using scripts/get_langs.sh from mozilla overlay
434 MOZ_LANGS=(af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
435 en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl
436 gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lt lv mai mk ml mr nb-NO
437 nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta
438 te tr uk vi zh-CN zh-TW zu)
439
440 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
441 MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI
442 MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
443 MOZ_PN="${PN/-bin}"
444 MOZ_P="${MOZ_PN}-${MOZ_PV}"
445
446 # Upstream ftp release URI that's used by mozlinguas.eclass
447 # We don't use the http mirror because it deletes old tarballs.
448 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
449
450 if [[ ${MOZ_ESR} == 1 ]]; then
451 # ESR releases have slightly version numbers
452 MOZ_PV="${MOZ_PV}esr"
453 fi
454 MOZ_P="${MOZ_PN}-${MOZ_PV}"
455
456 inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas nsplugins
457
458 DESCRIPTION="Firefox Web Browser"
459 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
460 SRC_URI="${SRC_URI}
461 amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
462 x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
463 HOMEPAGE="http://www.mozilla.com/firefox"
464 RESTRICT="strip mirror"
465
466 KEYWORDS="-* ~amd64 ~x86"
467 SLOT="0"
468 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
469 IUSE="selinux startup-notification"
470
471 DEPEND="app-arch/unzip
472 selinux? ( sec-policy/selinux-mozilla )"
473 RDEPEND="dev-libs/dbus-glib
474 virtual/freedesktop-icon-theme
475 x11-libs/libXrender
476 x11-libs/libXt
477 x11-libs/libXmu
478
479 selinux? ( sec-policy/selinux-mozilla )
480 >=x11-libs/gtk+-2.2:2
481 >=media-libs/alsa-lib-1.0.16
482 "
483
484 QA_PREBUILT="
485 opt/${MOZ_PN}/*.so
486 opt/${MOZ_PN}/${MOZ_PN}
487 opt/${MOZ_PN}/${PN}
488 opt/${MOZ_PN}/crashreporter
489 opt/${MOZ_PN}/webapprt-stub
490 opt/${MOZ_PN}/plugin-container
491 opt/${MOZ_PN}/mozilla-xremote-client
492 opt/${MOZ_PN}/updater
493 "
494
495 S="${WORKDIR}/${MOZ_PN}"
496
497 src_unpack() {
498 unpack ${A}
499
500 # Unpack language packs
501 mozlinguas_src_unpack
502 }
503
504 src_install() {
505 declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
506
507 local size sizes icon_path icon name
508 sizes="16 32 48"
509 icon_path="${S}/browser/chrome/icons/default"
510 icon="${PN}"
511 name="Mozilla Firefox"
512
513 # Install icons and .desktop for menu entry
514 for size in ${sizes}; do
515 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
516 newins "${icon_path}/default${size}.png" "${icon}.png" || die
517 done
518 # The 128x128 icon has a different name
519 insinto "/usr/share/icons/hicolor/128x128/apps"
520 newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
521 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
522 newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png
523 domenu "${FILESDIR}"/${PN}.desktop
524 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
525 "${ED}/usr/share/applications/${PN}.desktop" || die
526
527 # Add StartupNotify=true bug 237317
528 if use startup-notification; then
529 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop
530 fi
531
532 # Install firefox in /opt
533 dodir ${MOZILLA_FIVE_HOME%/*}
534 mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die
535
536 # Fix prefs that make no sense for a system-wide install
537 insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
538 doins "${FILESDIR}"/local-settings.js
539 # Copy preferences file so we can do a simple rename.
540 cp "${FILESDIR}"/all-gentoo-1.js "${D}"${MOZILLA_FIVE_HOME}/all-gentoo.js
541
542 # Install language packs
543 mozlinguas_src_install
544
545 local LANG=${linguas%% *}
546 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
547 elog "Setting default locale to ${LANG}"
548 echo "pref(\"general.useragent.locale\", \"${LANG}\");" \
549 >> "${D}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
550 die "sed failed to change locale"
551 fi
552
553 # Create /usr/bin/firefox-bin
554 dodir /usr/bin/
555 cat <<-EOF >"${D}"/usr/bin/${PN}
556 #!/bin/sh
557 unset LD_PRELOAD
558 LD_LIBRARY_PATH="/opt/firefox/"
559 GTK_PATH=/usr/lib/gtk-2.0/
560 exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
561 EOF
562 fperms 0755 /usr/bin/${PN}
563
564 # revdep-rebuild entry
565 insinto /etc/revdep-rebuild
566 echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN}
567 doins "${T}"/10${PN} || die
568
569 # Plugins dir
570 share_plugins_dir
571
572 # Required in order to use plugins and even run firefox on hardened.
573 pax-mark mr "${ED}"/${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
574 }
575
576 pkg_preinst() {
577 gnome2_icon_savelist
578 }
579
580 pkg_postinst() {
581 if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \
582 || ! has_version 'net-misc/curl'; then
583 einfo
584 einfo "For using the crashreporter, you need gnome-base/gconf,"
585 einfo "gnome-base/orbit and net-misc/curl emerged."
586 einfo
587 fi
588 # Drop requirement of curl not built with nss as it's not necessary anymore
589 #if has_version 'net-misc/curl[nss]'; then
590 # einfo
591 # einfo "Crashreporter won't be able to send reports"
592 # einfo "if you have curl emerged with the nss USE-flag"
593 # einfo
594 #fi
595
596 # Update mimedb for the new .desktop file
597 fdo-mime_desktop_database_update
598 gnome2_icon_cache_update
599 }
600
601 pkg_postrm() {
602 gnome2_icon_cache_update
603 }