2008-01-23 12:25:08 +00:00
|
|
|
buildInputs="$unzip"
|
2005-10-07 15:49:37 +01:00
|
|
|
source $stdenv/setup
|
2004-01-24 23:46:00 +00:00
|
|
|
|
2010-12-05 11:42:24 +00:00
|
|
|
unzip $src || true
|
2004-01-24 23:46:00 +00:00
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2005-10-07 15:49:37 +01:00
|
|
|
mv $dirname/* $out/
|
2004-01-24 23:46:00 +00:00
|
|
|
|
2005-10-07 15:49:37 +01:00
|
|
|
# Remove crap in the root directory.
|
2004-08-20 12:08:08 +01:00
|
|
|
for file in $out/*
|
|
|
|
do
|
|
|
|
if test -f $file ; then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
2005-10-07 15:49:37 +01:00
|
|
|
|
2005-10-07 23:27:42 +01:00
|
|
|
# Set the dynamic linker.
|
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
|
|
|
find $out -type f -perm +100 \
|
2006-10-27 13:43:32 +01:00
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
2005-10-07 23:27:42 +01:00
|
|
|
--set-rpath "$rpath" {} \;
|
|
|
|
|
2005-10-07 15:49:37 +01:00
|
|
|
# Unpack .pack files.
|
|
|
|
for i in $(find $out -name "*.pack"); do
|
|
|
|
echo "unpacking $i..."
|
|
|
|
$out/bin/unpack200 "$i" "$(dirname $i)/$(basename $i .pack).jar"
|
|
|
|
rm "$i"
|
|
|
|
done
|
2005-12-26 00:51:24 +00:00
|
|
|
|
|
|
|
# Put the *_md.h files in the right place.
|
|
|
|
cd $out/include && ln -s */*_md.h .
|