summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2017-08-28 12:52:14 -0400
committerIan Stakenvicius <axs@gentoo.org>2017-08-28 12:52:14 -0400
commit86d0cbca6ec2f3c872d9c4bf0a51768d98823b05 (patch)
treed6f4cfde5f3cb4a76bdf48200827f97478cf68a8
parentwww-client/firefox - version bump 56.0_beta6 (diff)
downloadmozilla-86d0cbca6ec2f3c872d9c4bf0a51768d98823b05.tar.gz
mozilla-86d0cbca6ec2f3c872d9c4bf0a51768d98823b05.tar.bz2
mozilla-86d0cbca6ec2f3c872d9c4bf0a51768d98823b05.zip
Rework eclasses and ebuilds
Combined mozconfig and mozcoreconf to make mozsupport.eclass, moved dependencies into the ebuilds (firefox-55 and 56 for now), reworked IUSE so that the eclass responds to in_iuse rather than requiring variables be set for optional IUSE values. This rework should allow the eclass to be much more static, no longer requiring bumps every major version. Ebuilds contain helper variables holding all common dependencies, which allows for easier synchronization between the various packages than adding it all back directly to RDEPEND. All eclass helper function names remain the same. The eclass should only need to be bumped now if/when there are major non-USE-flag-tied changes to configuration or building, which has historically been rather limited.
-rw-r--r--eclass/mozsupport.eclass467
-rw-r--r--www-client/firefox/firefox-55.0.2.ebuild81
-rw-r--r--www-client/firefox/firefox-56.0_beta6.ebuild78
3 files changed, 613 insertions, 13 deletions
diff --git a/eclass/mozsupport.eclass b/eclass/mozsupport.eclass
new file mode 100644
index 00000000..446f5386
--- /dev/null
+++ b/eclass/mozsupport.eclass
@@ -0,0 +1,467 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# @ECLASS: mozsupport.eclass
+# @MAINTAINER:
+# Mozilla team <mozilla@gentoo.org>
+# @BLURB: core options and configuration functions for mozilla
+# @DESCRIPTION:
+# This eclass holds functions used to set configuration and other options
+# to the mozilla build system. It partially replaces the old mozcoreconf
+# and mozconfig eclasses, with the remaining functionality of those eclasses
+# being integrated directly into ebuilds.
+
+# @ECLASS-VARIABLE: MOZILLA_FIVE_HOME
+# @DESCRIPTION:
+# This is an eclass-generated variable that defines the rpath that the mozilla
+# product will be installed in. Read-only
+
+if [[ ! ${_MOZSUPPORT} ]]; then
+
+case ${EAPI} in
+ 0|1|2|3|4|5)
+ die "EAPI=${EAPI} not supported"
+ ;;
+esac
+
+
+if [[ -n ${_MOZCORECONF} ]]; then
+ die "mozsupport.eclass conflicts directly with mozcoreconf.eclass"
+fi
+
+inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
+
+IUSE="custom-cflags custom-optimization"
+
+# @FUNCTION: mozconfig_annotate
+# @DESCRIPTION:
+# add an annotated line to .mozconfig
+#
+# Example:
+# mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
+# => ac_add_options --enable-js-ultrasparc # building on ultrasparc
+mozconfig_annotate() {
+ declare reason=$1 x ; shift
+ [[ $# -gt 0 ]] || die "mozconfig_annotate missing flags for ${reason}\!"
+ for x in ${*}; do
+ echo "ac_add_options ${x} # ${reason}" >>.mozconfig
+ done
+}
+
+# @FUNCTION: mozconfig_use_enable
+# @DESCRIPTION:
+# add a line to .mozconfig based on a USE-flag
+#
+# Example:
+# mozconfig_use_enable truetype freetype2
+# => ac_add_options --enable-freetype2 # +truetype
+mozconfig_use_enable() {
+ declare flag=$(use_enable "$@")
+ mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}"
+}
+
+# @FUNCTION mozconfig_use_with
+# @DESCRIPTION
+# add a line to .mozconfig based on a USE-flag
+#
+# Example:
+# mozconfig_use_with kerberos gss-api /usr/$(get_libdir)
+# => ac_add_options --with-gss-api=/usr/lib # +kerberos
+mozconfig_use_with() {
+ declare flag=$(use_with "$@")
+ mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}"
+}
+
+# @FUNCTION mozconfig_use_extension
+# @DESCRIPTION
+# enable or disable an extension based on a USE-flag
+#
+# Example:
+# mozconfig_use_extension gnome gnomevfs
+# => ac_add_options --enable-extensions=gnomevfs
+mozconfig_use_extension() {
+ declare minus=$(use $1 || echo -)
+ mozconfig_annotate "${minus:-+}$1" --enable-extensions=${minus}${2}
+}
+
+moz_pkgsetup() {
+ # Ensure we use C locale when building
+ export LANG="C"
+ export LC_ALL="C"
+ export LC_MESSAGES="C"
+ export LC_CTYPE="C"
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ tc-export CC CXX LD PKG_CONFIG AR RANLIB
+
+ # Ensure that we have a sane build enviroment
+ export MOZILLA_CLIENT=1
+ export BUILD_OPT=1
+ export NO_STATIC_LIB=1
+ export USE_PTHREADS=1
+ export ALDFLAGS=${LDFLAGS}
+ # ensure MOZCONFIG is not defined
+ unset MOZCONFIG
+
+ # set MOZILLA_FIVE_HOME
+ export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ # nested configure scripts in mozilla products generate unrecognized options
+ # false positives when toplevel configure passes downwards.
+ export QA_CONFIGURE_OPTIONS=".*"
+
+ if [[ $(gcc-major-version) -eq 3 ]]; then
+ ewarn "Unsupported compiler detected, DO NOT file bugs for"
+ ewarn "outdated compilers. Bugs opened with gcc-3 will be closed"
+ ewarn "invalid."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+# @FUNCTION: mozconfig_init
+# @DESCRIPTION:
+# Initialize mozilla configuration and populate with core settings.
+# This should be called in src_configure before any other mozconfig_* functions.
+mozconfig_init() {
+ declare enable_optimize pango_version myext x
+ declare XUL=$([[ ${PN} == xulrunner ]] && echo true || echo false)
+ declare FF=$([[ ${PN} == firefox ]] && echo true || echo false)
+ declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
+ declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false)
+
+ ####################################
+ #
+ # Setup the initial .mozconfig
+ # See http://www.mozilla.org/build/configure-build.html
+ #
+ ####################################
+
+ case ${PN} in
+ *xulrunner)
+ cp xulrunner/config/mozconfig .mozconfig \
+ || die "cp xulrunner/config/mozconfig failed" ;;
+ *firefox)
+ cp browser/config/mozconfig .mozconfig \
+ || die "cp browser/config/mozconfig failed" ;;
+ seamonkey)
+ # Must create the initial mozconfig to enable application
+ : >.mozconfig || die "initial mozconfig creation failed"
+ mozconfig_annotate "" --enable-application=suite ;;
+ *thunderbird)
+ # Must create the initial mozconfig to enable application
+ : >.mozconfig || die "initial mozconfig creation failed"
+ mozconfig_annotate "" --enable-application=mail ;;
+ esac
+
+ ####################################
+ #
+ # CFLAGS setup and ARCH support
+ #
+ ####################################
+
+ # Set optimization level
+ if [[ $(gcc-major-version) -ge 7 ]]; then
+ mozconfig_annotate "Workaround known breakage" --enable-optimize=-O2
+ elif [[ ${ARCH} == hppa ]]; then
+ mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0
+ elif [[ ${ARCH} == x86 ]]; then
+ mozconfig_annotate "less then -O2 causes a segfault on x86" --enable-optimize=-O2
+ elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
+ # Set optimization level based on CFLAGS
+ if is-flag -O0; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
+ elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then
+ mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1
+ elif is-flag -O4; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O4
+ elif is-flag -O3; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O3
+ elif is-flag -O1; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
+ elif is-flag -Os; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
+ else
+ mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2
+ fi
+ else
+ # Enable Mozilla's default
+ mozconfig_annotate "mozilla default" --enable-optimize
+ fi
+
+ # Strip optimization so it does not end up in compile string
+ filter-flags '-O*'
+
+ # Strip over-aggressive CFLAGS
+ use custom-cflags || strip-flags
+
+ # Additional ARCH support
+ case "${ARCH}" in
+ arm)
+ # Reduce the memory requirements for linking
+ append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+ ;;
+ alpha)
+ # Historically we have needed to add -fPIC manually for 64-bit.
+ # Additionally, alpha should *always* build with -mieee for correct math
+ # operation
+ append-flags -fPIC -mieee
+ ;;
+ ia64)
+ # Historically we have needed to add this manually for 64-bit
+ append-flags -fPIC
+ ;;
+ ppc64)
+ append-flags -fPIC -mminimal-toc
+ # Reduce the memory requirements for linking
+ append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+ ;;
+ esac
+
+ # We need to append flags for gcc-6 support
+ if [[ $(gcc-major-version) -ge 6 ]]; then
+ append-cxxflags -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2
+ fi
+
+ # Go a little faster; use less RAM
+ append-flags "$MAKEEDIT_FLAGS"
+
+ # Use the MOZILLA_FIVE_HOME for the rpath
+ append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
+ # Set MOZILLA_FIVE_HOME in mozconfig
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
+
+ ####################################
+ #
+ # mozconfig setup
+ #
+ ####################################
+
+ mozconfig_annotate disable_update_strip \
+ --disable-updater \
+ --disable-strip \
+ --disable-install-strip
+
+ # jemalloc won't build with older glibc
+ ! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc
+}
+
+# @FUNCTION: mozconfig_final
+# @DESCRIPTION:
+# Apply EXTRA_ECONF values to .mozconfig
+# Display a table describing all configuration options paired
+# with reasons, then clean up extensions list.
+# This should be called in src_configure at the end of all other mozconfig_* functions.
+mozconfig_final() {
+ declare ac opt hash reason
+
+ # Apply EXTRA_ECONF entries to .mozconfig
+ if [[ -n ${EXTRA_ECONF} ]]; then
+ IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!}
+ for opt in "${ac[@]}"; do
+ mozconfig_annotate "EXTRA_ECONF" --${opt#--}
+ done
+ fi
+
+ echo
+ echo "=========================================================="
+ echo "Building ${PF} with the following configuration"
+ grep ^ac_add_options .mozconfig | while read ac opt hash reason; do
+ [[ -z ${hash} || ${hash} == \# ]] \
+ || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}"
+ printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}"
+ done
+ echo "=========================================================="
+ echo
+
+ # Resolve multiple --enable-extensions down to one
+ declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \
+ .mozconfig | xargs)
+ sed -i '/^ac_add_options --enable-extensions/d' .mozconfig
+ echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig
+}
+
+# @FUNCTION: mozconfig_config
+# @DESCRIPTION:
+# Set common configure options for mozilla packages.
+# Call this within src_configure() phase, after mozconfig_init
+#
+# Example:
+#
+# src_configure() {
+# mozconfig_init
+# mozconfig_config
+# # ... misc ebuild-unique settings via calls to
+# # ... mozconfig_{annotate,use_with,use_enable}
+# mozconfig_final
+# }
+
+mozconfig_config() {
+ # QA - check to make sure all mandatory use flags are specified in IUSE and die
+ # if any are missing.
+ local i
+ for i in dbus debug neon pulseaudio selinux startup-notificaiton system-harfbuzz \
+ system-icu system-jpeg system-libevent system-sqlite system-libvpx ; do
+ in_iuse ${i} || die "QA: ${i} not found in IUSE, required for mozconfig_config"
+ fi
+
+ # Migrated from mozcoreconf-2
+ mozconfig_annotate 'system_libs' \
+ --with-system-zlib \
+ --with-system-bz2
+
+ # Enable release to we use system ld
+ mozconfig_annotate 'gentoo ld support' --enable-release
+
+ if in_iuse bindist; then
+ mozconfig_use_enable !bindist official-branding
+ if [[ ${PN} == firefox ]] && use bindist ; then
+ mozconfig_annotate '' --with-branding=browser/branding/aurora
+ fi
+ fi
+
+ # Enable position independent executables
+ mozconfig_annotate 'enabled by Gentoo' --enable-pie
+ mozconfig_use_enable debug
+ mozconfig_use_enable debug tests
+
+ if ! use debug ; then
+ mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
+ else
+ mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
+ fi
+
+ mozconfig_use_enable startup-notification
+
+ if in_iuse wifi ; then
+ # wifi pulls in dbus so manage both here
+ mozconfig_use_enable wifi necko-wifi
+ if use kernel_linux && use wifi && ! use dbus; then
+ echo "Enabling dbus support due to wifi request"
+ mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus
+ else
+ mozconfig_use_enable dbus
+ fi
+ else
+ mozconfig_use_enable dbus
+ mozconfig_annotate 'disabled' --disable-necko-wifi
+ fi
+
+ # These are enabled by default in all mozilla applications
+ mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr
+ mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr
+ mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir)
+ if use system-libevent; then
+ mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr
+ fi
+ mozconfig_annotate '' --prefix="${EPREFIX}"/usr
+ mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
+ mozconfig_annotate 'Gentoo default' --enable-system-hunspell
+ mozconfig_annotate '' --disable-crashreporter
+ mozconfig_annotate 'Gentoo default' --with-system-png
+ mozconfig_annotate '' --enable-system-ffi
+ mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold
+ mozconfig_annotate '' --disable-gconf
+ mozconfig_annotate '' --with-intl-api
+
+ # skia has no support for big-endian platforms
+ if [[ $(tc-endian) == "big" ]]; then
+ mozconfig_annotate 'big endian target' --disable-skia
+ else
+ mozconfig_annotate '' --enable-skia
+ fi
+
+ mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3
+
+ # Instead of the standard --build= and --host=, mozilla uses --host instead
+ # of --build, and --target intstead of --host.
+ # Note, mozilla also has --build but it does not do what you think it does.
+ # Set both --target and --host as mozilla uses python to guess values otherwise
+ mozconfig_annotate '' --target="${CHOST}"
+ mozconfig_annotate '' --host="${CBUILD:-${CHOST}}"
+
+ mozconfig_use_enable pulseaudio
+ # force the deprecated alsa sound code if pulseaudio is disabled
+ if use kernel_linux && ! use pulseaudio ; then
+ mozconfig_annotate '-pulseaudio' --enable-alsa
+ fi
+
+ # For testing purpose only
+ mozconfig_annotate 'Sandbox' --enable-content-sandbox
+
+ if in_iuse system-cairo ; then
+ mozconfig_use_enable system-cairo
+ fi
+ mozconfig_use_enable system-sqlite
+ mozconfig_use_with system-jpeg
+ mozconfig_use_with system-icu
+ mozconfig_use_with system-libvpx
+ mozconfig_use_with system-harfbuzz
+ mozconfig_use_with system-harfbuzz system-graphite2
+
+ # Modifications to better support ARM, bug 553364
+ if use neon ; then
+ mozconfig_annotate '' --with-fpu=neon
+ mozconfig_annotate '' --with-thumb=yes
+ mozconfig_annotate '' --with-thumb-interwork=no
+ fi
+ if [[ ${CHOST} == armv* ]] ; then
+ mozconfig_annotate '' --with-float-abi=hard
+ if ! use system-libvpx ; then
+ sed -i -e "s|softfp|hard|" \
+ "${S}"/media/libvpx/moz.build
+ fi
+ fi
+}
+
+# @FUNCTION: mozconfig_install_prefs
+# @DESCRIPTION:
+# Set preferences into the prefs.js file specified as a parameter to
+# the function. This sets both some common prefs to all mozilla
+# packages, and any prefs that may relate to the use flags administered
+# by mozconfig_config().
+#
+# Call this within src_install() phase, after copying the template
+# prefs file (if any) from ${FILESDIR}
+#
+# Example:
+#
+# src_install() {
+# cp "${FILESDIR}"/gentoo-default-prefs.js \
+# "${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"
+#
+# ...
+# }
+
+mozconfig_install_prefs() {
+ local prefs_file="${1}"
+
+ einfo "Adding prefs from mozconfig to ${prefs_file}"
+
+ # set dictionary path, to use system hunspell
+ echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \
+ >>"${prefs_file}" || die
+
+ # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it
+ if use system-harfbuzz ; then
+ echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \
+ >>"${prefs_file}" || die
+ fi
+
+ # force cairo as the canvas renderer on platforms without skia support
+ if [[ $(tc-endian) == "big" ]] ; then
+ echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \
+ >>"${prefs_file}" || die
+ echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \
+ >>"${prefs_file}" || die
+ fi
+}
+
+_MOZSUPPORT=1
+fi
diff --git a/www-client/firefox/firefox-55.0.2.ebuild b/www-client/firefox/firefox-55.0.2.ebuild
index 24f5b407..e7d2b5b7 100644
--- a/www-client/firefox/firefox-55.0.2.ebuild
+++ b/www-client/firefox/firefox-55.0.2.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,sqlite,ssl,threads'
VIRTUALX_REQUIRED="pgo"
WANT_AUTOCONF="2.1"
MOZ_ESR=""
@@ -27,9 +29,62 @@ fi
PATCH="${PN}-55.0-patches-09"
MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases"
-MOZCONFIG_OPTIONAL_WIFI=1
-
-inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.55 pax-utils xdg-utils autotools virtualx mozlinguas-v2
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozsupport pax-utils xdg-utils autotools virtualx mozlinguas-v2
+
+# IUSE flags common to all mozilla packages
+MOZ_COMMON_IUSE="dbus debug neon pulseaudio selinux startup-notificaiton system-cairo
+ system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-libvpx"
+
+# Dependencies common to all mozilla packages
+MOZ_COMMON_DEPENDS="
+ app-arch/zip
+ app-arch/unzip
+ >=sys-devel/binutils-2.16.1
+ sys-apps/findutils
+ pulseaudio? ( media-sound/pulseaudio )
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ "
+# Runtime Dependencies common to all mozilla packages
+MOZ_COMMON_RDEPENDS="
+ >=app-text/hunspell-1.5.4:=
+ dev-libs/atk
+ dev-libs/expat
+ >=x11-libs/cairo-1.10[X]
+ >=x11-libs/gtk+-2.18:2
+ >=x11-libs/gtk+-3.4.0:3
+ x11-libs/gdk-pixbuf
+ >=x11-libs/pango-1.22.0
+ >=media-libs/libpng-1.6.29:0=[apng]
+ >=media-libs/mesa-10.2:*
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.10
+ kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
+ pulseaudio? ( || ( media-sound/pulseaudio
+ >=media-sound/apulse-0.1.9 ) )
+ virtual/freedesktop-icon-theme
+ dbus? ( >=sys-apps/dbus-0.60
+ >=dev-libs/dbus-glib-0.72 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ >=dev-libs/glib-2.26:2
+ >=sys-libs/zlib-1.2.3
+ >=virtual/libffi-3.0.10
+ virtual/ffmpeg
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrender
+ x11-libs/libXt
+ system-cairo? ( >=x11-libs/cairo-1.12[X,xcb] >=x11-libs/pixman-0.19.2 )
+ system-icu? ( >=dev-libs/icu-58.1:= )
+ system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
+ system-libevent? ( >=dev-libs/libevent-2.0:0= )
+ system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] )
+ system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )
+ system-harfbuzz? ( >=media-libs/harfbuzz-1.3.3:0= >=media-gfx/graphite2-1.3.9-r1 )
+ "
DESCRIPTION="Firefox Web Browser"
HOMEPAGE="http://www.mozilla.com/firefox"
@@ -38,7 +93,7 @@ KEYWORDS="~amd64 ~x86"
SLOT="0"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="bindist +gmp-autoupdate hardened hwaccel jack nsplugin pgo selinux test"
+IUSE+="bindist ${MOZ_COMMON_IUSE} +gmp-autoupdate hardened hwaccel jack nsplugin pgo test wifi"
RESTRICT="!bindist? ( bindist )"
PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz )
@@ -48,13 +103,20 @@ SRC_URI="${SRC_URI}
ASM_DEPEND=">=dev-lang/yasm-1.1"
-RDEPEND="
+RDEPEND="${MOZ_COMMON_RDEPENDS}
jack? ( virtual/jack )
>=dev-libs/nss-3.32
>=dev-libs/nspr-4.16
- selinux? ( sec-policy/selinux-mozilla )"
+ selinux? ( sec-policy/selinux-mozilla )
+ wifi? (
+ kernel_linux? ( >=sys-apps/dbus-0.60
+ >=dev-libs/dbus-glib-0.72
+ net-misc/networkmanager )
+ )
+ "
DEPEND="${RDEPEND}
+ ${MOZ_COMMON_DEPENDS}
pgo? ( >=sys-devel/gcc-4.5 )
>=virtual/rust-1.15.1
amd64? ( ${ASM_DEPEND} virtual/opengl )
@@ -190,6 +252,13 @@ src_configure() {
mozconfig_init
mozconfig_config
+ # wifi pulls in dbus so force it if unset via USE=dbus.
+ mozconfig_use_enable wifi necko-wifi
+ if use kernel_linux && use wifi && ! use dbus; then
+ einfo "Enabling dbus support due to wifi request"
+ mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus
+ fi
+
# enable JACK, bug 600002
mozconfig_use_enable jack
diff --git a/www-client/firefox/firefox-56.0_beta6.ebuild b/www-client/firefox/firefox-56.0_beta6.ebuild
index 5779365f..89ee5ccc 100644
--- a/www-client/firefox/firefox-56.0_beta6.ebuild
+++ b/www-client/firefox/firefox-56.0_beta6.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,sqlite,ssl,threads'
VIRTUALX_REQUIRED="pgo"
WANT_AUTOCONF="2.1"
MOZ_ESR=""
@@ -27,9 +29,62 @@ fi
PATCH="${PN}-56.0-patches-04"
MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases"
-MOZCONFIG_OPTIONAL_WIFI=1
-
-inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.56 pax-utils xdg-utils autotools virtualx mozlinguas-v2
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozsupport pax-utils xdg-utils autotools virtualx mozlinguas-v2
+
+# IUSE flags common to all mozilla packages
+MOZ_COMMON_IUSE="dbus debug neon pulseaudio selinux startup-notificaiton
+ system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-libvpx"
+
+# Dependencies common to all mozilla packages
+MOZ_COMMON_DEPENDS="
+ app-arch/zip
+ app-arch/unzip
+ >=sys-devel/binutils-2.16.1
+ sys-apps/findutils
+ pulseaudio? ( media-sound/pulseaudio )
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ "
+# Runtime Dependencies common to all mozilla packages
+MOZ_COMMON_RDEPENDS="
+ >=app-text/hunspell-1.5.4:=
+ dev-libs/atk
+ dev-libs/expat
+ >=x11-libs/cairo-1.10[X]
+ >=x11-libs/gtk+-2.18:2
+ >=x11-libs/gtk+-3.4.0:3
+ x11-libs/gdk-pixbuf
+ >=x11-libs/pango-1.22.0
+ >=media-libs/libpng-1.6.29:0=[apng]
+ >=media-libs/mesa-10.2:*
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.10
+ kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
+ pulseaudio? ( || ( media-sound/pulseaudio
+ >=media-sound/apulse-0.1.9 ) )
+ virtual/freedesktop-icon-theme
+ dbus? ( >=sys-apps/dbus-0.60
+ >=dev-libs/dbus-glib-0.72 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ >=x11-libs/pixman-0.19.2
+ >=dev-libs/glib-2.26:2
+ >=sys-libs/zlib-1.2.3
+ >=virtual/libffi-3.0.10
+ virtual/ffmpeg
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrender
+ x11-libs/libXt
+ system-icu? ( >=dev-libs/icu-58.1:= )
+ system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
+ system-libevent? ( >=dev-libs/libevent-2.0:0= )
+ system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] )
+ system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )
+ system-harfbuzz? ( >=media-libs/harfbuzz-1.3.3:0= >=media-gfx/graphite2-1.3.9-r1 )
+ "
DESCRIPTION="Firefox Web Browser"
HOMEPAGE="http://www.mozilla.com/firefox"
@@ -38,7 +93,7 @@ KEYWORDS="~amd64 ~x86"
SLOT="0"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="bindist +gmp-autoupdate hardened hwaccel jack nsplugin pgo selinux test"
+IUSE="bindist ${MOZ_COMMON_IUSE} +gmp-autoupdate hardened hwaccel jack nsplugin pgo test wifi"
RESTRICT="!bindist? ( bindist )"
PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz )
@@ -48,17 +103,23 @@ SRC_URI="${SRC_URI}
ASM_DEPEND=">=dev-lang/yasm-1.1"
-RDEPEND="
+RDEPEND="${MOZ_COMMON_RDEPENDS}
jack? ( virtual/jack )
>=dev-libs/nss-3.32
>=dev-libs/nspr-4.16
- selinux? ( sec-policy/selinux-mozilla )"
+ selinux? ( sec-policy/selinux-mozilla )
+ wifi? (
+ kernel_linux? ( >=sys-apps/dbus-0.60
+ >=dev-libs/dbus-glib-0.72
+ net-misc/networkmanager )
+ )
+ "
DEPEND="${RDEPEND}
+ ${MOZ_COMMON_DEPENDS}
pgo? ( >=sys-devel/gcc-4.5 )
>=virtual/rust-1.17.1
>=dev-util/cargo-0.17.1
-
amd64? ( ${ASM_DEPEND} virtual/opengl )
x86? ( ${ASM_DEPEND} virtual/opengl )"
@@ -195,6 +256,9 @@ src_configure() {
# enable JACK, bug 600002
mozconfig_use_enable jack
+ # Disable for testing purposes only
+ mozconfig_annotate 'Upstream bug 1341234' --disable-stylo
+
# It doesn't compile on alpha without this LDFLAGS
use alpha && append-ldflags "-Wl,--no-relax"