commit:     27dfc5592208b407bbaf26cbc780bfae5294c001
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 12 21:09:22 2017 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 02:19:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27dfc559

www-client/firefox-bin: add apulse compatibility to wrapper and some use-flags

Added ffmpeg and pulseaudio to IUSE, default-enabled, to be (A) compatible with
www-client/firefox and (B) ensure dependencies for this functionality is brought
in and retained without @world entries required.  It's a binary package so the
hit is minimal to be dealing with optional runtime-only deps with use flags.

Also added apulse to the LD_LIBRARY_PATH so that it will be used to provide
audio support when it is installed.

Bug: http://bugs.gentoo.org/615000

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 ...n-52.0.1.ebuild => firefox-bin-52.0.1-r1.ebuild} | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/www-client/firefox-bin/firefox-bin-52.0.1.ebuild 
b/www-client/firefox-bin/firefox-bin-52.0.1-r1.ebuild
similarity index 91%
rename from www-client/firefox-bin/firefox-bin-52.0.1.ebuild
rename to www-client/firefox-bin/firefox-bin-52.0.1-r1.ebuild
index 5a15b94ea04..138b3285c87 100644
--- a/www-client/firefox-bin/firefox-bin-52.0.1.ebuild
+++ b/www-client/firefox-bin/firefox-bin-52.0.1-r1.ebuild
@@ -31,14 +31,13 @@ RESTRICT="strip mirror"
 KEYWORDS="-* ~amd64 ~x86"
 SLOT="0"
 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="selinux startup-notification"
+IUSE="+ffmpeg +pulseaudio selinux startup-notification"
 
 DEPEND="app-arch/unzip"
 RDEPEND="dev-libs/atk
        >=sys-apps/dbus-0.60
        >=dev-libs/dbus-glib-0.72
        >=dev-libs/glib-2.26:2
-       >=media-libs/alsa-lib-1.0.16
        media-libs/fontconfig
        >=media-libs/freetype-2.4.10
        >=x11-libs/cairo-1.10[X]
@@ -54,6 +53,9 @@ RDEPEND="dev-libs/atk
        x11-libs/libXt
        >=x11-libs/pango-1.22.0
        virtual/freedesktop-icon-theme
+       pulseaudio? ( || ( media-sound/pulseaudio
+               >=media-sound/apulse-0.1.9 ) )
+       ffmpeg? ( media-video/ffmpeg )
        selinux? ( sec-policy/selinux-mozilla )
 "
 
@@ -132,8 +134,8 @@ src_install() {
        cat <<-EOF >"${ED}"usr/bin/${PN}
        #!/bin/sh
        unset LD_PRELOAD
-       LD_LIBRARY_PATH="/opt/firefox/"
-       GTK_PATH=/usr/lib/gtk-2.0/
+       LD_LIBRARY_PATH="/usr/$(get_libdir)/apulse:/opt/firefox/" \\
+       GTK_PATH=/usr/lib/gtk-3.0/ \\
        exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
        EOF
        fperms 0755 /usr/bin/${PN}
@@ -162,15 +164,8 @@ pkg_postinst() {
                einfo "gnome-base/orbit and net-misc/curl emerged."
                einfo
        fi
-       einfo "For HTML5 video you need media-video/ffmpeg installed."
-
-       # Drop requirement of curl not built with nss as it's not necessary 
anymore
-       #if has_version 'net-misc/curl[nss]'; then
-       #       einfo
-       #       einfo "Crashreporter won't be able to send reports"
-       #       einfo "if you have curl emerged with the nss USE-flag"
-       #       einfo
-       #fi
+       use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without 
media-video/ffmpeg installed"
+       use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without 
apulse or pulseaudio installed"
 
        # Update mimedb for the new .desktop file
        fdo-mime_desktop_database_update

Reply via email to