2007-02-20 17:04:37 +00:00
|
|
|
source $stdenv/setup
|
2004-01-24 22:04:09 +00:00
|
|
|
|
2007-03-05 19:54:37 +00:00
|
|
|
echo "Unpacking distribution"
|
|
|
|
unzip ${src} || true
|
|
|
|
|
2007-03-05 21:33:47 +00:00
|
|
|
# set the dynamic linker of unpack200, necessary for construct script
|
|
|
|
echo "patching unpack200"
|
|
|
|
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200 || fail
|
|
|
|
|
|
|
|
echo "constructing JDK and JRE installations"
|
2007-03-05 17:13:53 +00:00
|
|
|
if test -z "$installjdk"; then
|
|
|
|
sh ${construct} . tmp-linux-jdk tmp-linux-jre
|
|
|
|
ensureDir $out
|
|
|
|
cp -R tmp-linux-jre/* $out
|
|
|
|
else
|
|
|
|
sh ${construct} . $out tmp-linux-jre
|
|
|
|
fi
|
2004-07-14 08:59:37 +01:00
|
|
|
|
2007-03-05 21:33:47 +00:00
|
|
|
echo "removing files at top level of installation"
|
2004-07-14 08:59:37 +01:00
|
|
|
for file in $out/*
|
|
|
|
do
|
|
|
|
if test -f $file ; then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm -rf $out/docs
|
2007-02-20 17:04:37 +00:00
|
|
|
|
2007-03-05 21:33:47 +00:00
|
|
|
# construct the rpath
|
2007-02-20 17:04:37 +00:00
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
2007-03-05 17:13:53 +00:00
|
|
|
|
|
|
|
if test -z "$installjdk"; then
|
2007-03-18 00:33:32 +00:00
|
|
|
rpath=$rpath${rpath:+:}$out/lib/$architecture/jli
|
2007-03-05 17:13:53 +00:00
|
|
|
else
|
2007-03-18 00:33:32 +00:00
|
|
|
rpath=$rpath${rpath:+:}$out/jre/lib/$architecture/jli
|
2007-03-05 17:13:53 +00:00
|
|
|
fi
|
|
|
|
|
2007-03-05 21:33:47 +00:00
|
|
|
# set all the dynamic linkers
|
2007-02-20 17:04:37 +00:00
|
|
|
find $out -type f -perm +100 \
|
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "$rpath" {} \;
|
2007-03-27 23:02:55 +01:00
|
|
|
|
|
|
|
function mozillaExtraLibPath() {
|
|
|
|
p=$1
|
|
|
|
if test -e "$p"; then
|
|
|
|
echo "$libstdcpp5/lib" > $p/extra-library-path
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-03-28 16:21:43 +01:00
|
|
|
if test -z "$pluginSupport"; then
|
|
|
|
rm $out/bin/javaws
|
|
|
|
else
|
2007-03-28 19:29:26 +01:00
|
|
|
source $makeWrapper
|
|
|
|
|
2007-03-28 16:21:43 +01:00
|
|
|
mv $out/bin/javaws $out/bin/javaws.bin
|
|
|
|
makeWrapper "$out/bin/javaws.bin" "$out/bin/javaws" \
|
|
|
|
--suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
|
|
|
|
|
|
|
|
mozillaExtraLibPath "$out/jre/plugin/i386/ns7"
|
|
|
|
mozillaExtraLibPath "$out/plugin/i386/ns7"
|
2008-02-26 14:56:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Workaround for assertions in xlib, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373.
|
|
|
|
substituteInPlace $out/jre/lib/i386/xawt/libmawt.so --replace XINERAMA FAKEEXTN
|