diff -urN ../portage-2.1.4-orig/bin/ebuild.sh bin/ebuild.sh --- ../portage-2.1.4-orig/bin/ebuild.sh 2008-01-12 10:47:58 +0900 +++ bin/ebuild.sh 2008-01-13 20:40:19 +0900 @@ -963,6 +963,17 @@ #our libtool to create problematic .la files export PWORKDIR="$WORKDIR" ebuild_phase src_install + if test -d "${D}/usr/share/locale" && ! hasq nls ${USE}; then + vecho ">>> Deleting locale files (USE=-nls)..." + for msgdir in "${D}/usr/share/locale"/*/LC_MESSAGES; do + # Make sure it exists first--we don't want to accidentally + # rm -rf ${D}/usr/share/locale + if test -d "${msgdir}"; then + dir=`dirname "${msgdir}"` + rm -rf "${dir}" + fi + done + fi touch "${PORTAGE_BUILDDIR}/.installed" vecho ">>> Completed installing ${PF} into ${D}" vecho