mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
openjdk7: Fix refernces to the bootstrap
This commit is contained in:
parent
ae6d056188
commit
240338638e
@ -203,6 +203,32 @@ let
|
|||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# Build the set of output library directories to rpath against
|
||||||
|
LIBDIRS=""
|
||||||
|
for output in $outputs; do
|
||||||
|
LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \; | sort | uniq | tr '\n' ':'):$LIBDIRS"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add the local library paths to remove dependencies on the bootstrap
|
||||||
|
for output in $outputs; do
|
||||||
|
OUTPUTDIR="$(eval echo \$$output)"
|
||||||
|
BINLIBS="$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)"
|
||||||
|
echo "$BINLIBS" | while read i; do
|
||||||
|
patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
|
||||||
|
patchelf --shrink-rpath "$i" || true
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Test to make sure that we don't depend on the bootstrap
|
||||||
|
for output in $outputs; do
|
||||||
|
if grep -q -r '${bootjdk}' $(eval echo \$$output); then
|
||||||
|
echo "Extraneous references to ${bootjdk} detected"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://openjdk.java.net/;
|
homepage = http://openjdk.java.net/;
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
Loading…
Reference in New Issue
Block a user