www-client/firefox-bin: revbump for new apulse logic
authorJoonas Niilola <juippis@gentoo.org>
Thu, 13 Feb 2020 17:42:02 +0000 (19:42 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Fri, 14 Feb 2020 00:45:11 +0000 (01:45 +0100)
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/14649
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
www-client/firefox-bin/firefox-bin-68.5.0-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-68.5.0.ebuild with 94% similarity]
www-client/firefox-bin/firefox-bin-73.0-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-73.0.ebuild with 93% similarity]

similarity index 94%
rename from www-client/firefox-bin/firefox-bin-68.5.0.ebuild
rename to www-client/firefox-bin/firefox-bin-68.5.0-r1.ebuild
index 030cfc8b6b156b398c8164c07c83bc00797928cb..d95d92d07396e11f2c6b3536f91d8cce5754724f 100644 (file)
@@ -35,13 +35,14 @@ RESTRICT="strip mirror"
 KEYWORDS="-* amd64 x86"
 SLOT="0"
 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="alsa +ffmpeg +pulseaudio selinux startup-notification"
-REQUIRED_USE="alsa? ( !pulseaudio )"
+IUSE="+alsa +ffmpeg +pulseaudio selinux startup-notification"
 
 DEPEND="app-arch/unzip
        alsa? (
-               dev-util/patchelf
-               media-sound/apulse
+               !pulseaudio? (
+                       dev-util/patchelf
+                       media-sound/apulse
+               )
        )"
 RDEPEND="dev-libs/atk
        >=sys-apps/dbus-0.60
@@ -62,8 +63,12 @@ RDEPEND="dev-libs/atk
        x11-libs/libXt
        >=x11-libs/pango-1.22.0
        virtual/freedesktop-icon-theme
-       pulseaudio? ( !<media-sound/apulse-0.1.9
-               || ( media-sound/pulseaudio media-sound/apulse ) )
+       alsa? (
+               !pulseaudio? (
+                       media-sound/apulse
+               )
+       )
+       pulseaudio? ( media-sound/pulseaudio )
        ffmpeg? ( media-video/ffmpeg )
        selinux? ( sec-policy/selinux-mozilla )
 "
@@ -134,7 +139,7 @@ src_install() {
                MOZ_INSTALL_L10N_XPIFILE="1" \
                mozlinguas_src_install
 
-       if use alsa ; then
+       if use alsa && ! use pulseaudio; then
                local apulselib="/usr/$(get_libdir)/apulse"
                patchelf --set-rpath "${apulselib}" "${ED}"${MOZILLA_FIVE_HOME}/libxul.so || die
        fi
@@ -174,8 +179,9 @@ pkg_postinst() {
        use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed"
 
        local HAS_AUDIO=0
-       use pulseaudio && HAS_AUDIO=1
-       use alsa && HAS_AUDIO=1
+       if use alsa || use pulseaudio; then
+               HAS_AUDIO=1
+       fi
 
        if [[ ${HAS_AUDIO} -eq 0 ]] ; then
                ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"
similarity index 93%
rename from www-client/firefox-bin/firefox-bin-73.0.ebuild
rename to www-client/firefox-bin/firefox-bin-73.0-r1.ebuild
index b83288b7f7e64c06eea79dc8a25e24840b8470f6..8ec338ce7b01ba4ae2e82e5797e9f0a77c968b14 100644 (file)
@@ -35,13 +35,14 @@ RESTRICT="strip mirror"
 KEYWORDS="-* amd64 x86"
 SLOT="0"
 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="alsa +ffmpeg +pulseaudio selinux startup-notification"
-REQUIRED_USE="alsa? ( !pulseaudio )"
+IUSE="+alsa +ffmpeg +pulseaudio selinux startup-notification"
 
 DEPEND="app-arch/unzip
        alsa? (
-               dev-util/patchelf
-               media-sound/apulse
+               !pulseaudio? (
+                       dev-util/patchelf
+                       media-sound/apulse
+               )
        )"
 RDEPEND="dev-libs/atk
        >=sys-apps/dbus-0.60
@@ -62,8 +63,12 @@ RDEPEND="dev-libs/atk
        x11-libs/libXt
        >=x11-libs/pango-1.22.0
        virtual/freedesktop-icon-theme
-       pulseaudio? ( !<media-sound/apulse-0.1.9
-               || ( media-sound/pulseaudio media-sound/apulse ) )
+       alsa? (
+               !pulseaudio? (
+                       media-sound/apulse
+               )
+       )
+       pulseaudio? ( media-sound/pulseaudio )
        ffmpeg? ( media-video/ffmpeg )
        selinux? ( sec-policy/selinux-mozilla )
 "
@@ -134,14 +139,14 @@ src_install() {
                MOZ_INSTALL_L10N_XPIFILE="1" \
                mozlinguas_src_install
 
-       if use alsa ; then
+       if use alsa && ! use pulseaudio; 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:" "")
+       local apulselib=$(usex pulseaudio "" $(usex alsa "/usr/$(get_libdir)/apulse:" ""))
        cat <<-EOF >"${ED}"usr/bin/${PN}
        #!/bin/sh
        unset LD_PRELOAD
@@ -179,8 +184,9 @@ pkg_postinst() {
        use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed"
 
        local HAS_AUDIO=0
-       use pulseaudio && HAS_AUDIO=1
-       use alsa && HAS_AUDIO=1
+       if use alsa || use pulseaudio; then
+               HAS_AUDIO=1
+       fi
 
        if [[ ${HAS_AUDIO} -eq 0 ]] ; then
                ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"