From fb070946c79bef8356e120983461a5099bb9085f Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Wed, 3 May 2017 13:43:28 -0400 Subject: [PATCH] www-client/firefox-bin: ensure apulse will not be loaded if USE=-pulseaudio If a system has apulse < 0.1.9 installed but USE=-pulseaudio set, then the previous attempt at getting apulse working would still try and load it, causing firefox-bin to crash. This commit addresses that by only attempting to load apulse if USE=pulseaudio is set. Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- ...bin-52.1.0-r1.ebuild => firefox-bin-52.1.0-r2.ebuild} | 5 +++-- ...fox-bin-53.0-r1.ebuild => firefox-bin-53.0-r2.ebuild} | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) rename www-client/firefox-bin/{firefox-bin-52.1.0-r1.ebuild => firefox-bin-52.1.0-r2.ebuild} (97%) rename www-client/firefox-bin/{firefox-bin-53.0-r1.ebuild => firefox-bin-53.0-r2.ebuild} (95%) diff --git a/www-client/firefox-bin/firefox-bin-52.1.0-r1.ebuild b/www-client/firefox-bin/firefox-bin-52.1.0-r2.ebuild similarity index 97% rename from www-client/firefox-bin/firefox-bin-52.1.0-r1.ebuild rename to www-client/firefox-bin/firefox-bin-52.1.0-r2.ebuild index ed5784e0f7ba..63712e923b1c 100644 --- a/www-client/firefox-bin/firefox-bin-52.1.0-r1.ebuild +++ b/www-client/firefox-bin/firefox-bin-52.1.0-r2.ebuild @@ -136,10 +136,11 @@ src_install() { # Create /usr/bin/firefox-bin dodir /usr/bin/ + local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "") cat <<-EOF >"${ED}"usr/bin/${PN} #!/bin/sh unset LD_PRELOAD - LD_LIBRARY_PATH="/usr/$(get_libdir)/apulse:/opt/firefox/" \\ + LD_LIBRARY_PATH="${apulselib}/opt/firefox/" \\ GTK_PATH=/usr/lib/gtk-3.0/ \\ exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" EOF @@ -170,7 +171,7 @@ 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 apulse or pulseaudio installed" + use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without pulseaudio installed" # Update mimedb for the new .desktop file fdo-mime_desktop_database_update diff --git a/www-client/firefox-bin/firefox-bin-53.0-r1.ebuild b/www-client/firefox-bin/firefox-bin-53.0-r2.ebuild similarity index 95% rename from www-client/firefox-bin/firefox-bin-53.0-r1.ebuild rename to www-client/firefox-bin/firefox-bin-53.0-r2.ebuild index 69ec314d827c..da78aea4869d 100644 --- a/www-client/firefox-bin/firefox-bin-53.0-r1.ebuild +++ b/www-client/firefox-bin/firefox-bin-53.0-r2.ebuild @@ -23,7 +23,7 @@ MOZ_P="${MOZ_PN}-${MOZ_PV}" MOZ_HTTP_URI="http://archive.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/" -inherit eutils pax-utils fdo-mime gnome2-utils mozlinguas-v2 +inherit eutils pax-utils fdo-mime gnome2-utils mozlinguas-v2 nsplugins DESCRIPTION="Firefox Web Browser" SRC_URI="${SRC_URI} @@ -135,10 +135,11 @@ src_install() { # Create /usr/bin/firefox-bin dodir /usr/bin/ + local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "") cat <<-EOF >"${ED}"usr/bin/${PN} #!/bin/sh unset LD_PRELOAD - LD_LIBRARY_PATH="/usr/$(get_libdir)/apulse:/opt/firefox/" \\ + LD_LIBRARY_PATH="${apulselib}/opt/firefox/" \\ GTK_PATH=/usr/lib/gtk-3.0/ \\ exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" EOF @@ -149,7 +150,7 @@ src_install() { echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN} doins "${T}"/10${PN} || die - # Plugins dir + # Plugins dir, still used for flash share_plugins_dir # Required in order to use plugins and even run firefox on hardened. @@ -169,7 +170,7 @@ 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 apulse or pulseaudio installed" + use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without pulseaudio installed" # Update mimedb for the new .desktop file fdo-mime_desktop_database_update -- 2.26.2