From c212318239d51f2029e5b9412c8251f97a53a012 Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Mon, 5 Mar 2007 21:33:47 +0000 Subject: [PATCH] patch unpack200 before running the construct script svn path=/nixpkgs/trunk/; revision=8198 --- pkgs/development/compilers/jdk/dlj-bundle-builder.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh index c9f52e1140c..0b43c0f4419 100644 --- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh +++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh @@ -3,7 +3,11 @@ source $stdenv/setup echo "Unpacking distribution" unzip ${src} || true -echo "Constructing JDK and JRE" +# 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" if test -z "$installjdk"; then sh ${construct} . tmp-linux-jdk tmp-linux-jre ensureDir $out @@ -12,7 +16,7 @@ else sh ${construct} . $out tmp-linux-jre fi -echo "Removing files at top level" +echo "removing files at top level of installation" for file in $out/* do if test -f $file ; then @@ -21,7 +25,7 @@ do done rm -rf $out/docs -# Set the dynamic linker. +# construct the rpath rpath= for i in $libraries; do rpath=$rpath${rpath:+:}$i/lib @@ -33,6 +37,7 @@ else rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli fi +# set all the dynamic linkers find $out -type f -perm +100 \ -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ --set-rpath "$rpath" {} \;