commit: 582f348c4d4c6f4e588031ac31dd4ff694b1f569
Author: Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net>
AuthorDate: Wed Dec 10 01:30:02 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 20 00:37:06 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=582f348c
Add www-client/firefox-34.0.5
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
---
www-client/firefox/files/avoid-basename-musl.patch | 30 ++
.../firefox/files/avoid-fts-on-nonglibc-musl.patch | 55 +++
.../firefox/files/avoid-getcontext-musl.patch | 15 +
.../files/define-gettid-unconditonally-musl.patch | 11 +
.../firefox/files/dont-include-aouth-musl.patch | 14 +
.../dont-include-cdefsh-stagefright-musl.patch | 10 +
...refox-31.0-webm-disallow-negative-samples.patch | 29 ++
.../files/firefox-32.0-hppa-js-configure.patch | 21 +
.../files/firefox-33.0-jemalloc-configure.patch | 29 ++
.../firefox/files/fix-amd64-build-musl.patch | 39 ++
.../firefox/files/fix-android-check-musl.patch | 11 +
.../firefox/files/fix-jemalloc-includes-musl.patch | 10 +
.../files/fix-mtransport-includes-musl.patch | 20 +
.../firefox/files/fix-sctp-includes-musl.patch | 47 +++
www-client/firefox/files/gentoo-default-prefs.js-1 | 17 +
www-client/firefox/files/icon/firefox.desktop | 9 +
.../firefox/files/include-systypesh-musl.patch | 21 +
.../files/make-handleInt-unsigned-long-musl.patch | 11 +
www-client/firefox/files/stab.h | 72 ++++
www-client/firefox/firefox-34.0.5-r99.ebuild | 428 +++++++++++++++++++++
20 files changed, 899 insertions(+)
diff --git a/www-client/firefox/files/avoid-basename-musl.patch
b/www-client/firefox/files/avoid-basename-musl.patch
new file mode 100644
index 0000000..63ba50b
--- /dev/null
+++ b/www-client/firefox/files/avoid-basename-musl.patch
@@ -0,0 +1,30 @@
+---
a/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
++++
b/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
+@@ -834,9 +834,9 @@
+ // last slash, or the whole filename if there are no slashes.
+ string BaseFileName(const string &filename) {
+ // Lots of copies! basename's behavior is less than ideal.
+- char *c_filename = strdup(filename.c_str());
+- string base = basename(c_filename);
+- free(c_filename);
++ const char *c_filename = filename.c_str();
++ const char *p = strrchr(c_filename, '/');
++ string base = p ? p+1 : c_filename;
+ return base;
+ }
+
+--- a/mozilla-release/tools/profiler/LulElf.cpp
++++ b/mozilla-release/tools/profiler/LulElf.cpp
+@@ -580,9 +580,9 @@
+ // last slash, or the whole filename if there are no slashes.
+ string BaseFileName(const string &filename) {
+ // Lots of copies! basename's behavior is less than ideal.
+- char *c_filename = strdup(filename.c_str());
+- string base = basename(c_filename);
+- free(c_filename);
++ const char *c_filename = filename.c_str();
++ const char *p = strrchr(c_filename, '/');
++ string base = p ? p+1 : c_filename;
+ return base;
+ }
+
diff --git a/www-client/firefox/files/avoid-fts-on-nonglibc-musl.patch
b/www-client/firefox/files/avoid-fts-on-nonglibc-musl.patch
new file mode 100644
index 0000000..fdabf90
--- /dev/null
+++ b/www-client/firefox/files/avoid-fts-on-nonglibc-musl.patch
@@ -0,0 +1,55 @@
+--- a/mozilla-release/ipc/chromium/src/base/file_util.h
++++ b/mozilla-release/ipc/chromium/src/base/file_util.h
+@@ -14,10 +14,15 @@
+ #include <windows.h>
+ #elif defined(ANDROID)
+ #include <sys/stat.h>
++#define NO_FTS
+ #elif defined(OS_POSIX)
+ #include <sys/types.h>
+-#include <fts.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
++#include <fts.h>
++#else
++#define NO_FTS
++#endif
+ #endif
+
+ #include <stdio.h>
+--- a/mozilla-release/ipc/chromium/src/base/file_util_posix.cc
++++ b/mozilla-release/ipc/chromium/src/base/file_util_posix.cc
+@@ -8,13 +8,13 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+-#ifndef ANDROID
++#ifndef NO_FTS
+ #include <fts.h>
+ #endif
+ #include <libgen.h>
+ #include <stdio.h>
+ #include <string.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/mman.h>
+ #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
+ #include <sys/stat.h>
+@@ -67,7 +67,7 @@
+ if (!recursive)
+ return (rmdir(path_str) == 0);
+
+-#ifdef ANDROID
++#ifdef NO_FTS
+ // XXX Need ftsless impl for bionic
+ return false;
+ #else
+@@ -140,7 +140,7 @@
+ return false;
+ }
+
+-#ifdef ANDROID
++#ifdef NO_FTS
+ // XXX Need ftsless impl for bionic
+ return false;
+ #else
diff --git a/www-client/firefox/files/avoid-getcontext-musl.patch
b/www-client/firefox/files/avoid-getcontext-musl.patch
new file mode 100644
index 0000000..e8e2fc0
--- /dev/null
+++ b/www-client/firefox/files/avoid-getcontext-musl.patch
@@ -0,0 +1,15 @@
+--- a/mozilla-release/tools/profiler/platform-linux.cc
++++ b/mozilla-release/tools/profiler/platform-linux.cc
+@@ -625,10 +625,10 @@
+ {
+ MOZ_ASSERT(aContext);
+ ucontext_t* pContext = reinterpret_cast<ucontext_t*>(aContext);
+- if (!getcontext(pContext)) {
++ /*if (!getcontext(pContext)) {
+ context = pContext;
+ SetSampleContext(this, aContext);
+- }
++ }*/
+ }
+
+ void OS::SleepMicro(int microseconds)
diff --git a/www-client/firefox/files/define-gettid-unconditonally-musl.patch
b/www-client/firefox/files/define-gettid-unconditonally-musl.patch
new file mode 100644
index 0000000..5e42b72
--- /dev/null
+++ b/www-client/firefox/files/define-gettid-unconditonally-musl.patch
@@ -0,0 +1,11 @@
+--- a/mozilla-release/tools/profiler/platform-linux.cc
++++ b/mozilla-release/tools/profiler/platform-linux.cc
+@@ -84,7 +84,7 @@
+
+ #define SIGNAL_SAVE_PROFILE SIGUSR2
+
+-#if defined(__GLIBC__)
++#if defined(OS_LINUX) && !defined(ANDROID)
+ // glibc doesn't implement gettid(2).
+ #include <sys/syscall.h>
+ pid_t gettid()
diff --git a/www-client/firefox/files/dont-include-aouth-musl.patch
b/www-client/firefox/files/dont-include-aouth-musl.patch
new file mode 100644
index 0000000..eae5244
--- /dev/null
+++ b/www-client/firefox/files/dont-include-aouth-musl.patch
@@ -0,0 +1,14 @@
+---
a/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
++++
b/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
+@@ -53,9 +53,10 @@
+ #include <config.h>
+ #endif
+
+-#ifdef HAVE_A_OUT_H
++#if 0
+ #include <a.out.h>
+ #endif
++
+ #ifdef HAVE_MACH_O_NLIST_H
+ #include <mach-o/nlist.h>
+ #endif
diff --git
a/www-client/firefox/files/dont-include-cdefsh-stagefright-musl.patch
b/www-client/firefox/files/dont-include-cdefsh-stagefright-musl.patch
new file mode 100644
index 0000000..394820e
--- /dev/null
+++ b/www-client/firefox/files/dont-include-cdefsh-stagefright-musl.patch
@@ -0,0 +1,10 @@
+---
a/mozilla-release/media/libstagefright/system/core/include/cutils/properties.h
++++
b/mozilla-release/media/libstagefright/system/core/include/cutils/properties.h
+@@ -17,7 +17,6 @@
+ #ifndef __CUTILS_PROPERTIES_H
+ #define __CUTILS_PROPERTIES_H
+
+-#include <sys/cdefs.h>
+ #include <stddef.h>
+
+ #ifdef __cplusplus
diff --git
a/www-client/firefox/files/firefox-31.0-webm-disallow-negative-samples.patch
b/www-client/firefox/files/firefox-31.0-webm-disallow-negative-samples.patch
new file mode 100644
index 0000000..bccc25e
--- /dev/null
+++ b/www-client/firefox/files/firefox-31.0-webm-disallow-negative-samples.patch
@@ -0,0 +1,29 @@
+--- a/content/media/webm/WebMReader.cpp 2014-10-20 21:59:39.000000000
-0400
++++ b/content/media/webm/WebMReader.cpp 2014-10-28 09:06:51.959665416
-0400
+@@ -668,7 +668,15 @@
+ return true;
+ }
+ int32_t keepFrames = frames - skipFrames;
++ if (keepFrames < 0) {
++ NS_WARNING("Int overflow in keepFrames");
++ return false;
++ }
+ int samples = keepFrames * channels;
++ if (samples < 0) {
++ NS_WARNING("Int overflow in samples");
++ return false;
++ }
+ nsAutoArrayPtr<AudioDataValue> trimBuffer(new
AudioDataValue[samples]);
+ for (int i = 0; i < samples; i++)
+ trimBuffer[i] = buffer[skipFrames*channels + i];
+@@ -691,6 +699,10 @@
+ int32_t keepFrames = frames - discardFrames.value();
+ if (keepFrames > 0) {
+ int samples = keepFrames * channels;
++ if (samples < 0) {
++ NS_WARNING("Int overflow in samples");
++ return false;
++ }
+ nsAutoArrayPtr<AudioDataValue> trimBuffer(new
AudioDataValue[samples]);
+ for (int i = 0; i < samples; i++)
+ trimBuffer[i] = buffer[i];
diff --git a/www-client/firefox/files/firefox-32.0-hppa-js-configure.patch
b/www-client/firefox/files/firefox-32.0-hppa-js-configure.patch
new file mode 100644
index 0000000..c37edda
--- /dev/null
+++ b/www-client/firefox/files/firefox-32.0-hppa-js-configure.patch
@@ -0,0 +1,21 @@
+--- a/mozilla-release/js/src/configure.in
++++ b/mozilla-release/js/src/configure.in
+@@ -958,7 +958,7 @@
+ CPU_ARCH=s390x
+ ;;
+
+-hppa* | parisc)
++hppa* | parisc*)
+ CPU_ARCH=hppa
+ ;;
+
+@@ -2009,6 +2009,9 @@
+ AC_DEFINE(JS_CPU_MIPS)
+ AC_DEFINE(JS_NUNBOX32)
+ ;;
++hppa*)
++ AC_DEFINE(JS_NUNBOX32)
++ ;;
+ esac
+
+ MOZ_ARG_DISABLE_BOOL(ion,
diff --git a/www-client/firefox/files/firefox-33.0-jemalloc-configure.patch
b/www-client/firefox/files/firefox-33.0-jemalloc-configure.patch
new file mode 100644
index 0000000..0e6e11e
--- /dev/null
+++ b/www-client/firefox/files/firefox-33.0-jemalloc-configure.patch
@@ -0,0 +1,29 @@
+--- a/memory/jemalloc/src/configure.ac 2014-10-11 05:06:41.000000000 -0400
++++ b/memory/jemalloc/src/configure.ac 2014-10-16 13:41:10.809799170 -0400
+@@ -887,7 +887,7 @@
+ dnl Check whether the BSD/SUSv1 sbrk() exists. If not, disable DSS support.
+ AC_CHECK_FUNC([sbrk], [have_sbrk="1"], [have_sbrk="0"])
+ if test "x$have_sbrk" = "x1" ; then
+- if test "x$sbrk_deprecated" == "x1" ; then
++ if test "x$sbrk_deprecated" = "x1" ; then
+ AC_MSG_RESULT([Disabling dss allocation because sbrk is deprecated])
+ enable_dss="0"
+ else
+@@ -1180,7 +1180,7 @@
+ printf("%d\n", rv);
+ }
+ ], [je_cv_gcc_builtin_ffsl])
+-if test "x${je_cv_gcc_builtin_ffsl}" == "xyes" ; then
++if test "x${je_cv_gcc_builtin_ffsl}" = "xyes" ; then
+ AC_DEFINE([JEMALLOC_INTERNAL_FFSL], [__builtin_ffsl])
+ AC_DEFINE([JEMALLOC_INTERNAL_FFS], [__builtin_ffs])
+ else
+@@ -1194,7 +1194,7 @@
+ printf("%d\n", rv);
+ }
+ ], [je_cv_function_ffsl])
+- if test "x${je_cv_function_ffsl}" == "xyes" ; then
++ if test "x${je_cv_function_ffsl}" = "xyes" ; then
+ AC_DEFINE([JEMALLOC_INTERNAL_FFSL], [ffsl])
+ AC_DEFINE([JEMALLOC_INTERNAL_FFS], [ffs])
+ else
diff --git a/www-client/firefox/files/fix-amd64-build-musl.patch
b/www-client/firefox/files/fix-amd64-build-musl.patch
new file mode 100644
index 0000000..6482af8
--- /dev/null
+++ b/www-client/firefox/files/fix-amd64-build-musl.patch
@@ -0,0 +1,39 @@
+---
a/mozilla-release/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
++++
b/mozilla-release/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+@@ -2814,7 +2814,7 @@
+ LSS_INLINE _syscall6(void*, mmap, void*, s,
+ size_t, l, int, p,
+ int, f, int, d,
+- __off64_t, o)
++ off64_t, o)
+
+ LSS_INLINE _syscall4(int, newfstatat, int, d,
+ const char *, p,
+--- a/mozilla-release/toolkit/xre/nsSigHandlers.cpp
++++ b/mozilla-release/toolkit/xre/nsSigHandlers.cpp
+@@ -152,7 +152,7 @@
+ status->__invalid = status->__denorm = status->__zdiv = status->__ovrfl =
status->__undfl =
+ status->__precis = status->__stkflt = status->__errsumm = 0;
+
+- __uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
++ uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
+ *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
+ *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
+ #endif
+@@ -172,13 +172,13 @@
+ *sw &= ~FPU_STATUS_FLAGS;
+ #endif
+ #if defined(__amd64__)
+- __uint16_t *cw = &uc->uc_mcontext.fpregs->cwd;
++ uint16_t *cw = &uc->uc_mcontext.fpregs->cwd;
+ *cw |= FPU_EXCEPTION_MASK;
+
+- __uint16_t *sw = &uc->uc_mcontext.fpregs->swd;
++ uint16_t *sw = &uc->uc_mcontext.fpregs->swd;
+ *sw &= ~FPU_STATUS_FLAGS;
+
+- __uint32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
++ uint32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
+ *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
+ *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
+ #endif
diff --git a/www-client/firefox/files/fix-android-check-musl.patch
b/www-client/firefox/files/fix-android-check-musl.patch
new file mode 100644
index 0000000..e81da0f
--- /dev/null
+++ b/www-client/firefox/files/fix-android-check-musl.patch
@@ -0,0 +1,11 @@
+--- a/mozilla-release/ipc/chromium/src/base/debug_util_posix.cc
++++ b/mozilla-release/ipc/chromium/src/base/debug_util_posix.cc
+@@ -5,7 +5,7 @@
+ #include "build/build_config.h"
+ #include "base/debug_util.h"
+
+-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__))
+
+ #include <errno.h>
+ #include <fcntl.h>
diff --git a/www-client/firefox/files/fix-jemalloc-includes-musl.patch
b/www-client/firefox/files/fix-jemalloc-includes-musl.patch
new file mode 100644
index 0000000..928673a
--- /dev/null
+++ b/www-client/firefox/files/fix-jemalloc-includes-musl.patch
@@ -0,0 +1,10 @@
+--- a/mozilla-release/memory/mozjemalloc/jemalloc.c
++++ b/mozilla-release/memory/mozjemalloc/jemalloc.c
+@@ -337,7 +337,6 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
+-#include <sys/sysctl.h>
+ #endif
+ #include <sys/uio.h>
+ #ifndef MOZ_MEMORY
diff --git a/www-client/firefox/files/fix-mtransport-includes-musl.patch
b/www-client/firefox/files/fix-mtransport-includes-musl.patch
new file mode 100644
index 0000000..92dd34f
--- /dev/null
+++ b/www-client/firefox/files/fix-mtransport-includes-musl.patch
@@ -0,0 +1,20 @@
+--- a/mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c
++++ b/mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c
+@@ -45,7 +45,6 @@
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #ifndef ANDROID
+-#include <sys/sysctl.h>
+ #include <sys/syslog.h>
+ #else
+ #include <syslog.h>
+@@ -63,8 +61,8 @@
+ #include <sys/sockio.h>
+ #else
+ #include <linux/sockios.h>
+-#include <linux/if.h>
+ #include <linux/kernel.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+ #ifndef ANDROID
+ #include <linux/ethtool.h>
diff --git a/www-client/firefox/files/fix-sctp-includes-musl.patch
b/www-client/firefox/files/fix-sctp-includes-musl.patch
new file mode 100644
index 0000000..a659e40
--- /dev/null
+++ b/www-client/firefox/files/fix-sctp-includes-musl.patch
@@ -0,0 +1,47 @@
+--- a/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h
++++ b/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h
+@@ -400,9 +400,11 @@
+ #define if_nametoindex(x) win_if_nametoindex(x)
+
+ #else /* !defined(Userspace_os_Windows) */
++#ifdef __FreeBSD__
+ #include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */
++#endif /* __FreeBSD__ */
+ #include <sys/socket.h>
+-#if defined(__Userspace_os_DragonFly) || defined(__Userspace_os_FreeBSD) ||
defined(__Userspace_os_Linux) || defined(__Userspace_os_NetBSD) ||
defined(__Userspace_os_OpenBSD) || defined(ANDROID)
++#if !defined(__Userspace_os_Windows) && !defined(__Userspace_os_Darwin)
+ #include <pthread.h>
+ #endif
+ typedef pthread_mutex_t userland_mutex_t;
+@@ -427,7 +427,7 @@
+ /* #include <sys/param.h> in FreeBSD defines MSIZE */
+ /* #include <sys/ktr.h> */
+ /* #include <sys/systm.h> */
+-#if defined(__Userspace_os_Windows)
++#if 1
+ #include <user_queue.h>
+ #else
+ #include <sys/queue.h>
+--- a/mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c
++++ b/mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c
+@@ -30,6 +30,9 @@
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#define _BSD_SOURCE /* for IPPORT_RESERVED */
++#include <netdb.h>
++
+ #ifdef __FreeBSD__
+ #include <sys/cdefs.h>
+ __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 258765 2013-11-30 12:51:19Z
tuexen $");
+--- a/mozilla-release/netwerk/sctp/src/user_queue.h
++++ b/mozilla-release/netwerk/sctp/src/user_queue.h
+@@ -31,7 +31,7 @@
+ #ifndef _USER_QUEUE_H_
+ #define _USER_QUEUE_H_
+
+-#if !defined (__Userspace_os_Windows)
++#if defined(__Userspace_os_FreeBSD)
+ #include <sys/cdefs.h>
+ #endif
+ /*
diff --git a/www-client/firefox/files/gentoo-default-prefs.js-1
b/www-client/firefox/files/gentoo-default-prefs.js-1
new file mode 100644
index 0000000..22a51ff
--- /dev/null
+++ b/www-client/firefox/files/gentoo-default-prefs.js-1
@@ -0,0 +1,17 @@
+pref("app.update.enabled", false);
+pref("app.update.autoInstallEnabled", false);
+pref("browser.display.use_system_colors", true);
+pref("browser.link.open_external", 3);
+pref("general.smoothScroll", true);
+pref("general.autoScroll", false);
+pref("browser.tabs.tabMinWidth", 15);
+pref("browser.backspace_action", 0);
+pref("browser.urlbar.hideGoButton", true);
+pref("accessibility.typeaheadfind", true);
+pref("browser.shell.checkDefaultBrowser", false);
+pref("browser.EULA.override", true);
+pref("general.useragent.vendor", "Gentoo");
+pref("intl.locale.matchOS", true);
+pref("general.useragent.locale", "chrome://global/locale/intl.properties");
+pref("extensions.autoDisableScopes", 0);
+pref("layout.css.dpi", 0);
diff --git a/www-client/firefox/files/icon/firefox.desktop
b/www-client/firefox/files/icon/firefox.desktop
new file mode 100644
index 0000000..35999a8
--- /dev/null
+++ b/www-client/firefox/files/icon/firefox.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=@NAME@
+Comment=Web Browser
+Exec=firefox %U
+Icon=@ICON@
+Terminal=false
+Type=Application
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
+Categories=Network;WebBrowser;
diff --git a/www-client/firefox/files/include-systypesh-musl.patch
b/www-client/firefox/files/include-systypesh-musl.patch
new file mode 100644
index 0000000..601b0c3
--- /dev/null
+++ b/www-client/firefox/files/include-systypesh-musl.patch
@@ -0,0 +1,21 @@
+--- a/mozilla-release/tools/profiler/local_debug_info_symbolizer.cc
++++ b/mozilla-release/tools/profiler/local_debug_info_symbolizer.cc
+@@ -3,6 +3,7 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#include <sys/types.h>
+ #include "PlatformMacros.h"
+ #include "nsAutoPtr.h"
+
+--- a/mozilla-release/tools/profiler/platform.h
++++ b/mozilla-release/tools/profiler/platform.h
+@@ -29,6 +29,8 @@
+ #ifndef TOOLS_PLATFORM_H_
+ #define TOOLS_PLATFORM_H_
+
++#include <sys/types.h>
++
+ #ifdef ANDROID
+ #include <android/log.h>
+ #else
diff --git a/www-client/firefox/files/make-handleInt-unsigned-long-musl.patch
b/www-client/firefox/files/make-handleInt-unsigned-long-musl.patch
new file mode 100644
index 0000000..7b9743a
--- /dev/null
+++ b/www-client/firefox/files/make-handleInt-unsigned-long-musl.patch
@@ -0,0 +1,11 @@
+---
a/mozilla-release/media/webrtc/signaling/src/sipcc/cpr/include/cpr_threads.h
++++
b/mozilla-release/media/webrtc/signaling/src/sipcc/cpr/include/cpr_threads.h
+@@ -30,7 +30,7 @@
+ uint32_t threadId;
+ union {
+ void *handlePtr;
+- uint64_t handleInt;
++ unsigned long handleInt;
+ } u;
+ } cpr_thread_t;
+
diff --git a/www-client/firefox/files/stab.h b/www-client/firefox/files/stab.h
new file mode 100644
index 0000000..6207982
--- /dev/null
+++ b/www-client/firefox/files/stab.h
@@ -0,0 +1,72 @@
+/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stab.h 5.2 (Berkeley) 4/4/91
+ */
+
+#ifndef _STAB_H_
+#define _STAB_H_
+
+/*
+ * The following are symbols used by various debuggers and by the Pascal
+ * compiler. Each of them must have one (or more) of the bits defined by
+ * the N_STAB mask set.
+ */
+
+#define N_UNDF 0x00
+#define N_GSYM 0x20 /* global symbol */
+#define N_FNAME 0x22 /* F77 function name */
+#define N_FUN 0x24 /* procedure name */
+#define N_STSYM 0x26 /* data segment variable */
+#define N_LCSYM 0x28 /* bss segment variable */
+#define N_MAIN 0x2a /* main function name */
+#define N_PC 0x30 /* global Pascal symbol */
+#define N_RSYM 0x40 /* register variable */
+#define N_SLINE 0x44 /* text segment line number */
+#define N_DSLINE 0x46 /* data segment line number */
+#define N_BSLINE 0x48 /* bss segment line number */
+#define N_SSYM 0x60 /* structure/union element */
+#define N_SO 0x64 /* main source file name */
+#define N_LSYM 0x80 /* stack variable */
+#define N_BINCL 0x82 /* include file beginning */
+#define N_SOL 0x84 /* included source file name */
+#define N_PSYM 0xa0 /* parameter variable */
+#define N_EINCL 0xa2 /* include file end */
+#define N_ENTRY 0xa4 /* alternate entry point */
+#define N_LBRAC 0xc0 /* left bracket */
+#define N_EXCL 0xc2 /* deleted include file */
+#define N_RBRAC 0xe0 /* right bracket */
+#define N_BCOMM 0xe2 /* begin common */
+#define N_ECOMM 0xe4 /* end common */
+#define N_ECOML 0xe8 /* end common (local name) */
+#define N_LENG 0xfe /* length of preceding entry */
+
+#endif /* !_STAB_H_ */
diff --git a/www-client/firefox/firefox-34.0.5-r99.ebuild
b/www-client/firefox/firefox-34.0.5-r99.ebuild
new file mode 100644
index 0000000..aef11fc
--- /dev/null
+++ b/www-client/firefox/firefox-34.0.5-r99.ebuild
@@ -0,0 +1,428 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
/var/cvsroot/gentoo-x86/www-client/firefox/firefox-34.0.5-r1.ebuild,v 1.2
2014/12/05 23:06:43 axs Exp $
+
+EAPI="5"
+VIRTUALX_REQUIRED="pgo"
+WANT_AUTOCONF="2.1"
+MOZ_ESR=""
+
+# This list can be updated with scripts/get_langs.sh from the mozilla overlay
+MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
+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 gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko lt lv mai mk ml mr
+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
+th tr uk vi xh zh-CN zh-TW )
+
+# Convert the ebuild version to the upstream mozilla version, used by
mozlinguas
+MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
+MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
+MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
+
+if [[ ${MOZ_ESR} == 1 ]]; then
+ # ESR releases have slightly version numbers
+ MOZ_PV="${MOZ_PV}esr"
+fi
+
+# Patch version
+PATCH="${PN}-34.0-patches-0.1"
+# Upstream ftp release URI that's used by mozlinguas.eclass
+# We don't use the http mirror because it deletes old tarballs.
+MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
+MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
+
+MOZCONFIG_OPTIONAL_WIFI=1
+MOZCONFIG_OPTIONAL_JIT="enabled"
+
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils
mozconfig-v5.34 multilib pax-utils fdo-mime autotools virtualx mozlinguas
+
+DESCRIPTION="Firefox Web Browser"
+HOMEPAGE="http://www.mozilla.com/firefox"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux
~x86-linux"
+SLOT="0"
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+IUSE="bindist hardened +minimal pgo selinux +gmp-autoupdate test"
+
+# More URIs appended below...
+SRC_URI="${SRC_URI}
+ http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
+ http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz"
+
+ASM_DEPEND=">=dev-lang/yasm-1.1"
+
+# Mesa 7.10 needed for WebGL + bugfixes
+RDEPEND="
+ >=dev-libs/nss-3.17.2
+ >=dev-libs/nspr-4.10.7
+ selinux? ( sec-policy/selinux-mozilla )"
+
+DEPEND="${RDEPEND}
+ pgo? (
+ >=sys-devel/gcc-4.5 )
+ amd64? ( ${ASM_DEPEND}
+ virtual/opengl )
+ x86? ( ${ASM_DEPEND}
+ virtual/opengl )"
+
+# No source releases for alpha|beta
+if [[ ${PV} =~ alpha ]]; then
+ CHANGESET="8a3042764de7"
+ SRC_URI="${SRC_URI}
+
http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
+ S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
+elif [[ ${PV} =~ beta ]]; then
+ S="${WORKDIR}/mozilla-beta"
+ SRC_URI="${SRC_URI}
+ ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
+
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
+else
+ SRC_URI="${SRC_URI}
+ ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
+
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
+ if [[ ${MOZ_ESR} == 1 ]]; then
+ S="${WORKDIR}/mozilla-esr${PV%%.*}"
+ else
+ S="${WORKDIR}/mozilla-release"
+ fi
+fi
+
+QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
+
+BUILD_OBJ_DIR="${S}/ff"
+
+pkg_setup() {
+ moz_pkgsetup
+
+ # Avoid PGO profiling problems due to enviroment leakage
+ # These should *always* be cleaned up anyway
+ unset DBUS_SESSION_BUS_ADDRESS \
+ DISPLAY \
+ ORBIT_SOCKETDIR \
+ SESSION_MANAGER \
+ XDG_SESSION_COOKIE \
+ XAUTHORITY
+
+ if ! use bindist; then
+ einfo
+ elog "You are enabling official branding. You may not
redistribute this build"
+ elog "to any users on your network or the internet. Doing so
puts yourself into"
+ elog "a legal problem with Mozilla Foundation"
+ elog "You can disable it by emerging ${PN} _with_ the bindist
USE-flag"
+ fi
+
+ if use pgo; then
+ einfo
+ ewarn "You will do a double build for profile guided
optimization."
+ ewarn "This will result in your build taking at least twice as
long as before."
+ fi
+}
+
+pkg_pretend() {
+ # Ensure we have enough disk space to compile
+ if use pgo || use debug || use test ; then
+ CHECKREQS_DISK_BUILD="8G"
+ else
+ CHECKREQS_DISK_BUILD="4G"
+ fi
+ check-reqs_pkg_setup
+
+ if use jit && [[ -n ${PROFILE_IS_HARDENED} ]]; then
+ ewarn "You are emerging this package on a hardened profile with
USE=jit enabled."
+ ewarn "This is horribly insecure as it disables all PAGEEXEC
restrictions."
+ ewarn "Please ensure you know what you are doing. If you
don't, please consider"
+ ewarn "emerging the package with USE=-jit"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Unpack language packs
+ mozlinguas_src_unpack
+}
+
+src_prepare() {
+ # Apply our patches
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/firefox"
+
+ # Avoid using basename https://bugzilla.mozilla.org/show_bug.cgi?id=1041962
+ epatch "${FILESDIR}"/avoid-basename-musl.patch
+ # <fts.h> unavailable on Android and musl, portions from
+ # http://git.alpinelinux.org/cgit/aports/tree/main/firefox/fix-ipc.patch
+ epatch "${FILESDIR}"/avoid-fts-on-nonglibc-musl.patch
+ # getcontext() unavailable on musl, safe to omit
+ epatch "${FILESDIR}"/avoid-getcontext-musl.patch
+ # the glibc check should be non-Android Linux
+ epatch "${FILESDIR}"/define-gettid-unconditonally-musl.patch
+ # <a.out.h> unavailable on musl, yet somehow the build system still defines
+ # HAVE_A_OUT_H - unconditionally disable for now, better to fix configure.
+ # Portions from
+ #
http://git.alpinelinux.org/cgit/aports/tree/main/firefox/fix-toolkit.patch
+ epatch "${FILESDIR}"/dont-include-aouth-musl.patch
+ # non-Android Linux check should be a glibc Linux check
+ epatch "${FILESDIR}"/fix-android-check-musl.patch
+ # <sys/sysctl.h> unavailable on musl
+ epatch "${FILESDIR}"/fix-jemalloc-includes-musl.patch
+ # <sys/sysctl.h> unavailable on musl, also wrong order of kernel headers
+ # Portions from
+ # http://git.alpinelinux.org/cgit/aports/tree/main/firefox/fix-media.patch
+ epatch "${FILESDIR}"/fix-mtransport-includes-musl.patch
+ # Dumb sctp-refimpl include fixes, to be improved and submitted upstream
+ # Portions from
+ #
http://git.alpinelinux.org/cgit/aports/tree/main/firefox/fix-netwerk.patch
+ epatch "${FILESDIR}"/fix-sctp-includes-musl.patch
+ # Files erroneously assume other headers include <sys/types.h>
+ # Portions from
+ # http://git.alpinelinux.org/cgit/aports/tree/main/firefox/fix-tools.patch
+ epatch "${FILESDIR}"/include-systypesh-musl.patch
+ # Incorrect assumptions about pthread_t
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1010194
+ epatch "${FILESDIR}"/make-handleInt-unsigned-long-musl.patch
+ # Felix Janda's amd64 fixes
+ epatch "${FILESDIR}"/fix-amd64-build-musl.patch
+ # Stagefright includes <sys/cdefs.h>, unavailable on musl. Upstream will
+ # probably want to include it on Android.
+ epatch "${FILESDIR}"/dont-include-cdefsh-stagefright-musl.patch
+
+ # Allow user to apply any additional patches without modifing ebuild
+ epatch_user
+
+ # From http://git.alpinelinux.org/cgit/aports/tree/main/firefox/stab.h,
added N_UNDF
+ cp "${FILESDIR}"/stab.h
"${S}"/toolkit/crashreporter/google-breakpad/src/
+
+ # Enable gnomebreakpad
+ if use debug ; then
+ sed -i -e
"s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
+ "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
+ fi
+
+ # Ensure that our plugins dir is enabled as default
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed
failed to replace plugin path for 32bit!"
+ sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed
failed to replace plugin path for 64bit!"
+
+ # Fix sandbox violations during make clean, bug 372817
+ sed -e "s:\(/no-such-file\):${T}\1:g" \
+ -i "${S}"/config/rules.mk \
+ -i "${S}"/nsprpub/configure{.in,} \
+ || die
+
+ # Don't exit with error when some libs are missing which we have in
+ # system.
+ sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
+ -i "${S}"/browser/installer/Makefile.in || die
+
+ # Don't error out when there's no files to be removed:
+ sed 's@\(xargs rm\)$@\1 -f@' \
+ -i "${S}"/toolkit/mozapps/installer/packager.mk || die
+
+ eautoreconf
+
+ # Must run autoconf in js/src
+ cd "${S}"/js/src || die
+ eautoconf
+
+ # Need to update jemalloc's configure
+ cd "${S}"/memory/jemalloc/src || die
+ WANT_AUTOCONF= eautoconf
+}
+
+src_configure() {
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+ MEXTENSIONS="default"
+ # Google API keys (see
http://www.chromium.org/developers/how-tos/api-keys)
+ # Note: These are for Gentoo Linux use ONLY. For your own distribution,
please
+ # get your own set of keys.
+ _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
+
+ ####################################
+ #
+ # mozconfig, CFLAGS and CXXFLAGS setup
+ #
+ ####################################
+
+ mozconfig_init
+ mozconfig_config
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ # Add full relro support for hardened
+ use hardened && append-ldflags "-Wl,-z,relro,-z,now"
+
+ # Setup api key for location services
+ echo -n "${_google_api_key}" > "${S}"/google-api-key
+ mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key"
+
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
+ mozconfig_annotate '' --disable-mailnews
+
+ # Other ff-specific settings
+ mozconfig_annotate ''
--with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
+
+ # mozjemalloc doesn't build on musl yet
+ mozconfig_annotate '' --disable-replace-malloc
+ mozconfig_annotate '' --disable-jemalloc
+
+ # Allow for a proper pgo build
+ if use pgo; then
+ echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON)
\$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
+ fi
+
+ echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
+
+ # Finalize and report settings
+ mozconfig_final
+
+ if [[ $(gcc-major-version) -lt 4 ]]; then
+ append-cxxflags -fno-stack-protector
+ elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]];
then
+ if use amd64 || use x86; then
+ append-flags -mno-avx
+ fi
+ fi
+}
+
+src_compile() {
+ if use pgo; then
+ addpredict /root
+ addpredict /etc/gconf
+ # Reset and cleanup environment variables used by GNOME/XDG
+ gnome2_environment_reset
+
+ # Firefox tries to use dri stuff when it's run, see bug 380283
+ shopt -s nullglob
+ cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -z "${cards}"; then
+ cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed
's/ /:/g')
+ if test -n "${cards}"; then
+ # Binary drivers seem to cause access
violations anyway, so
+ # let's use indirect rendering so that the
device files aren't
+ # touched at all. See bug 394715.
+ export LIBGL_ALWAYS_INDIRECT=1
+ fi
+ fi
+ shopt -u nullglob
+ addpredict "${cards}"
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
+ Xemake -f client.mk profiledbuild || die "Xemake failed"
+ else
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
+ emake -f client.mk
+ fi
+
+}
+
+src_install() {
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+ DICTPATH="\"${EPREFIX}/usr/share/myspell\""
+
+ cd "${BUILD_OBJ_DIR}" || die
+
+ # Pax mark xpcshell for hardened support, only used for startupcache
creation.
+ pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
+
+ # Add our default prefs for firefox
+ cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
+
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+ || die
+
+ # Set default path to search for dictionaries.
+ echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
+ >>
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+ || die
+
+ echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
+
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+ || die
+
+ local plugin
+ use gmp-autoupdate || for plugin in \
+ gmp-gmpopenh264 ; do
+ echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
+
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+ || die
+ done
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake DESTDIR="${D}" install
+
+ # Install language packs
+ mozlinguas_src_install
+
+ local size sizes icon_path icon name
+ if use bindist; then
+ sizes="16 32 48"
+ icon_path="${S}/browser/branding/aurora"
+ # Firefox's new rapid release cycle means no more codenames
+ # Let's just stick with this one...
+ icon="aurora"
+ name="Aurora"
+ else
+ sizes="16 22 24 32 256"
+ icon_path="${S}/browser/branding/official"
+ icon="${PN}"
+ name="Mozilla Firefox"
+ fi
+
+ # Install icons and .desktop for menu entry
+ for size in ${sizes}; do
+ insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
+ newins "${icon_path}/default${size}.png" "${icon}.png"
+ done
+ # The 128x128 icon has a different name
+ insinto "/usr/share/icons/hicolor/128x128/apps"
+ newins "${icon_path}/mozicon128.png" "${icon}.png"
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
+ newicon "${icon_path}/content/icon48.png" "${icon}.png"
+ newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
+ sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
+ "${ED}/usr/share/applications/${PN}.desktop" || die
+
+ # Add StartupNotify=true bug 237317
+ if use startup-notification ; then
+ echo "StartupNotify=true"\
+ >> "${ED}/usr/share/applications/${PN}.desktop" \
+ || die
+ fi
+
+ # Required in order to use plugins and even run firefox on hardened.
+ pax-mark m
"${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
+
+ if use minimal; then
+ rm -r "${ED}"/usr/include
"${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \
+ || die "Failed to remove sdk and headers"
+ fi
+
+ # very ugly hack to make firefox not sigbus on sparc
+ # FIXME: is this still needed??
+ use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
+ -i
"${ED}/${MOZILLA_FIVE_HOME}/application.ini" \
+ || die "sparc sed failed"; }
+
+ # revdep-rebuild entry
+ insinto /etc/revdep-rebuild
+ echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10firefox
+ doins "${T}"/10${PN} || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ # Update mimedb for the new .desktop file
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}