1 |
commit: f3323aa619d862424a67199a178609abbeb88037 |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 29 20:40:21 2014 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 29 20:40:21 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=f3323aa6 |
7 |
|
8 |
fixed version bump commit, and fixed USE=wifi logic in eclass |
9 |
|
10 |
--- |
11 |
eclass/mozconfig-v4.eclass | 19 +- |
12 |
www-client/firefox/firefox-31.0.ebuild | 398 +++++++++++++++++++++++++++++++++ |
13 |
2 files changed, 409 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/eclass/mozconfig-v4.eclass b/eclass/mozconfig-v4.eclass |
16 |
index 72d66b2..ec4175a 100644 |
17 |
--- a/eclass/mozconfig-v4.eclass |
18 |
+++ b/eclass/mozconfig-v4.eclass |
19 |
@@ -12,7 +12,7 @@ IUSE="dbus debug startup-notification" |
20 |
RDEPEND=">=app-text/hunspell-1.2 |
21 |
dev-libs/expat |
22 |
>=dev-libs/libevent-1.4.7 |
23 |
- >=x11-libs/cairo-1.10[X] |
24 |
+ >=x11-libs/cairo-1.12[X] |
25 |
>=x11-libs/gtk+-2.10:2 |
26 |
>=x11-libs/pango-1.22.0 |
27 |
media-libs/alsa-lib |
28 |
@@ -20,6 +20,7 @@ RDEPEND=">=app-text/hunspell-1.2 |
29 |
dbus? ( >=dev-libs/dbus-glib-0.72 ) |
30 |
startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
31 |
wifi? ( >=sys-apps/dbus-0.60 |
32 |
+ >=dev-libs/dbus-glib-0.72 |
33 |
net-wireless/wireless-tools ) |
34 |
>=dev-libs/glib-2.26:2" |
35 |
|
36 |
@@ -47,14 +48,18 @@ mozconfig_config() { |
37 |
|
38 |
mozconfig_use_enable startup-notification |
39 |
|
40 |
- if has wifi ${IUSE} && use wifi; then |
41 |
- if ! use dbus; then |
42 |
+ if has wifi ${IUSE} ; then |
43 |
+ # wifi pulls in dbus so manage both here |
44 |
+ mozconfig_use_enable wifi necko-wifi |
45 |
+ if use wifi && ! use dbus; then |
46 |
echo "Enabling dbus support due to wifi request" |
47 |
- mozconfig_annotate wifi --enable-necko-wifi |
48 |
- mozconfig_annotate dbus --enable-dbus |
49 |
+ mozconfig_annotate 'dbus required by necko-wifi' --enable-dbus |
50 |
else |
51 |
- mozconfig_annotate wifi --enable-necko-wifi |
52 |
+ mozconfig_use_enable dbus |
53 |
fi |
54 |
+ else |
55 |
+ mozconfig_use_enable dbus |
56 |
+ mozconfig_annotate 'disabled' --disable-necko-wifi |
57 |
fi |
58 |
|
59 |
mozconfig_annotate 'required' --enable-ogg |
60 |
@@ -65,8 +70,6 @@ mozconfig_config() { |
61 |
mozconfig_use_enable jit yarr-jit |
62 |
fi |
63 |
|
64 |
- mozconfig_use_enable dbus |
65 |
- |
66 |
# These are enabled by default in all mozilla applications |
67 |
mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr |
68 |
mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr |
69 |
|
70 |
diff --git a/www-client/firefox/firefox-31.0.ebuild b/www-client/firefox/firefox-31.0.ebuild |
71 |
new file mode 100644 |
72 |
index 0000000..93e4b71 |
73 |
--- /dev/null |
74 |
+++ b/www-client/firefox/firefox-31.0.ebuild |
75 |
@@ -0,0 +1,398 @@ |
76 |
+# Copyright 1999-2014 Gentoo Foundation |
77 |
+# Distributed under the terms of the GNU General Public License v2 |
78 |
+# $Header: $ |
79 |
+ |
80 |
+EAPI="5" |
81 |
+VIRTUALX_REQUIRED="pgo" |
82 |
+WANT_AUTOCONF="2.1" |
83 |
+MOZ_ESR="" |
84 |
+ |
85 |
+# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
86 |
+MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en |
87 |
+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 |
88 |
+gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko ku lt lv mai mk ml mr |
89 |
+nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te |
90 |
+th tr uk vi xh zh-CN zh-TW zu ) |
91 |
+ |
92 |
+# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
93 |
+MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
94 |
+MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
95 |
+MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
96 |
+ |
97 |
+if [[ ${MOZ_ESR} == 1 ]]; then |
98 |
+ # ESR releases have slightly version numbers |
99 |
+ MOZ_PV="${MOZ_PV}esr" |
100 |
+fi |
101 |
+ |
102 |
+# Patch version |
103 |
+PATCH="${PN}-31.0-patches-0.1" |
104 |
+# Upstream ftp release URI that's used by mozlinguas.eclass |
105 |
+# We don't use the http mirror because it deletes old tarballs. |
106 |
+MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/" |
107 |
+MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/" |
108 |
+ |
109 |
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v4 multilib pax-utils fdo-mime autotools virtualx mozlinguas |
110 |
+ |
111 |
+DESCRIPTION="Firefox Web Browser" |
112 |
+HOMEPAGE="http://www.mozilla.com/firefox" |
113 |
+ |
114 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
115 |
+SLOT="0" |
116 |
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
117 |
+IUSE="bindist gstreamer hardened +jit +minimal pgo pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite test wifi" |
118 |
+ |
119 |
+# More URIs appended below... |
120 |
+SRC_URI="${SRC_URI} |
121 |
+ http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz |
122 |
+ http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz" |
123 |
+ |
124 |
+ASM_DEPEND=">=dev-lang/yasm-1.1" |
125 |
+ |
126 |
+# Mesa 7.10 needed for WebGL + bugfixes |
127 |
+RDEPEND=" |
128 |
+ >=dev-libs/nss-3.16.2 |
129 |
+ >=dev-libs/nspr-4.10.6 |
130 |
+ >=media-libs/mesa-7.10 |
131 |
+ >=media-libs/libpng-1.6.7[apng] |
132 |
+ virtual/libffi |
133 |
+ gstreamer? ( media-plugins/gst-plugins-meta:1.0[ffmpeg] ) |
134 |
+ pulseaudio? ( media-sound/pulseaudio ) |
135 |
+ system-cairo? ( >=x11-libs/cairo-1.12[X] ) |
136 |
+ system-icu? ( >=dev-libs/icu-51.1 ) |
137 |
+ system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
138 |
+ system-sqlite? ( >=dev-db/sqlite-3.8.3.1:3[secure-delete,debug=] ) |
139 |
+ >=media-libs/libvpx-1.3.0 |
140 |
+ kernel_linux? ( media-libs/alsa-lib ) |
141 |
+ selinux? ( sec-policy/selinux-mozilla )" |
142 |
+ |
143 |
+DEPEND="${RDEPEND} |
144 |
+ >=sys-devel/binutils-2.16.1 |
145 |
+ virtual/pkgconfig |
146 |
+ pgo? ( |
147 |
+ >=sys-devel/gcc-4.5 ) |
148 |
+ amd64? ( ${ASM_DEPEND} |
149 |
+ virtual/opengl ) |
150 |
+ x86? ( ${ASM_DEPEND} |
151 |
+ virtual/opengl )" |
152 |
+ |
153 |
+# No source releases for alpha|beta |
154 |
+if [[ ${PV} =~ alpha ]]; then |
155 |
+ CHANGESET="8a3042764de7" |
156 |
+ SRC_URI="${SRC_URI} |
157 |
+ http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2" |
158 |
+ S="${WORKDIR}/mozilla-aurora-${CHANGESET}" |
159 |
+elif [[ ${PV} =~ beta ]]; then |
160 |
+ S="${WORKDIR}/mozilla-beta" |
161 |
+ SRC_URI="${SRC_URI} |
162 |
+ ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2 |
163 |
+ ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
164 |
+else |
165 |
+ SRC_URI="${SRC_URI} |
166 |
+ ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2 |
167 |
+ ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
168 |
+ if [[ ${MOZ_ESR} == 1 ]]; then |
169 |
+ S="${WORKDIR}/mozilla-esr${PV%%.*}" |
170 |
+ else |
171 |
+ S="${WORKDIR}/mozilla-release" |
172 |
+ fi |
173 |
+fi |
174 |
+ |
175 |
+QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
176 |
+ |
177 |
+pkg_setup() { |
178 |
+ moz_pkgsetup |
179 |
+ |
180 |
+ # Avoid PGO profiling problems due to enviroment leakage |
181 |
+ # These should *always* be cleaned up anyway |
182 |
+ unset DBUS_SESSION_BUS_ADDRESS \ |
183 |
+ DISPLAY \ |
184 |
+ ORBIT_SOCKETDIR \ |
185 |
+ SESSION_MANAGER \ |
186 |
+ XDG_SESSION_COOKIE \ |
187 |
+ XAUTHORITY |
188 |
+ |
189 |
+ if ! use bindist; then |
190 |
+ einfo |
191 |
+ elog "You are enabling official branding. You may not redistribute this build" |
192 |
+ elog "to any users on your network or the internet. Doing so puts yourself into" |
193 |
+ elog "a legal problem with Mozilla Foundation" |
194 |
+ elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
195 |
+ fi |
196 |
+ |
197 |
+ if use pgo; then |
198 |
+ einfo |
199 |
+ ewarn "You will do a double build for profile guided optimization." |
200 |
+ ewarn "This will result in your build taking at least twice as long as before." |
201 |
+ fi |
202 |
+} |
203 |
+ |
204 |
+pkg_pretend() { |
205 |
+ # Ensure we have enough disk space to compile |
206 |
+ if use pgo || use debug || use test ; then |
207 |
+ CHECKREQS_DISK_BUILD="8G" |
208 |
+ else |
209 |
+ CHECKREQS_DISK_BUILD="4G" |
210 |
+ fi |
211 |
+ check-reqs_pkg_setup |
212 |
+} |
213 |
+ |
214 |
+src_unpack() { |
215 |
+ unpack ${A} |
216 |
+ |
217 |
+ # Unpack language packs |
218 |
+ mozlinguas_src_unpack |
219 |
+} |
220 |
+ |
221 |
+src_prepare() { |
222 |
+ # Apply our patches |
223 |
+ EPATCH_SUFFIX="patch" \ |
224 |
+ EPATCH_FORCE="yes" \ |
225 |
+ epatch "${WORKDIR}/firefox" |
226 |
+ |
227 |
+ # Allow user to apply any additional patches without modifing ebuild |
228 |
+ epatch_user |
229 |
+ |
230 |
+ # Enable gnomebreakpad |
231 |
+ if use debug ; then |
232 |
+ sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
233 |
+ "${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
234 |
+ fi |
235 |
+ |
236 |
+ # Ensure that our plugins dir is enabled as default |
237 |
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
238 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
239 |
+ sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
240 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
241 |
+ |
242 |
+ # Fix sandbox violations during make clean, bug 372817 |
243 |
+ sed -e "s:\(/no-such-file\):${T}\1:g" \ |
244 |
+ -i "${S}"/config/rules.mk \ |
245 |
+ -i "${S}"/nsprpub/configure{.in,} \ |
246 |
+ || die |
247 |
+ |
248 |
+ # Don't exit with error when some libs are missing which we have in |
249 |
+ # system. |
250 |
+ sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
251 |
+ -i "${S}"/browser/installer/Makefile.in || die |
252 |
+ |
253 |
+ # Don't error out when there's no files to be removed: |
254 |
+ sed 's@\(xargs rm\)$@\1 -f@' \ |
255 |
+ -i "${S}"/toolkit/mozapps/installer/packager.mk || die |
256 |
+ |
257 |
+ eautoreconf |
258 |
+ |
259 |
+ # Must run autoconf in js/src |
260 |
+ cd "${S}"/js/src || die |
261 |
+ eautoconf |
262 |
+} |
263 |
+ |
264 |
+src_configure() { |
265 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
266 |
+ MEXTENSIONS="default" |
267 |
+ # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) |
268 |
+ # Note: These are for Gentoo Linux use ONLY. For your own distribution, please |
269 |
+ # get your own set of keys. |
270 |
+ _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
271 |
+ |
272 |
+ #################################### |
273 |
+ # |
274 |
+ # mozconfig, CFLAGS and CXXFLAGS setup |
275 |
+ # |
276 |
+ #################################### |
277 |
+ |
278 |
+ mozconfig_init |
279 |
+ mozconfig_config |
280 |
+ |
281 |
+ # It doesn't compile on alpha without this LDFLAGS |
282 |
+ use alpha && append-ldflags "-Wl,--no-relax" |
283 |
+ |
284 |
+ # Add full relro support for hardened |
285 |
+ use hardened && append-ldflags "-Wl,-z,relro,-z,now" |
286 |
+ |
287 |
+ # We must force enable jemalloc 3 threw .mozconfig |
288 |
+ echo "export MOZ_JEMALLOC=1" >> "${S}"/.mozconfig || die |
289 |
+ |
290 |
+ # Setup api key for location services |
291 |
+ echo -n "${_google_api_key}" > "${S}"/google-api-key |
292 |
+ mozconfig_annotate '' --with-google-api-keyfile=${S}/google-api-key |
293 |
+ |
294 |
+ mozconfig_annotate '' --enable-jemalloc |
295 |
+ mozconfig_annotate '' --enable-replace-malloc |
296 |
+ mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
297 |
+ mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
298 |
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
299 |
+ mozconfig_annotate '' --disable-gconf |
300 |
+ mozconfig_annotate '' --disable-mailnews |
301 |
+ mozconfig_annotate '' --with-system-png |
302 |
+ mozconfig_annotate '' --enable-system-ffi |
303 |
+ mozconfig_annotate '' --disable-gold |
304 |
+ |
305 |
+ # Other ff-specific settings |
306 |
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
307 |
+ mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" |
308 |
+ mozconfig_annotate '' --build="${CTARGET:-${CHOST}}" |
309 |
+ |
310 |
+ # gstreamer now needs the version specified |
311 |
+ if use gstreamer; then |
312 |
+ mozconfig_annotate '' --enable-gstreamer=1.0 |
313 |
+ else |
314 |
+ mozconfig_annotate '' --disable-gstreamer |
315 |
+ fi |
316 |
+ mozconfig_use_enable pulseaudio |
317 |
+ mozconfig_use_enable system-cairo |
318 |
+ mozconfig_use_enable system-sqlite |
319 |
+ mozconfig_use_with system-jpeg |
320 |
+ mozconfig_use_with system-icu |
321 |
+ mozconfig_use_enable system-icu intl-api |
322 |
+ |
323 |
+ # Allow for a proper pgo build |
324 |
+ if use pgo; then |
325 |
+ echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
326 |
+ fi |
327 |
+ |
328 |
+ # Finalize and report settings |
329 |
+ mozconfig_final |
330 |
+ |
331 |
+ if [[ $(gcc-major-version) -lt 4 ]]; then |
332 |
+ append-cxxflags -fno-stack-protector |
333 |
+ elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
334 |
+ if use amd64 || use x86; then |
335 |
+ append-flags -mno-avx |
336 |
+ fi |
337 |
+ fi |
338 |
+} |
339 |
+ |
340 |
+src_compile() { |
341 |
+ if use pgo; then |
342 |
+ addpredict /root |
343 |
+ addpredict /etc/gconf |
344 |
+ # Reset and cleanup environment variables used by GNOME/XDG |
345 |
+ gnome2_environment_reset |
346 |
+ |
347 |
+ # Firefox tries to use dri stuff when it's run, see bug 380283 |
348 |
+ shopt -s nullglob |
349 |
+ cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
350 |
+ if test -z "${cards}"; then |
351 |
+ cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') |
352 |
+ if test -n "${cards}"; then |
353 |
+ # Binary drivers seem to cause access violations anyway, so |
354 |
+ # let's use indirect rendering so that the device files aren't |
355 |
+ # touched at all. See bug 394715. |
356 |
+ export LIBGL_ALWAYS_INDIRECT=1 |
357 |
+ fi |
358 |
+ fi |
359 |
+ shopt -u nullglob |
360 |
+ addpredict "${cards}" |
361 |
+ |
362 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
363 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
364 |
+ Xemake -f client.mk profiledbuild || die "Xemake failed" |
365 |
+ else |
366 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
367 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
368 |
+ emake -f client.mk |
369 |
+ fi |
370 |
+ |
371 |
+} |
372 |
+ |
373 |
+src_install() { |
374 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
375 |
+ DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
376 |
+ |
377 |
+ # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. |
378 |
+ local obj_dir="$(echo */config.log)" |
379 |
+ obj_dir="${obj_dir%/*}" |
380 |
+ cd "${S}/${obj_dir}" || die |
381 |
+ |
382 |
+ # Pax mark xpcshell for hardened support, only used for startupcache creation. |
383 |
+ pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell |
384 |
+ |
385 |
+ # Add our default prefs for firefox |
386 |
+ cp "${FILESDIR}"/gentoo-default-prefs.js-1 \ |
387 |
+ "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
388 |
+ || die |
389 |
+ |
390 |
+ # Set default path to search for dictionaries. |
391 |
+ echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
392 |
+ >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
393 |
+ || die |
394 |
+ |
395 |
+ echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
396 |
+ "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
397 |
+ || die |
398 |
+ |
399 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
400 |
+ emake DESTDIR="${D}" install |
401 |
+ |
402 |
+ # Install language packs |
403 |
+ mozlinguas_src_install |
404 |
+ |
405 |
+ local size sizes icon_path icon name |
406 |
+ if use bindist; then |
407 |
+ sizes="16 32 48" |
408 |
+ icon_path="${S}/browser/branding/aurora" |
409 |
+ # Firefox's new rapid release cycle means no more codenames |
410 |
+ # Let's just stick with this one... |
411 |
+ icon="aurora" |
412 |
+ name="Aurora" |
413 |
+ else |
414 |
+ sizes="16 22 24 32 256" |
415 |
+ icon_path="${S}/browser/branding/official" |
416 |
+ icon="${PN}" |
417 |
+ name="Mozilla Firefox" |
418 |
+ fi |
419 |
+ |
420 |
+ # Install icons and .desktop for menu entry |
421 |
+ for size in ${sizes}; do |
422 |
+ insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
423 |
+ newins "${icon_path}/default${size}.png" "${icon}.png" |
424 |
+ done |
425 |
+ # The 128x128 icon has a different name |
426 |
+ insinto "/usr/share/icons/hicolor/128x128/apps" |
427 |
+ newins "${icon_path}/mozicon128.png" "${icon}.png" |
428 |
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
429 |
+ newicon "${icon_path}/content/icon48.png" "${icon}.png" |
430 |
+ newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
431 |
+ sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
432 |
+ "${ED}/usr/share/applications/${PN}.desktop" || die |
433 |
+ |
434 |
+ # Add StartupNotify=true bug 237317 |
435 |
+ if use startup-notification ; then |
436 |
+ echo "StartupNotify=true"\ |
437 |
+ >> "${ED}/usr/share/applications/${PN}.desktop" \ |
438 |
+ || die |
439 |
+ fi |
440 |
+ |
441 |
+ # Required in order to use plugins and even run firefox on hardened. |
442 |
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} |
443 |
+ |
444 |
+ if use minimal; then |
445 |
+ rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \ |
446 |
+ || die "Failed to remove sdk and headers" |
447 |
+ fi |
448 |
+ |
449 |
+ # very ugly hack to make firefox not sigbus on sparc |
450 |
+ # FIXME: is this still needed?? |
451 |
+ use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
452 |
+ -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \ |
453 |
+ || die "sparc sed failed"; } |
454 |
+ |
455 |
+ # revdep-rebuild entry |
456 |
+ insinto /etc/revdep-rebuild |
457 |
+ echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10firefox |
458 |
+ doins "${T}"/10${PN} || die |
459 |
+} |
460 |
+ |
461 |
+pkg_preinst() { |
462 |
+ gnome2_icon_savelist |
463 |
+} |
464 |
+ |
465 |
+pkg_postinst() { |
466 |
+ # Update mimedb for the new .desktop file |
467 |
+ fdo-mime_desktop_database_update |
468 |
+ gnome2_icon_cache_update |
469 |
+} |
470 |
+ |
471 |
+pkg_postrm() { |
472 |
+ gnome2_icon_cache_update |
473 |
+} |