commit:     42332a642def9a8d454246da68955172442e7aa5
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Feb  4 11:07:21 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Feb 21 02:05:44 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=42332a64

targets: Use the correct distcc libdir

Since distcc-3.3 (and bug 651030) distcc symlinks have been installed to
/usr/lib/distcc/bin/ regardless of get_libdir.

Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 88465c31..d8472d46 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -83,11 +83,10 @@ setup_features() {
                # This sets up automatic cross-distcc-fu according to
                # https://wiki.gentoo.org/wiki/Distcc/Cross-Compiling
                CHOST=$(portageq envvar CHOST)
-               LIBDIR=$(get_libdir)
-               cd /usr/${LIBDIR}/distcc/bin
+               cd /usr/lib/distcc/bin
                rm cc gcc g++ c++ 2>/dev/null
-               echo -e '#!/bin/bash\nexec 
/usr/'${LIBDIR}'/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
-               chmod a+x /usr/${LIBDIR}/distcc/bin/${CHOST}-wrapper
+               echo -e '#!/bin/bash\nexec 
/usr/lib/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
+               chmod a+x /usr/lib/distcc/bin/${CHOST}-wrapper
                for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
        fi
 
@@ -171,13 +170,12 @@ setup_gcc(){
 }
 
 cleanup_distcc() {
-       LIBDIR=$(get_libdir)
-       rm -rf /etc/distcc/hosts
+       rm -f /etc/distcc/hosts
        for i in cc gcc c++ g++; do
-               rm -f /usr/${LIBDIR}/distcc/bin/${i}
-               ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
+               rm -f /usr/lib/distcc/bin/${i}
+               ln -s /usr/bin/distcc /usr/lib/distcc/bin/${i}
        done
-       rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
+       rm -f /usr/lib/distcc/bin/*-wrapper
 }
 
 cleanup_icecream() {

Reply via email to