From 19e2bb19b7e61a15fcf2b840ac5e7520cc282fc3 Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Sat, 29 Apr 2017 12:45:58 -0400 Subject: [PATCH] www-client/firefox: improve and unify apulse support Create relative symlinks to a defined set of apulse libs instead of iterating over what libraries are installed on disk and using absolute symlinks. Also sync the code between 52.1 and 53.0 ebuilds Bug: http://bugs.gentoo.org/613980 Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- ...irefox-52.1.0.ebuild => firefox-52.1.0-r1.ebuild} | 12 +++++++++--- www-client/firefox/firefox-53.0.ebuild | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) rename www-client/firefox/{firefox-52.1.0.ebuild => firefox-52.1.0-r1.ebuild} (96%) diff --git a/www-client/firefox/firefox-52.1.0.ebuild b/www-client/firefox/firefox-52.1.0-r1.ebuild similarity index 96% rename from www-client/firefox/firefox-52.1.0.ebuild rename to www-client/firefox/firefox-52.1.0-r1.ebuild index e86292997622..91b2a431871e 100644 --- a/www-client/firefox/firefox-52.1.0.ebuild +++ b/www-client/firefox/firefox-52.1.0-r1.ebuild @@ -366,15 +366,15 @@ pkg_preinst() { # if the apulse libs are available in MOZILLA_FIVE_HOME then apulse # doesn't need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && [ -d "${EROOT}"usr/$(get_libdir)/apulse ] ; then + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then einfo "APULSE found - Generating library symlinks for sound support" local lib pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die - for lib in "${EROOT}"usr/$(get_libdir)/apulse/libpulse* ; do + for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do # a quickpkg rolled by hand will grab symlinks as part of the package, # so we need to avoid creating them if they already exist. if ! [ -L ${lib##*/} ]; then - ln -s "${lib}" || die + ln -s "${lib}" ${lib##*/} || die fi done popd &>/dev/null || die @@ -392,6 +392,12 @@ pkg_postinst() { local plugin for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done fi + + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then + elog "Apulse was detected at merge time on this system and so it will always be" + elog "used for sound. If you wish to use pulseaudio instead please unmerge" + elog "media-sound/apulse." + fi } pkg_postrm() { diff --git a/www-client/firefox/firefox-53.0.ebuild b/www-client/firefox/firefox-53.0.ebuild index 16e714db9070..a911896f0de7 100644 --- a/www-client/firefox/firefox-53.0.ebuild +++ b/www-client/firefox/firefox-53.0.ebuild @@ -371,15 +371,15 @@ pkg_preinst() { # if the apulse libs are available in MOZILLA_FIVE_HOME then apulse # doesn't need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && [ -d "${EPREFIX}"/usr/$(get_libdir)/apulse ] ; then + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then einfo "APULSE found - Generating library symlinks for sound support" local lib pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die - for lib in "${EPREFIX}"/usr/$(get_libdir)/apulse/libpulse* ; do + for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do # a quickpkg rolled by hand will grab symlinks as part of the package, # so we need to avoid creating them if they already exist. if ! [ -L ${lib##*/} ]; then - ln -s "${lib}" || die + ln -s "${lib}" ${lib##*/} || die fi done popd &>/dev/null || die @@ -398,7 +398,7 @@ pkg_postinst() { for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done fi - if use pulseaudio && [ -d "${EPREFIX}"/usr/$(get_libdir)/apulse ]; then + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9"; then elog "Apulse was detected at merge time on this system and so it will always be" elog "used for sound. If you wish to use pulseaudio instead please unmerge" elog "media-sound/apulse." -- 2.26.2