From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8F77138330 for ; Tue, 11 Oct 2016 18:02:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36FBD21C012; Tue, 11 Oct 2016 18:02:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0BA1021C012 for ; Tue, 11 Oct 2016 18:02:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32BD3341648 for ; Tue, 11 Oct 2016 18:02:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 78C6F2F2 for ; Tue, 11 Oct 2016 18:02:30 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1476208940.b75df733a591b834ffe47af699e276d833db265f.axs@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/ X-VCS-Repository: proj/mozilla X-VCS-Files: www-client/firefox/Manifest www-client/firefox/firefox-50.0_beta6.ebuild X-VCS-Directories: www-client/firefox/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: b75df733a591b834ffe47af699e276d833db265f X-VCS-Branch: master Date: Tue, 11 Oct 2016 18:02:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2c45865c-7389-4531-8fa1-750c52f62cf4 X-Archives-Hash: 542e22e9b09031b07aa52bc666b79595 commit: b75df733a591b834ffe47af699e276d833db265f Author: Ian Stakenvicius gentoo org> AuthorDate: Tue Oct 11 18:02:20 2016 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Tue Oct 11 18:02:20 2016 +0000 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=b75df733 www-client/firefox-50: first beta ebuild www-client/firefox/Manifest | 2 + www-client/firefox/firefox-50.0_beta6.ebuild | 366 +++++++++++++++++++++++++++ 2 files changed, 368 insertions(+) diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 2cabe4d..ed619fd 100644 --- a/www-client/firefox/Manifest +++ b/www-client/firefox/Manifest @@ -177,3 +177,5 @@ DIST firefox-49.0-xh.xpi 439945 SHA256 a6844d3412f58347a22e3ae0b242aee6b2dcbd504 DIST firefox-49.0-zh-CN.xpi 466752 SHA256 1f5648cecfeb15503a320cf0c765b097ce220d01f17e4153032ef99fac3f6cf5 SHA512 777902a2147cc77764508c2b61f4c791272e6004d90a131a11c3a06a1c633e160fa9db400ec56473b5103eedc7787dc93d535d68a3119766104c25475b20ee3a WHIRLPOOL ea843dfec89fd66ebed5cba86fede31b3b61738cb189ffbeea7141a36ca98a5c11d5366a4f7f22fbf572b0c3da16e362454251674e11f2d070e8107e4afe6f61 DIST firefox-49.0-zh-TW.xpi 469469 SHA256 efe84a997c57c394d1cc1067a1d63fd77719f015e8eb42bfa9fe8225250e8ddc SHA512 091206e31fa12b7298023c06337c739d7a8a171094536eacaf3c5887056488acbca605c4ea0b41174c136ea98bf5c3f1cbe4481c2ad9672715e45f28f27f2916 WHIRLPOOL 182a6b44f5f7b514b75e74856a913619e27c813d654106b67ae7c1385bc31895c1dde6e943ffd8d6c6ee85a838993f202141c4c5383b4159cb7d300515e5bc70 DIST firefox-49.0.source.tar.xz 189615184 SHA256 6f7069fa94688f9fb5aa3bbb2ffa78456825067dd984afa714d74b3f0c6eaf63 SHA512 9431f86dec5587131699ae57ae428be168e4d6c7d1d48df643c10540e8e18bc5eadfcd08bb204950be611c87d35d8a40aa8ece454b7dfa3992239639c2d688a9 WHIRLPOOL acc7fe0210fa72123b67cfdf6d438ddb9f0dd7ea7c0464722cd898237057a0eed35a4de5dbb283ab1948dafa6b7a790d646853bc0025422d716d9a4e1b79db59 +DIST firefox-50.0-patches-01.tar.xz 11972 SHA256 38661f09677608019017327d79a01d2cd527a1ce848f8a0e7e4d7b8d54827fdb SHA512 98fd51fe6cca102b607155cfa53541b8ff17309e7036b62dc76ed276d8a5f344cfe2e8e08f2e0756c574d8a97d93b9dd6fc806d1209263fe3bde40d794d0c9a3 WHIRLPOOL a188943bbf14e4010ffc770cc5439411804be5d72f3893bb1e9e15ae85a8872564d32976bce9720eb8681c5c2e4ea031c0b45bab921d937f6e3f6b4ba5023d3f +DIST firefox-50.0b6.source.tar.xz 195877380 SHA256 8ccf3fa9339fb4d8a0fdb6f3fc3c5f7405129f19f488fadbc6841c6d1f18d03e SHA512 b5738607874916b8b80cfa8d513ea64f0cf7e29daf9ae4f95447bc043f531f4fe40769868377ded6d021db7e38743137b897cb662bb2a3fa4c9273126eafcef9 WHIRLPOOL 516befc9d8c7544658e9c99953e9224d4f8fc3745e52f200d962515edaffe0145810177ba1edc492db061746f775c1eb6edbaab9c9af14ae364a93de7d5f1b8d diff --git a/www-client/firefox/firefox-50.0_beta6.ebuild b/www-client/firefox/firefox-50.0_beta6.ebuild new file mode 100644 index 0000000..d996cad --- /dev/null +++ b/www-client/firefox/firefox-50.0_beta6.ebuild @@ -0,0 +1,366 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +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=( ach af an ar as ast az be bg bn-BD bn-IN br bs ca cak cs cy da de dsb +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 gn gu-IN he hi-IN hr hsb hu hy-AM id is it ja kk km kn ko lij lt +lv mai mk ml mr ms 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 uz 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 different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +# Patch version +PATCH="${PN}-50.0-patches-01" +MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" + +MOZCONFIG_OPTIONAL_GTK2ONLY=1 +MOZCONFIG_OPTIONAL_WIFI=1 +MOZCONFIG_OPTIONAL_JIT="enabled" + +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.49 pax-utils fdo-mime autotools virtualx mozlinguas-v2 + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="http://www.mozilla.com/firefox" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" + +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="bindist hardened +hwaccel pgo selinux +gmp-autoupdate test" +RESTRICT="!bindist? ( bindist )" + +PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz ) +SRC_URI="${SRC_URI} + ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz + ${PATCH_URIS[@]}" + +ASM_DEPEND=">=dev-lang/yasm-1.1" + +RDEPEND=" + >=dev-libs/nss-3.25 + >=dev-libs/nspr-4.12 + selinux? ( sec-policy/selinux-mozilla )" + +DEPEND="${RDEPEND} + pgo? ( >=sys-devel/gcc-4.5 ) + amd64? ( ${ASM_DEPEND} virtual/opengl ) + x86? ( ${ASM_DEPEND} virtual/opengl )" + +S="${WORKDIR}/firefox-${MOZ_PV}" + +QA_PRESTRIPPED="usr/lib*/${PN}/firefox" + +BUILD_OBJ_DIR="${S}/ff" + +# dependencies newer than specified in the eclass +RDEPEND="${RDEPEND} + >=media-libs/libpng-1.6.23 + " + +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 +} + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack +} + +src_prepare() { + # Apply our patches + eapply "${WORKDIR}/firefox" \ + "${FILESDIR}"/${PN}-48.0-pgo.patch + + # 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 + + # Keep codebase the same even if not using official branding + sed '/^MOZ_DEV_EDITION=1/d' \ + -i "${S}"/browser/branding/aurora/configure.sh || die + + # Allow user to apply any additional patches without modifing ebuild + eapply_user + + # Autotools configure is now called old-configure.in + # This works because there is still a configure.in that happens to be for the + # shell wrapper configure script + eautoreconf old-configure.in + + # Must run autoconf in js/src + cd "${S}"/js/src || die + eautoconf old-configure.in + + # Need to update jemalloc's configure + cd "${S}"/memory/jemalloc/src || die + WANT_AUTOCONF= eautoconf +} + +src_configure() { + 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" + + # Only available on mozilla-overlay for experimentation -- Removed in Gentoo repo per bug 571180 + #use egl && mozconfig_annotate 'Enable EGL as GL provider' --with-gl-provider=EGL + + # 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}" + + # Allow for a proper pgo build + if use pgo; then + echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> "${S}"/.mozconfig + fi + + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig + + # Finalize and report settings + mozconfig_final + + if [[ $(gcc-major-version) -lt 4 ]]; then + append-cxxflags -fno-stack-protector + fi + + # workaround for funky/broken upstream configure... + SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ + emake -f client.mk configure +} + +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}" + + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ + virtx emake -f client.mk profiledbuild || die "virtx emake failed" + else + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ + emake -f client.mk realbuild + fi + +} + +src_install() { + 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 + + mozconfig_install_prefs \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" + + # Augment this with hwaccel prefs + if use hwaccel ; then + cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + fi + + 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" + + # Override preferences to set the MOZ_DEV_EDITION defaults, since we + # don't define MOZ_DEV_EDITION to avoid profile debaucles. + # (source: browser/app/profile/firefox.js) + cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <> "${ED}/usr/share/applications/${PN}.desktop" \ + || die + fi + + # Required in order to use plugins and even run firefox on hardened, with jit useflag. + if use jit; then + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} + else + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container + 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 +}