Line 0
Link Here
|
|
|
1 |
# HG changeset patch |
2 |
# User Felix Janda <felix.janda@posteo.de> |
3 |
# Date 1423173146 -3600 |
4 |
# Thu Feb 05 22:52:26 2015 +0100 |
5 |
# Node ID c084550fcab646d911bbf4f05747f228759161e4 |
6 |
# Parent 2d344ef8da33717224d5a08570dc834ca2254f9f |
7 |
profiler: avoid getcontext and gettid |
8 |
|
9 |
diff -r 2d344ef8da33 -r c084550fcab6 tools/profiler/GeckoTaskTracer.cpp |
10 |
--- a/mozilla/tools/profiler/GeckoTaskTracer.cpp Sun Feb 01 19:32:36 2015 +0100 |
Line 0
Link Here
|
|
|
1 |
# HG changeset patch |
2 |
# User Felix Janda <felix.janda@posteo.de> |
3 |
# Date 1428437372 -7200 |
4 |
# Tue Apr 07 22:09:32 2015 +0200 |
5 |
# Node ID e783ca150f8370a4d8811ceecc28707617e6a4b8 |
6 |
# Parent ab0490972e1e47a356c3fc2f9e749a2d77a9739b |
7 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=1152185 |
8 |
Include port/generic/include also for webrtc/signaling/test |
9 |
|
10 |
diff -r ab0490972e1e media/webrtc/signaling/test/moz.build |
11 |
--- a/mozilla/media/webrtc/signaling/test/moz.build Mon Apr 06 21:30:03 2015 -0400 |
Line 0
Link Here
|
|
|
1 |
# HG changeset patch |
2 |
# User Felix Janda <felix.janda@posteo.de> |
3 |
# Date 1423172498 -3600 |
4 |
# Thu Feb 05 22:41:38 2015 +0100 |
5 |
# Node ID 375c73854f92701f13403b8461b35727dccde825 |
6 |
# Parent 2d344ef8da33717224d5a08570dc834ca2254f9f |
7 |
# https://code.google.com/p/chromium/issues/detail?id=463208 |
8 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=1157864 |
9 |
chromium sandbox: Avoid cdefs.h |
10 |
|
11 |
diff -r 2d344ef8da33 -r 375c73854f92 security/sandbox/chromium/sandbox/linux/seccomp-bpf/linux_seccomp.h |
12 |
--- a/mozilla/security/sandbox/chromium/sandbox/linux/seccomp-bpf/linux_seccomp.h Sun Feb 01 19:32:36 2015 +0100 |
Line 0
Link Here
|
|
|
1 |
# HG changeset patch |
2 |
# User Felix Janda <felix.janda@posteo.de> |
3 |
# Date 1428142217 -7200 |
4 |
# Sat Apr 04 12:10:17 2015 +0200 |
5 |
# Node ID c04cc88f3bb26e254356df6de06583a542ae6796 |
6 |
# Parent 90adc073cbc6398f4fab9b1cd07b685368559f34 |
7 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=1157850 |
8 |
updater: no fts.h and MAXNAMLEN |
9 |
|
10 |
diff -r 90adc073cbc6 -r c04cc88f3bb2 toolkit/mozapps/update/common/updatedefines.h |
11 |
--- a/mozilla/toolkit/mozapps/update/common/updatedefines.h Thu Apr 02 08:10:00 2015 -0400 |
Line 0
Link Here
|
|
|
1 |
# HG changeset patch |
2 |
# User Felix Janda <felix.janda@posteo.de> |
3 |
# Date 1423172841 -3600 |
4 |
# Thu Feb 05 22:47:21 2015 +0100 |
5 |
# Node ID 48efa200aae98f4b5fced4f1afa4f1b8c8cde9e1 |
6 |
# Parent 3693f117ad5018927922c92cf5bd9739bc25f394 |
7 |
Bug 1130710 - xre: Use stdint uint*_t instead of nonstandard __uint*_t. r=bsmedberg |
8 |
|
9 |
diff -r 3693f117ad50 -r 48efa200aae9 toolkit/xre/nsSigHandlers.cpp |
10 |
--- a/mozilla/toolkit/xre/nsSigHandlers.cpp Mon Dec 01 18:50:26 2014 +0100 |
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2015 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Id$ |
4 |
|
5 |
EAPI="5" |
6 |
VIRTUALX_REQUIRED="pgo" |
7 |
WANT_AUTOCONF="2.1" |
8 |
MOZ_ESR=1 |
9 |
|
10 |
# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
11 |
# No official support as of fetch time |
12 |
# csb |
13 |
MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs cy da de el en |
14 |
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 |
15 |
gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko lt lv mai mk ml mr |
16 |
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 |
17 |
th tr uk vi xh zh-CN zh-TW ) |
18 |
|
19 |
# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
20 |
MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
21 |
MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
22 |
MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
23 |
|
24 |
if [[ ${MOZ_ESR} == 1 ]]; then |
25 |
# ESR releases have slightly version numbers |
26 |
MOZ_PV="${MOZ_PV}esr" |
27 |
fi |
28 |
|
29 |
# Patch version |
30 |
PATCH="${PN}-38.0-patches-04" |
31 |
MOZ_HTTP_URI="http://archive.mozilla.org/pub/${PN}/releases" |
32 |
|
33 |
MOZCONFIG_OPTIONAL_WIFI=1 |
34 |
MOZCONFIG_OPTIONAL_JIT="enabled" |
35 |
|
36 |
inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.38 multilib pax-utils fdo-mime autotools virtualx mozlinguas |
37 |
|
38 |
DESCRIPTION="Firefox Web Browser" |
39 |
HOMEPAGE="http://www.mozilla.com/firefox" |
40 |
|
41 |
KEYWORDS="amd64 ~arm ~ppc x86" |
42 |
|
43 |
SLOT="0" |
44 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
45 |
IUSE="bindist egl hardened +minimal neon pgo selinux +gmp-autoupdate test" |
46 |
RESTRICT="!bindist? ( bindist )" |
47 |
|
48 |
# More URIs appended below... |
49 |
SRC_URI="${SRC_URI} |
50 |
https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz |
51 |
https://dev.gentoo.org/~axs/mozilla/patchsets/${PATCH}.tar.xz |
52 |
https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz" |
53 |
|
54 |
ASM_DEPEND=">=dev-lang/yasm-1.1" |
55 |
|
56 |
# Mesa 7.10 needed for WebGL + bugfixes |
57 |
RDEPEND=" |
58 |
>=dev-libs/nss-3.20.1 |
59 |
>=dev-libs/nspr-4.10.10 |
60 |
selinux? ( sec-policy/selinux-mozilla )" |
61 |
|
62 |
DEPEND="${RDEPEND} |
63 |
pgo? ( |
64 |
>=sys-devel/gcc-4.5 ) |
65 |
amd64? ( ${ASM_DEPEND} |
66 |
virtual/opengl ) |
67 |
x86? ( ${ASM_DEPEND} |
68 |
virtual/opengl )" |
69 |
|
70 |
# No source releases for alpha|beta |
71 |
if [[ ${PV} =~ alpha ]]; then |
72 |
CHANGESET="8a3042764de7" |
73 |
SRC_URI="${SRC_URI} |
74 |
https://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2" |
75 |
S="${WORKDIR}/mozilla-aurora-${CHANGESET}" |
76 |
elif [[ ${PV} =~ beta ]]; then |
77 |
S="${WORKDIR}/mozilla-release" |
78 |
SRC_URI="${SRC_URI} |
79 |
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
80 |
else |
81 |
SRC_URI="${SRC_URI} |
82 |
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
83 |
if [[ ${MOZ_ESR} == 1 ]]; then |
84 |
S="${WORKDIR}/mozilla-esr${PV%%.*}" |
85 |
else |
86 |
S="${WORKDIR}/mozilla-release" |
87 |
fi |
88 |
fi |
89 |
|
90 |
QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
91 |
|
92 |
BUILD_OBJ_DIR="${S}/ff" |
93 |
|
94 |
pkg_setup() { |
95 |
moz_pkgsetup |
96 |
|
97 |
# Avoid PGO profiling problems due to enviroment leakage |
98 |
# These should *always* be cleaned up anyway |
99 |
unset DBUS_SESSION_BUS_ADDRESS \ |
100 |
DISPLAY \ |
101 |
ORBIT_SOCKETDIR \ |
102 |
SESSION_MANAGER \ |
103 |
XDG_SESSION_COOKIE \ |
104 |
XAUTHORITY |
105 |
|
106 |
if ! use bindist; then |
107 |
einfo |
108 |
elog "You are enabling official branding. You may not redistribute this build" |
109 |
elog "to any users on your network or the internet. Doing so puts yourself into" |
110 |
elog "a legal problem with Mozilla Foundation" |
111 |
elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
112 |
fi |
113 |
|
114 |
if use pgo; then |
115 |
einfo |
116 |
ewarn "You will do a double build for profile guided optimization." |
117 |
ewarn "This will result in your build taking at least twice as long as before." |
118 |
fi |
119 |
} |
120 |
|
121 |
pkg_pretend() { |
122 |
# Ensure we have enough disk space to compile |
123 |
if use pgo || use debug || use test ; then |
124 |
CHECKREQS_DISK_BUILD="8G" |
125 |
else |
126 |
CHECKREQS_DISK_BUILD="4G" |
127 |
fi |
128 |
check-reqs_pkg_setup |
129 |
} |
130 |
|
131 |
src_unpack() { |
132 |
unpack ${A} |
133 |
|
134 |
# Unpack language packs |
135 |
mozlinguas_src_unpack |
136 |
} |
137 |
|
138 |
src_prepare() { |
139 |
# Apply our patches |
140 |
EPATCH_SUFFIX="patch" \ |
141 |
EPATCH_FORCE="yes" \ |
142 |
EPATCH_EXCLUDE="8011_bug1194520-freetype261_until_moz43.patch" \ |
143 |
epatch "${WORKDIR}/firefox" |
144 |
|
145 |
|
146 |
## patches for building with musl libc |
147 |
|
148 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-crashreporter.patch # fixed? |
149 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-fts-header.patch # bug 1139173, fixed in 40.0.a1 |
150 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-u_int64_t.patch # bug 1130164, fixed in 39.0a1 |
151 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-profiler-gettid.patch # fixed? |
152 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-sandbox-cdefs.patch # bug 1157864, fixed in 42.0a1 |
153 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-updater.patch # bug 1157850, not fixed as of today |
154 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-basename.patch # bug 1041962, not fixed as of today |
155 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-sysctl-headers.patch # bug 1130175, fixed in 39.0a1 |
156 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-xpcom-blocksize.patch # bug 1152176, fixed in 41.0a1 |
157 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-cdefs-header.patch # bug 1151202, fixed in 40.0a1 |
158 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-xre.patch # bug 1130710, fixed in 40.0a1 |
159 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-netwerk.patch # from alpine |
160 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-bug-1130709.patch # bug 1130709, fixed in 40.0a1 |
161 |
epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-queue.patch # bug 1152185, fixed in 41.0a1 | works, but not sure if needed |
162 |
|
163 |
# epatch "${FILESDIR}"/musl-esr-patches/firefox-38.3.0-fix-bug-1130175.patch # cannot be applied due to major changes in mozilla/media/mtransport/third_party/nICEr/src/stun/addrs.c |
164 |
|
165 |
## end of musl patching |
166 |
|
167 |
|
168 |
# Allow user to apply any additional patches without modifing ebuild |
169 |
epatch_user |
170 |
|
171 |
# Enable gnomebreakpad |
172 |
if use debug ; then |
173 |
sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
174 |
"${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
175 |
fi |
176 |
|
177 |
# Ensure that our plugins dir is enabled as default |
178 |
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
179 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
180 |
sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
181 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
182 |
|
183 |
# Fix sandbox violations during make clean, bug 372817 |
184 |
sed -e "s:\(/no-such-file\):${T}\1:g" \ |
185 |
-i "${S}"/config/rules.mk \ |
186 |
-i "${S}"/nsprpub/configure{.in,} \ |
187 |
|| die |
188 |
|
189 |
# Don't exit with error when some libs are missing which we have in |
190 |
# system. |
191 |
sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
192 |
-i "${S}"/browser/installer/Makefile.in || die |
193 |
|
194 |
# Don't error out when there's no files to be removed: |
195 |
sed 's@\(xargs rm\)$@\1 -f@' \ |
196 |
-i "${S}"/toolkit/mozapps/installer/packager.mk || die |
197 |
|
198 |
eautoreconf |
199 |
|
200 |
# Must run autoconf in js/src |
201 |
cd "${S}"/js/src || die |
202 |
eautoconf |
203 |
|
204 |
# Need to update jemalloc's configure |
205 |
cd "${S}"/memory/jemalloc/src || die |
206 |
WANT_AUTOCONF= eautoconf |
207 |
} |
208 |
|
209 |
src_configure() { |
210 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
211 |
MEXTENSIONS="default" |
212 |
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) |
213 |
# Note: These are for Gentoo Linux use ONLY. For your own distribution, please |
214 |
# get your own set of keys. |
215 |
_google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
216 |
|
217 |
#################################### |
218 |
# |
219 |
# mozconfig, CFLAGS and CXXFLAGS setup |
220 |
# |
221 |
#################################### |
222 |
|
223 |
mozconfig_init |
224 |
mozconfig_config |
225 |
|
226 |
# It doesn't compile on alpha without this LDFLAGS |
227 |
use alpha && append-ldflags "-Wl,--no-relax" |
228 |
|
229 |
# Add full relro support for hardened |
230 |
use hardened && append-ldflags "-Wl,-z,relro,-z,now" |
231 |
|
232 |
if use neon ; then |
233 |
mozconfig_annotate '' --with-fpu=neon |
234 |
mozconfig_annotate '' --with-thumb=yes |
235 |
mozconfig_annotate '' --with-thumb-interwork=no |
236 |
fi |
237 |
|
238 |
if [[ ${CHOST} == armv* ]] ; then |
239 |
mozconfig_annotate '' --with-float-abi=hard |
240 |
mozconfig_annotate '' --enable-skia |
241 |
|
242 |
if ! use system-libvpx ; then |
243 |
sed -i -e "s|softfp|hard|" \ |
244 |
"${S}"/media/libvpx/moz.build |
245 |
fi |
246 |
fi |
247 |
|
248 |
use egl && mozconfig_annotate 'Enable EGL as GL provider' --with-gl-provider=EGL |
249 |
|
250 |
# Setup api key for location services |
251 |
echo -n "${_google_api_key}" > "${S}"/google-api-key |
252 |
mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key" |
253 |
|
254 |
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
255 |
mozconfig_annotate '' --disable-mailnews |
256 |
|
257 |
# Other ff-specific settings |
258 |
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
259 |
|
260 |
# Allow for a proper pgo build |
261 |
if use pgo; then |
262 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
263 |
fi |
264 |
|
265 |
echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig |
266 |
|
267 |
# Finalize and report settings |
268 |
mozconfig_final |
269 |
|
270 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
271 |
append-cxxflags -fno-stack-protector |
272 |
fi |
273 |
|
274 |
# workaround for funky/broken upstream configure... |
275 |
emake -f client.mk configure |
276 |
} |
277 |
|
278 |
src_compile() { |
279 |
if use pgo; then |
280 |
addpredict /root |
281 |
addpredict /etc/gconf |
282 |
# Reset and cleanup environment variables used by GNOME/XDG |
283 |
gnome2_environment_reset |
284 |
|
285 |
# Firefox tries to use dri stuff when it's run, see bug 380283 |
286 |
shopt -s nullglob |
287 |
cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
288 |
if test -z "${cards}"; then |
289 |
cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') |
290 |
if test -n "${cards}"; then |
291 |
# Binary drivers seem to cause access violations anyway, so |
292 |
# let's use indirect rendering so that the device files aren't |
293 |
# touched at all. See bug 394715. |
294 |
export LIBGL_ALWAYS_INDIRECT=1 |
295 |
fi |
296 |
fi |
297 |
shopt -u nullglob |
298 |
addpredict "${cards}" |
299 |
|
300 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
301 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
302 |
Xemake -f client.mk profiledbuild || die "Xemake failed" |
303 |
else |
304 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
305 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
306 |
emake -f client.mk realbuild |
307 |
fi |
308 |
|
309 |
} |
310 |
|
311 |
src_install() { |
312 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
313 |
DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
314 |
|
315 |
cd "${BUILD_OBJ_DIR}" || die |
316 |
|
317 |
# Pax mark xpcshell for hardened support, only used for startupcache creation. |
318 |
pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell |
319 |
|
320 |
# Add our default prefs for firefox |
321 |
cp "${FILESDIR}"/gentoo-default-prefs.js-1 \ |
322 |
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
323 |
|| die |
324 |
|
325 |
# Set default path to search for dictionaries. |
326 |
echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
327 |
>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
328 |
|| die |
329 |
|
330 |
echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
331 |
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
332 |
|| die |
333 |
|
334 |
local plugin |
335 |
use gmp-autoupdate || for plugin in \ |
336 |
gmp-gmpopenh264 ; do |
337 |
echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
338 |
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
339 |
|| die |
340 |
done |
341 |
|
342 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
343 |
emake DESTDIR="${D}" install |
344 |
|
345 |
# Install language packs |
346 |
mozlinguas_src_install |
347 |
|
348 |
local size sizes icon_path icon name |
349 |
if use bindist; then |
350 |
sizes="16 32 48" |
351 |
icon_path="${S}/browser/branding/aurora" |
352 |
# Firefox's new rapid release cycle means no more codenames |
353 |
# Let's just stick with this one... |
354 |
icon="aurora" |
355 |
name="Aurora" |
356 |
else |
357 |
sizes="16 22 24 32 256" |
358 |
icon_path="${S}/browser/branding/official" |
359 |
icon="${PN}" |
360 |
name="Mozilla Firefox" |
361 |
fi |
362 |
|
363 |
# Install icons and .desktop for menu entry |
364 |
for size in ${sizes}; do |
365 |
insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
366 |
newins "${icon_path}/default${size}.png" "${icon}.png" |
367 |
done |
368 |
# The 128x128 icon has a different name |
369 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
370 |
newins "${icon_path}/mozicon128.png" "${icon}.png" |
371 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
372 |
newicon "${icon_path}/content/icon48.png" "${icon}.png" |
373 |
newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
374 |
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
375 |
"${ED}/usr/share/applications/${PN}.desktop" || die |
376 |
|
377 |
# Add StartupNotify=true bug 237317 |
378 |
if use startup-notification ; then |
379 |
echo "StartupNotify=true"\ |
380 |
>> "${ED}/usr/share/applications/${PN}.desktop" \ |
381 |
|| die |
382 |
fi |
383 |
|
384 |
# Required in order to use plugins and even run firefox on hardened. |
385 |
if use jit; then |
386 |
pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} |
387 |
else |
388 |
pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container |
389 |
fi |
390 |
|
391 |
if use minimal; then |
392 |
rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \ |
393 |
|| die "Failed to remove sdk and headers" |
394 |
fi |
395 |
|
396 |
# very ugly hack to make firefox not sigbus on sparc |
397 |
# FIXME: is this still needed?? |
398 |
use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
399 |
-i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \ |
400 |
|| die "sparc sed failed"; } |
401 |
|
402 |
# revdep-rebuild entry |
403 |
insinto /etc/revdep-rebuild |
404 |
echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10firefox |
405 |
doins "${T}"/10${PN} || die |
406 |
|
407 |
# workaround to make firefox find libmozalloc.so on musl |
408 |
into / |
409 |
echo "LDPATH=${MOZILLA_FIVE_HOME}" > "${T}"/20firefox |
410 |
doenvd "${T}"/20firefox || die |
411 |
|
412 |
} |
413 |
|
414 |
pkg_preinst() { |
415 |
gnome2_icon_savelist |
416 |
} |
417 |
|
418 |
pkg_postinst() { |
419 |
# Update mimedb for the new .desktop file |
420 |
fdo-mime_desktop_database_update |
421 |
gnome2_icon_cache_update |
422 |
} |
423 |
|
424 |
pkg_postrm() { |
425 |
gnome2_icon_cache_update |
426 |
} |