2008-01-23 13:25:08 +01:00
|
|
|
buildInputs="$unzip"
|
2005-10-07 16:49:37 +02:00
|
|
|
source $stdenv/setup
|
2004-01-25 00:46:00 +01:00
|
|
|
|
2010-12-05 12:42:24 +01:00
|
|
|
unzip $src || true
|
2004-01-25 00:46:00 +01:00
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out
|
2005-10-07 16:49:37 +02:00
|
|
|
mv $dirname/* $out/
|
2004-01-25 00:46:00 +01:00
|
|
|
|
2005-10-07 16:49:37 +02:00
|
|
|
# Remove crap in the root directory.
|
2004-08-20 13:08:08 +02:00
|
|
|
for file in $out/*
|
|
|
|
do
|
|
|
|
if test -f $file ; then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
2005-10-07 16:49:37 +02:00
|
|
|
|
2005-10-08 00:27:42 +02: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 14:43:32 +02:00
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
2005-10-08 00:27:42 +02:00
|
|
|
--set-rpath "$rpath" {} \;
|
|
|
|
|
2005-10-07 16:49:37 +02: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 01:51:24 +01:00
|
|
|
|
|
|
|
# Put the *_md.h files in the right place.
|
|
|
|
cd $out/include && ln -s */*_md.h .
|