--- firefox-bin-52.0.1.ebuild 2017-04-11 19:40:43.769165993 +0200 +++ firefox-bin-52.0.1-r1.ebuild 2017-04-13 19:57:03.305128021 +0200 @@ -31,7 +31,7 @@ KEYWORDS="-* ~amd64 ~x86" SLOT="0" LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -IUSE="selinux startup-notification" +IUSE="apulse crashreporter ffmpeg pulseaudio selinux startup-notification" DEPEND="app-arch/unzip" RDEPEND="dev-libs/atk @@ -54,8 +54,19 @@ x11-libs/libXt >=x11-libs/pango-1.22.0 virtual/freedesktop-icon-theme + apulse? ( >=media-sound/apulse-0.1.9 ) + crashreporter? ( + gnome-base/gconf + gnome-base/orbit + net-misc/curl + ) + ffmpeg? ( virtual/ffmpeg ) + pulseaudio? ( media-sound/pulseaudio ) selinux? ( sec-policy/selinux-mozilla ) " +REQUIRED_USE=" + apulse? ( !pulseaudio ) +" QA_PREBUILT=" opt/${MOZ_PN}/*.so @@ -134,8 +145,12 @@ unset LD_PRELOAD LD_LIBRARY_PATH="/opt/firefox/" GTK_PATH=/usr/lib/gtk-2.0/ - exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" EOF + if use apulse; then + echo "exec /usr/bin/apulse /opt/${MOZ_PN}/${MOZ_PN} \"\$@\"" >>"${ED}"usr/bin/${PN} + else + echo "exec /opt/${MOZ_PN}/${MOZ_PN} \"\$@\"" >>"${ED}"usr/bin/${PN} + fi fperms 0755 /usr/bin/${PN} # revdep-rebuild entry @@ -155,14 +170,12 @@ } pkg_postinst() { - if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \ - || ! has_version 'net-misc/curl'; then - einfo - einfo "For using the crashreporter, you need gnome-base/gconf," - einfo "gnome-base/orbit and net-misc/curl emerged." - einfo + if ! use ffmpeg; then + einfo "For HTML5 video you need to enable ffmpeg" + fi + if ! use apulse && ! use pulseaudio; then + einfo "For HTML sound you need to enable apulse or pulseaudio" 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