summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-02-13 15:43:54 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-02-13 15:49:51 +0100
commit94f34294e652cc99f47692a8c07a940005d82629 (patch)
tree76795bf0834e306d79725f396e9294633b25e084 /www-client/firefox-bin
parentwww-client/firefox-bin: security cleanup (bug #709346) (diff)
downloadgentoo-94f34294e652cc99f47692a8c07a940005d82629.tar.gz
gentoo-94f34294e652cc99f47692a8c07a940005d82629.tar.bz2
gentoo-94f34294e652cc99f47692a8c07a940005d82629.zip
www-client/firefox-bin: add alsa support
Thanks-to: Vitaly Zdanevich <zdanevich.vitaly@ya.ru> Closes: https://github.com/gentoo/gentoo/pull/14278 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'www-client/firefox-bin')
-rw-r--r--www-client/firefox-bin/firefox-bin-68.5.0.ebuild25
-rw-r--r--www-client/firefox-bin/firefox-bin-73.0.ebuild25
2 files changed, 42 insertions, 8 deletions
diff --git a/www-client/firefox-bin/firefox-bin-68.5.0.ebuild b/www-client/firefox-bin/firefox-bin-68.5.0.ebuild
index a4bbc5254737..030cfc8b6b15 100644
--- a/www-client/firefox-bin/firefox-bin-68.5.0.ebuild
+++ b/www-client/firefox-bin/firefox-bin-68.5.0.ebuild
@@ -35,9 +35,14 @@ RESTRICT="strip mirror"
KEYWORDS="-* amd64 x86"
SLOT="0"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="+ffmpeg +pulseaudio selinux startup-notification"
-
-DEPEND="app-arch/unzip"
+IUSE="alsa +ffmpeg +pulseaudio selinux startup-notification"
+REQUIRED_USE="alsa? ( !pulseaudio )"
+
+DEPEND="app-arch/unzip
+ alsa? (
+ dev-util/patchelf
+ media-sound/apulse
+ )"
RDEPEND="dev-libs/atk
>=sys-apps/dbus-0.60
>=dev-libs/dbus-glib-0.72
@@ -129,6 +134,11 @@ src_install() {
MOZ_INSTALL_L10N_XPIFILE="1" \
mozlinguas_src_install
+ if use alsa ; then
+ local apulselib="/usr/$(get_libdir)/apulse"
+ patchelf --set-rpath "${apulselib}" "${ED}"${MOZILLA_FIVE_HOME}/libxul.so || die
+ fi
+
# Create /usr/bin/firefox-bin
dodir /usr/bin/
local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "")
@@ -162,7 +172,14 @@ pkg_postinst() {
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 pulseaudio installed"
+
+ local HAS_AUDIO=0
+ use pulseaudio && HAS_AUDIO=1
+ use alsa && HAS_AUDIO=1
+
+ if [[ ${HAS_AUDIO} -eq 0 ]] ; then
+ ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"
+ fi
# Update mimedb for the new .desktop file
xdg_desktop_database_update
diff --git a/www-client/firefox-bin/firefox-bin-73.0.ebuild b/www-client/firefox-bin/firefox-bin-73.0.ebuild
index 1f61fc71c8b4..b83288b7f7e6 100644
--- a/www-client/firefox-bin/firefox-bin-73.0.ebuild
+++ b/www-client/firefox-bin/firefox-bin-73.0.ebuild
@@ -35,9 +35,14 @@ RESTRICT="strip mirror"
KEYWORDS="-* amd64 x86"
SLOT="0"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="+ffmpeg +pulseaudio selinux startup-notification"
-
-DEPEND="app-arch/unzip"
+IUSE="alsa +ffmpeg +pulseaudio selinux startup-notification"
+REQUIRED_USE="alsa? ( !pulseaudio )"
+
+DEPEND="app-arch/unzip
+ alsa? (
+ dev-util/patchelf
+ media-sound/apulse
+ )"
RDEPEND="dev-libs/atk
>=sys-apps/dbus-0.60
>=dev-libs/dbus-glib-0.72
@@ -129,6 +134,11 @@ src_install() {
MOZ_INSTALL_L10N_XPIFILE="1" \
mozlinguas_src_install
+ if use alsa ; then
+ local apulselib="/usr/$(get_libdir)/apulse"
+ patchelf --set-rpath "${apulselib}" "${ED}"${MOZILLA_FIVE_HOME}/libxul.so || die
+ fi
+
# Create /usr/bin/firefox-bin
dodir /usr/bin/
local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "")
@@ -167,7 +177,14 @@ pkg_postinst() {
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 pulseaudio installed"
+
+ local HAS_AUDIO=0
+ use pulseaudio && HAS_AUDIO=1
+ use alsa && HAS_AUDIO=1
+
+ if [[ ${HAS_AUDIO} -eq 0 ]] ; then
+ ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"
+ fi
local show_doh_information