--- /usr/portage/sys-devel/distcc/distcc-3.1.ebuild 2008-12-03 04:19:07.000000000 -0500 +++ distcc-3.1.ebuild 2008-12-18 12:32:10.465848896 -0500 @@ -11,7 +11,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="avahi gnome gtk hardened ipv6 selinux xinetd" +IUSE="avahi gnome gtk hardened ipv6 selinux xinetd cross-compile" RESTRICT="test" @@ -95,8 +95,20 @@ # create the masquerade directory dodir "${DCCC_PATH}" + if use cross-compile; then + exeinto "${DCCC_PATH}" + cat > "${T}/${CTARGET:-${CHOST}}-wrapper" <<-EOF + #!/bin/bash + exec ${DCCC_PATH}/${CTARGET:-${CHOST}}-g\${0:\$[-2]} "\$@" + EOF + doexe "${T}/${CTARGET:-${CHOST}}-wrapper" + fi for f in cc c++ gcc g++; do - dosym /usr/bin/distcc "${DCCC_PATH}/${f}" + if use cross-compile; then + dosym "${DCCC_PATH}/${CTARGET:-${CHOST}}-wrapper" "${DCCC_PATH}/${f}" + else + dosym /usr/bin/distcc "${DCCC_PATH}/${f}" + fi if [ "${f}" != "cc" ]; then dosym /usr/bin/distcc "${DCCC_PATH}/${CTARGET:-${CHOST}}-${f}" fi