3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/wtk/builder.sh
John Wiegley 28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00

28 lines
508 B
Bash

source $stdenv/setup
mkdir unzipped
pushd unzipped
unzip $src || true
popd
mkdir -p $out
mv unzipped/* $out/
# Remove crap in the root directory.
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
find $out -type f -perm +100 \
-exec patchelf --set-rpath "$rpath" {} \;