3
0
Fork 0
forked from mirrors/nixpkgs

gcc-cross-wrapper-libs: Gracefully deal with non-existent /TRIPLET/lib dir.

This fixes the cross-MinGW environment.

svn path=/nixpkgs/trunk/; revision=33010
This commit is contained in:
Ludovic Courtès 2012-03-12 09:45:14 +00:00
parent 9d125d64bf
commit adcc6d4102

View file

@ -20,13 +20,20 @@ let
phases = [ "installPhase" ];
installPhase = ''
echo $out
mkdir -p $out
cp -Rd ${gcc}/${cross.config}/lib $out/lib
chmod -R +w $out/lib
for a in $out/lib/*.la; do
sed -i -e s,${gcc}/${cross.config}/lib,$out/lib,g $a
done
rm -f $out/lib/*.py
mkdir -p "$out"
if [ -d "${gcc}/${cross.config}/lib" ]
then
cp -Rd "${gcc}/${cross.config}/lib" "$out/lib"
chmod -R +w "$out/lib"
for a in "$out/lib/"*.la; do
sed -i -e "s,${gcc}/${cross.config}/lib,$out/lib,g" $a
done
rm -f "$out/lib/"*.py
else
# The MinGW cross-compiler falls into this category.
mkdir "$out/lib"
fi
'';
};
in