mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 14:41:27 +00:00
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:
parent
9d125d64bf
commit
adcc6d4102
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user