diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-03-29 23:10:29 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-03-30 13:45:09 +0200 |
commit | 0dc9c1d46d3e318a84af8fc89c9037915fa237d0 (patch) | |
tree | 39c35b56ce223254074384ea57de7b57d6dbbf53 /www-client | |
parent | www-client/firefox: fix style (diff) | |
download | gentoo-0dc9c1d46d3e318a84af8fc89c9037915fa237d0.tar.gz gentoo-0dc9c1d46d3e318a84af8fc89c9037915fa237d0.tar.bz2 gentoo-0dc9c1d46d3e318a84af8fc89c9037915fa237d0.zip |
www-client/firefox: fix PATH for FEATURES=ccache/distcc
Bug: https://bugs.gentoo.org/627726
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/firefox/firefox-68.6.0-r2.ebuild | 24 | ||||
-rw-r--r-- | www-client/firefox/firefox-74.0-r2.ebuild | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/www-client/firefox/firefox-68.6.0-r2.ebuild b/www-client/firefox/firefox-68.6.0-r2.ebuild index eb63ae0f71d5..270ebf156407 100644 --- a/www-client/firefox/firefox-68.6.0-r2.ebuild +++ b/www-client/firefox/firefox-68.6.0-r2.ebuild @@ -189,6 +189,21 @@ if [[ -z $GMP_PLUGIN_LIST ]] ; then GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) fi +fix_path() { + local value_to_move=${1} + local new_path path_value + IFS=:; local -a path_values=( ${PATH} ) + for path_value in "${path_values[@]}" ; do + if [[ ${path_value} == *"${value_to_move}"* ]] ; then + new_path="${path_value}${new_path:+:}${new_path}" + else + new_path+="${new_path:+:}${path_value}" + fi + done + + echo "${new_path}" +} + llvm_check_deps() { if ! has_version --host-root "sys-devel/clang:${LLVM_SLOT}" ; then ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 @@ -262,6 +277,15 @@ pkg_setup() { addpredict /proc/self/oom_score_adj llvm_pkg_setup + + # Workaround for #627726 + if has ccache ${FEATURES} ; then + einfo "Fixing PATH for FEATURES=ccache ..." + PATH=$(fix_path 'ccache/bin') + elif has distcc ${FEATURES} ; then + einfo "Fixing PATH for FEATURES=distcc ..." + PATH=$(fix_path 'distcc/bin') + fi } src_unpack() { diff --git a/www-client/firefox/firefox-74.0-r2.ebuild b/www-client/firefox/firefox-74.0-r2.ebuild index b6ff763a5bfc..bf2680e31471 100644 --- a/www-client/firefox/firefox-74.0-r2.ebuild +++ b/www-client/firefox/firefox-74.0-r2.ebuild @@ -199,6 +199,21 @@ if [[ -z $GMP_PLUGIN_LIST ]] ; then GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) fi +fix_path() { + local value_to_move=${1} + local new_path path_value + IFS=:; local -a path_values=( ${PATH} ) + for path_value in "${path_values[@]}" ; do + if [[ ${path_value} == *"${value_to_move}"* ]] ; then + new_path="${path_value}${new_path:+:}${new_path}" + else + new_path+="${new_path:+:}${path_value}" + fi + done + + echo "${new_path}" +} + llvm_check_deps() { if ! has_version --host-root "sys-devel/clang:${LLVM_SLOT}" ; then ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 @@ -280,6 +295,15 @@ pkg_setup() { addpredict /proc/self/oom_score_adj llvm_pkg_setup + + # Workaround for #627726 + if has ccache ${FEATURES} ; then + einfo "Fixing PATH for FEATURES=ccache ..." + PATH=$(fix_path 'ccache/bin') + elif has distcc ${FEATURES} ; then + einfo "Fixing PATH for FEATURES=distcc ..." + PATH=$(fix_path 'distcc/bin') + fi } src_unpack() { |