* [gentoo-commits] dev/anarchy:master commit in: www-client/firefox/, www-client/firefox/files/icon/, www-client/firefox/files/
@ 2012-08-01 13:20 Jory Pratt
0 siblings, 0 replies; only message in thread
From: Jory Pratt @ 2012-08-01 13:20 UTC (permalink / raw
To: gentoo-commits
commit: 34d029fece0aa1a77d42228c70a1809ee5716fa0
Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 1 13:19:47 2012 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Aug 1 13:19:47 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/anarchy.git;a=commit;h=34d029fe
firefox-15.0_beta2 with jemalloc-3 as default
---
www-client/firefox/Manifest | 8 +
.../files/firefox-14.0_beta7-gst-aac-mp3.patch | 70 ++++
.../firefox-14.0_beta7-gst-youtube-h264.patch | 26 ++
.../firefox-15.0-fix-gstreamer-html5-crash.patch | 26 ++
www-client/firefox/files/gentoo-default-prefs.js-1 | 17 +
www-client/firefox/files/icon/firefox.desktop | 9 +
www-client/firefox/firefox-15.0_beta2-r1.ebuild | 385 ++++++++++++++++++++
7 files changed, 541 insertions(+), 0 deletions(-)
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
new file mode 100644
index 0000000..8a691f1
--- /dev/null
+++ b/www-client/firefox/Manifest
@@ -0,0 +1,8 @@
+AUX firefox-14.0_beta7-gst-aac-mp3.patch 2454 SHA256 ef3e6539d292629a52a592cecd90a23562480d7280cfd3883d4407ad06e418a7 SHA512 ecd4b594371b6ff00980fd79959805e87e2f54deb5b790c246c7e592b5c29e7e847c3a9863730c891532a5180c67937e73f8474aa3e4a16b94a35ba4e29624ad WHIRLPOOL cc977bd7cc1b48162e906ad4541592b153d9a0434c8d608fdb2b281ba143385a95808135e967876813435a31caf323f4f0b28bc6751d5285969d7c6dfe46874e
+AUX firefox-14.0_beta7-gst-youtube-h264.patch 1437 SHA256 9b871769727e6d16939c55695b4f08c6b460c3f6cf5bce46ce429f40c4801669 SHA512 b5964f9e569281209db492d27f6f1c12fb316fd52bb67e624ed438a3c005018f1c5554f6c976ab226541dc86a3ac47e26a07146c1cf9f549685d03605e217909 WHIRLPOOL 928bb7abe481188ad229fd833fd282e388cbf65166477c65e166f0af83784e4d3219cc4d2b8127df2cad13213d1cecfbb26afe9f6dc2059618c7f7c39c52fd6a
+AUX firefox-15.0-fix-gstreamer-html5-crash.patch 1094 SHA256 1fa2a1963ef3146ef71a51affc46179fdae5fcd5a4bfdf5acb3da0f035b482f2 SHA512 42b8fc013ee061f9b7c00d347fe2712c2a1110574f578ae815dd4b5287dfa27b5643c74d41f2e2913d147017026d61f8b7a3603b2a40586f30f0e70c41f6af74 WHIRLPOOL dae601e40e1e9cfcb9775313ef5f5b57af40124a64e204261ef6de05b01533df36e28e333356ba2d09ada996e82a882ef492fa0efbd4c7cc06572dde16d83346
+AUX gentoo-default-prefs.js-1 821 SHA256 16259ec24a231d1d60097c8d892caa80d2703ba5be72304f6da55cfce1b329de SHA512 b63542c51edfe0158ce487b317ea6d36ffc17cf8457534adb6aa3f613d9a027f4285c9dcf76eb1b96de6bbc10ba09948fa6c081e00cfb25ca47450cbc32923f2 WHIRLPOOL 770d4b15f1b142ee1f59ce47f7b6d9e4bf4adb20a8a9fc104ea7d6c2481edb0d685c2e672008dbd869d92e8b24ea6ad8efdb4180421ff19ae88d0a9f6f752121
+AUX icon/firefox.desktop 276 SHA256 06565ade11b6e4b448cf10339696c43f31e73cb6824491094bb6e0ab902c7cf5 SHA512 3ab9aa94d3006518fb154c887e9be99fd372a75ac128b8d37debe5d72f26fb7103dd36f75bb6111750e93d520b730a29a8118805fe84be8f3021e4528c0ec47e WHIRLPOOL 9722c40c167bb1a76e7a81e3b1aedbb3cd10a09e00361fe1678883feff33e1d9ce31379f150a757d8b2667715175c2bbc16a714164d02210b4284ee91a25f8f5
+DIST firefox-15.0-patches-0.3.tar.xz 233752 SHA256 423690cc47fb79c5b884c17219b8f2303def8ba0b8d983a199db3fa29617839b SHA512 2dd472f13bf4032738915ce5e5f52a92feb86a2765b64f7d18aa57c575332ee60011131a1fefd7bff0bba684725f8dfea2cea2d6f90b2d45520cb1b13bd62622 WHIRLPOOL 25e4347c25ded36166679f83d253598a39fa7df2805e1c416c715e95cd45891d1425733c37fecc179d2d5e8d44b9eb977a9ba178a4f23f84a068bbb3b22d03d1
+DIST firefox-15.0b2.source.tar.bz2 83547413 SHA256 6ba75c15e0c3fd7d14a3337f25237636e572356753b71b4abae7ce6a4ba11e71 SHA512 ea7e5d58e8076d1ff8803108f331ad779cf3562f92a29e04417d54a8a69ef4ddeb896a3b4358c19971aefb2d9ee3b23655d9a626d16cb751fe8a427a8a215d74 WHIRLPOOL 8a9aac3d6fb85cc059871f625b5e89e48e8f0bd8ea8cf49066e01c81a9d0458acdbbb718389c7ea0891d2555463b866cd02eaefd0baa7c2d918c568dc580366f
+EBUILD firefox-15.0_beta2-r1.ebuild 12015 SHA256 71469aff76ff711dfddda08cb666ec776c6fde1a0e0b4eb857c2b8eaff9c3767 SHA512 48a70b5581d4d9d767525fa5f27eac64647315dd00c397208826567fd02a33dc84fc0726e23463ed09068ab55a7b54fdca70d3895b91d3a2015fd834894c3049 WHIRLPOOL b7789e8e1e69ef4cecb557da9a6edcb3c67a163c85e65b4e3aa6dcb7954128996f109e9c9d6d962f992d118dc5e87409448ee52b2cd0e4a65f77e8b582ab37f8
diff --git a/www-client/firefox/files/firefox-14.0_beta7-gst-aac-mp3.patch b/www-client/firefox/files/firefox-14.0_beta7-gst-aac-mp3.patch
new file mode 100644
index 0000000..136375a
--- /dev/null
+++ b/www-client/firefox/files/firefox-14.0_beta7-gst-aac-mp3.patch
@@ -0,0 +1,70 @@
+diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
+--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:37:25.791017257 +0530
++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:38:22.259014896 +0530
+@@ -305,8 +305,10 @@ public:
+ #ifdef MOZ_GSTREAMER
+ static bool IsH264Enabled();
+ static bool IsH264Type(const nsACString& aType);
++ static bool IsSupportedAudioType(const nsACString& aType);
+ static const char gH264Types[3][17];
+ static char const *const gH264Codecs[6];
++ static const char gSupportedAudioTypes[2][11];
+ #endif
+
+ /**
+diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
+--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:37:25.834017256 +0530
++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:40:04.358010627 +0530
+@@ -1865,6 +1865,11 @@ char const *const nsHTMLMediaElement::gH
+ nsnull
+ };
+
++const char nsHTMLMediaElement::gSupportedAudioTypes[2][11] = {
++ "audio/mp4",
++ "audio/mpeg",
++};
++
+ bool
+ nsHTMLMediaElement::IsH264Enabled()
+ {
+@@ -1886,6 +1891,18 @@ nsHTMLMediaElement::IsH264Type(const nsA
+
+ return false;
+ }
++
++bool
++nsHTMLMediaElement::IsSupportedAudioType(const nsACString& aType)
++{
++ for (PRUint32 i = 0; i < ArrayLength(gSupportedAudioTypes); ++i) {
++ if (aType.EqualsASCII(gSupportedAudioTypes[i])) {
++ return true;
++ }
++ }
++
++ return false;
++}
+ #endif
+
+ /* static */
+@@ -1919,6 +1936,11 @@ nsHTMLMediaElement::CanHandleMediaType(c
+ #endif
+
+ #ifdef MOZ_GSTREAMER
++ if (IsSupportedAudioType(nsDependentCString(aMIMEType))) {
++ *aCodecList = NULL;
++ return CANPLAY_MAYBE;
++ }
++
+ if (IsH264Type(nsDependentCString(aMIMEType))) {
+ *aCodecList = gH264Codecs;
+ return CANPLAY_YES;
+@@ -1992,7 +2014,8 @@ nsHTMLMediaElement::GetCanPlay(const nsA
+ while (tokenizer.hasMoreTokens()) {
+ const nsSubstring& token = tokenizer.nextToken();
+
+- if (!CodecListContains(supportedCodecs, token)) {
++ if (supportedCodecs == NULL ||
++ !CodecListContains(supportedCodecs, token)) {
+ // Totally unsupported codec
+ return CANPLAY_NO;
+ }
diff --git a/www-client/firefox/files/firefox-14.0_beta7-gst-youtube-h264.patch b/www-client/firefox/files/firefox-14.0_beta7-gst-youtube-h264.patch
new file mode 100644
index 0000000..c9002c7
--- /dev/null
+++ b/www-client/firefox/files/firefox-14.0_beta7-gst-youtube-h264.patch
@@ -0,0 +1,26 @@
+diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
+--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:14.664990120 +0530
++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:43.970988893 +0530
+@@ -307,7 +307,7 @@ public:
+ static bool IsH264Type(const nsACString& aType);
+ static bool IsSupportedAudioType(const nsACString& aType);
+ static const char gH264Types[3][17];
+- static char const *const gH264Codecs[6];
++ static char const *const gH264Codecs[7];
+ static const char gSupportedAudioTypes[2][11];
+ #endif
+
+diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
+--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:48:14.667990120 +0530
++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:49:18.261987460 +0530
+@@ -1856,8 +1856,9 @@ const char nsHTMLMediaElement::gH264Type
+ "video/quicktime",
+ };
+
+-char const *const nsHTMLMediaElement::gH264Codecs[6] = {
++char const *const nsHTMLMediaElement::gH264Codecs[7] = {
+ "avc1.42E01E",
++ "avc1.42001E",
+ "avc1.58A01E",
+ "avc1.4D401E",
+ "avc1.64001E",
diff --git a/www-client/firefox/files/firefox-15.0-fix-gstreamer-html5-crash.patch b/www-client/firefox/files/firefox-15.0-fix-gstreamer-html5-crash.patch
new file mode 100644
index 0000000..85d6999
--- /dev/null
+++ b/www-client/firefox/files/firefox-15.0-fix-gstreamer-html5-crash.patch
@@ -0,0 +1,26 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=761030
+
+Went into Fx 16, but not 15
+
+diff -r 07d362aa2c1b content/media/gstreamer/nsGStreamerReader.cpp
+--- a/content/media/gstreamer/nsGStreamerReader.cpp Sun Jun 03 12:04:40 2012 -0700
++++ b/content/media/gstreamer/nsGStreamerReader.cpp Sun Jun 03 14:37:55 2012 -0700
+@@ -447,16 +447,18 @@ bool nsGStreamerReader::DecodeVideoFrame
+ for(int i = 0; i < 3; i++) {
+ b.mPlanes[i].mData = data + gst_video_format_get_component_offset(format, i,
+ width, height);
+ b.mPlanes[i].mStride = gst_video_format_get_row_stride(format, i, width);
+ b.mPlanes[i].mHeight = gst_video_format_get_component_height(format,
+ i, height);
+ b.mPlanes[i].mWidth = gst_video_format_get_component_width(format,
+ i, width);
++ b.mPlanes[i].mOffset = 0;
++ b.mPlanes[i].mSkip = 0;
+ }
+
+ bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer,
+ GST_BUFFER_FLAG_DELTA_UNIT);
+ /* XXX ? */
+ PRInt64 offset = 0;
+ VideoData *video = VideoData::Create(mInfo,
+ mDecoder->GetImageContainer(),
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/firefox-15.0_beta2-r1.ebuild b/www-client/firefox/firefox-15.0_beta2-r1.ebuild
new file mode 100644
index 0000000..103172e
--- /dev/null
+++ b/www-client/firefox/firefox-15.0_beta2-r1.ebuild
@@ -0,0 +1,385 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="3"
+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 ak 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 ff 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 ku lg lij lt lv mai mk ml mn
+mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE
+sw ta ta-LK te th tr uk vi zh-CN zh-TW zu )
+
+# 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}-15.0-patches-0.3"
+# 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/"
+
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools python virtualx nsplugins mozlinguas
+
+DESCRIPTION="Firefox Web Browser"
+HOMEPAGE="http://www.mozilla.com/firefox"
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+IUSE="bindist gstreamer +ipc +jit +minimal pgo selinux system-sqlite +webm"
+
+# More URIs appended below...
+SRC_URI="${SRC_URI}
+ http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
+
+ASM_DEPEND=">=dev-lang/yasm-1.1"
+
+# Mesa 7.10 needed for WebGL + bugfixes
+RDEPEND="
+ >=sys-devel/binutils-2.16.1
+ >=dev-libs/nss-3.13.5
+ >=dev-libs/nspr-4.9.1
+ >=dev-libs/glib-2.26:2
+ >=media-libs/mesa-7.10
+ >=media-libs/libpng-1.5.9[apng]
+ virtual/libffi
+ gstreamer? (
+ >=media-libs/gstreamer-0.10.33:0.10
+ >=media-libs/gst-plugins-base-0.10.33:0.10 )
+ system-sqlite? ( >=dev-db/sqlite-3.7.12.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
+ webm? ( >=media-libs/libvpx-1.0.0
+ media-libs/alsa-lib )
+ selinux? ( sec-policy/selinux-mozilla )"
+# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
+DEPEND="${RDEPEND}
+ >=sys-devel/patch-2.6.1.169
+ virtual/pkgconfig
+ pgo? (
+ =dev-lang/python-2*[sqlite]
+ >=sys-devel/gcc-4.5 )
+ webm? ( x86? ( ${ASM_DEPEND} )
+ amd64? ( ${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"
+else
+ SRC_URI="${SRC_URI}
+ ${MOZ_FTP_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"
+
+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
+
+ # 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
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Unpack language packs
+ mozlinguas_src_unpack
+}
+
+src_prepare() {
+ # Apply our patches
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/firefox"
+
+ # Allow AAC and H.264 files to be played using <audio> and <video>
+ epatch "${FILESDIR}"/${PN}*-gst*.patch
+
+ # Allow user to apply any additional patches without modifing ebuild
+ epatch_user
+
+ # 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
+
+ # Disable gnomevfs extension
+ sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
+ -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
+ || die "Failed to remove gnomevfs extension"
+
+ # Ensure that are plugins dir is enabled as default
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
+
+ # Fix sandbox violations during make clean, bug 372817
+ sed -e "s:\(/no-such-file\):${T}\1:g" \
+ -i "${S}"/config/rules.mk \
+ -i "${S}"/js/src/config/rules.mk \
+ -i "${S}"/nsprpub/configure{.in,} \
+ || die
+
+ #Fix compilation with curl-7.21.7 bug 376027
+ sed -e '/#include <curl\/types.h>/d' \
+ -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
+ -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
+ -i "${S}"/config/system-headers \
+ -i "${S}"/js/src/config/system-headers || die "Sed failed"
+
+ # 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
+
+ # Used to properly configure and use jemalloc-3
+ chmod a+x "${S}/memory/jemalloc/src/configure"
+ chmod a+x "${S}/memory/jemalloc/src/include/jemalloc/internal/size_classes.sh"
+ echo "stamp" > "${S}/memory/jemalloc/src/config.stamp.in"
+
+ eautoreconf
+}
+
+src_configure() {
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+ MEXTENSIONS="default"
+
+ ####################################
+ #
+ # 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"
+
+ # We must force enable jemalloc 3 threw .mozconfig
+ echo "export MOZ_JEMALLOC=1" > ${S}/.mozconfig
+
+ # Basic options to control the enviroment in which we compile
+ mozconfig_annotate '' --prefix="${EPREFIX}"/usr
+ mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
+ mozconfig_annotate '' --disable-gconf
+ mozconfig_annotate '' --disable-mailnews
+ mozconfig_annotate '' --enable-canvas
+ mozconfig_annotate '' --enable-safe-browsing
+ mozconfig_annotate '' --with-system-png
+ mozconfig_annotate '' --enable-system-ffi
+
+ # Other ff-specific settings
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
+ mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
+
+ mozconfig_use_enable gstreamer
+ mozconfig_use_enable system-sqlite
+ # Both methodjit and tracejit conflict with PaX
+ mozconfig_use_enable jit methodjit
+ mozconfig_use_enable jit tracejit
+
+ # 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
+
+ # 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 -n "${cards}"; then
+ # FOSS drivers are fine
+ addpredict "${cards}"
+ else
+ 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
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ Xemake -f client.mk profiledbuild || die "Xemake failed"
+ else
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake -f client.mk || die "emake failed"
+ fi
+
+}
+
+src_install() {
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
+ local obj_dir="$(echo */config.log)"
+ obj_dir="${obj_dir%/*}"
+ cd "${S}/${obj_dir}"
+
+ # Without methodjit and tracejit there's no conflict with PaX
+ if use jit; then
+ # Pax mark xpcshell for hardened support, only used for startupcache creation.
+ pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
+ fi
+
+ # Add our default prefs for firefox
+ cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
+ "${S}/${obj_dir}/dist/bin/defaults/preferences/all-gentoo.js" || die
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # 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" || die
+ done
+ # The 128x128 icon has a different name
+ insinto "/usr/share/icons/hicolor/128x128/apps"
+ newins "${icon_path}/mozicon128.png" "${icon}.png" || die
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
+ newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
+ newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
+ 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"
+ fi
+
+ # Without methodjit and tracejit there's no conflict with PaX
+ if use jit; then
+ # Required in order to use plugins and even run firefox on hardened.
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin}
+ fi
+
+ # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
+ # continue to work as expected.
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
+
+ # Plugins dir
+ share_plugins_dir
+
+ if use minimal; then
+ rm -rf "${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"; }
+}
+
+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
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-01 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 13:20 [gentoo-commits] dev/anarchy:master commit in: www-client/firefox/, www-client/firefox/files/icon/, www-client/firefox/files/ Jory Pratt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox