(mostly) fix relocation of perl (#125)

This commit is contained in:
Max Howell 2022-09-09 09:37:26 -04:00 committed by GitHub
parent c0356585df
commit e9aa4edbc7
2 changed files with 22 additions and 6 deletions

View file

@ -14,22 +14,38 @@ build:
script: |
./Configure $ARGS
make --jobs {{ hw.concurrency }} install
# TODO not complete some parts are still not relocatable
cd "{{prefix}}"/bin
for x in *; do
case $x in
perl|perl{{version}})
;;
*)
sed -i.bak 's|^#!{{prefix}}/bin/|#!/usr/bin/env |' $x
sed -i.bak 's|exec {{prefix}}/bin/|exec |' $x
esac
done
rm -f {{prefix}}/bin/*.bak
# relocatable fixes from: https://github.com/skaji/relocatable-perl
env:
ARGS:
- -d # use defaults
- -e # non interactive
- -Dprefix={{prefix}}
- -Duseshrplib
- -Duselargefiles
- -Dusethreads
# we dont want versioned, platformed prefixes
#NOTE maybe this will break something though…
- -Dprivlib={{prefix}}/lib
- -Darchlib={{prefix}}/lib
- -Duseshrplib=false
# makes perl “more” relocatable
- -Duserelocatableinc
test:
script: |
perl $FIXTURE
shasum --version
fixture: |
print 'Perl is not an acronym, but JAPH is a Perl acronym!'

View file

@ -7,7 +7,7 @@ args:
- --allow-net
- --allow-run
- --allow-read
- --allow-write=/opt
- --allow-write={{tea.prefix}}
- --allow-env
- --import-map={{ srcroot }}/import-map.json
---*/