Use get_libdir instead of hard-coding lib for distcc
authorMatt Turner <mattst88@gentoo.org>
Sat, 25 Jun 2011 17:50:22 +0000 (13:50 -0400)
committerMatt Turner <mattst88@gmail.com>
Sat, 25 Jun 2011 17:51:58 +0000 (13:51 -0400)
ChangeLog
targets/support/chroot-functions.sh

index 70681df6f8fcc336b26a5a8153379d705bb0b323..61dc5b2a409c85cd8949232a58163573b25f3143 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  25 Jun 2011; Matt Turner <mattst88@gentoo.org>
+  targets/support/chroot-functions.sh:
+  Use get_libdir instead of hard-coding lib for distcc
+
   25 Jun 2011; Matt Turner <mattst88@gentoo.org>
   modules/catalyst/arch/mips.py: add multilib (and missing n64) classes
 
index 72fee20d6aae02f2e757da76ba836a0f5a7d1caf..caaa576be60d24a2b227cc021def17a564e2d184 100644 (file)
@@ -92,11 +92,11 @@ setup_myfeatures(){
                # This sets up automatic cross-distcc-fu according to
                # http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
                CHOST=$(portageq envvar CHOST)
-               # TODO: change to use get_libdir
-               cd /usr/lib/distcc/bin
+               LIBDIR=$(get_libdir)
+               cd /usr/${LIBDIR}/distcc/bin
                rm cc gcc g++ c++ 2>/dev/null
-               echo -e '#!/bin/bash\nexec /usr/lib/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
-               chmod a+x /usr/lib/distcc/bin/${CHOST}-wrapper
+               echo -e '#!/bin/bash\nexec /usr/'${LIBDIR}'/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
+               chmod a+x /usr/${LIBDIR}/distcc/bin/${CHOST}-wrapper
                for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
        fi
 
@@ -172,13 +172,13 @@ setup_pkgmgr(){
 }
 
 cleanup_distcc() {
+       LIBDIR=$(get_libdir)
        rm -rf /etc/distcc/hosts
        for i in cc gcc c++ g++; do
-               # TODO: change to use get_libdir
-               rm -f /usr/lib/distcc/bin/${i}
-               ln -s /usr/bin/distcc /usr/lib/distcc/bin/${i}
+               rm -f /usr/${LIBDIR}/distcc/bin/${i}
+               ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
        done
-       rm -f /usr/lib/distcc/bin/*-wrapper
+       rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
 }
 
 cleanup_icecream() {