mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
f563ecadd1
commit
68c2868609
1 changed files with 21 additions and 17 deletions
|
@ -23,29 +23,33 @@ dependencies:
|
|||
perl.org: '*'
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
git-scm.org: 2
|
||||
script: |-
|
||||
./configure \
|
||||
--build={{ hw.target }} \
|
||||
--prefix="{{ prefix }}"
|
||||
make --jobs {{ hw.concurrency }} install
|
||||
# - ./configure
|
||||
# --build={{ hw.target }}
|
||||
# --prefix="{{ prefix }}"
|
||||
- make --jobs {{ hw.concurrency }} install
|
||||
|
||||
cd "{{prefix}}"
|
||||
- cd "{{prefix}}"
|
||||
|
||||
fix-shebangs.ts bin/*
|
||||
- fix-shebangs.ts bin/*
|
||||
|
||||
perl -pi -e 's|\x27{{prefix}}|"\$PREFIX"\x27|g' bin/autoconf
|
||||
- perl -pi -e 's|'\''{{prefix}}|"\$PREFIX"'\''|g' bin/autoconf
|
||||
|
||||
# fix specific m4 and perl paths
|
||||
perl -pi -e 's|{{ deps.perl.org.prefix }}/bin/perl|perl|g' bin/*
|
||||
perl -pi -e 's|{{ deps.gnu.org/m4.prefix }}/bin/m4|m4|g' bin/*
|
||||
# fix specific m4 and perl paths
|
||||
- perl -pi -e 's|{{ deps.perl.org.prefix }}/bin/perl|perl|g' bin/*
|
||||
- perl -pi -e 's|{{ deps.gnu.org/m4.prefix }}/bin/m4|m4|g' bin/*
|
||||
|
||||
# fix hardcoded paths
|
||||
perl -pi -e "s|'{{prefix}}/|\\\$prefix.'/|" bin/*
|
||||
git apply $SRCROOT/props/relocatable.diff
|
||||
# fix hardcoded paths
|
||||
# this was a patch, but patches are fragile. this is more robust. for now.
|
||||
- PREFIX="$(echo '{{prefix}}' | sed 's/\+/\\+/g')"
|
||||
- perl -pi -e "s|'$PREFIX/|\\\$prefix.'/|g" bin/*
|
||||
- run: patch -p1 < $SRCROOT/props/relocatable.diff
|
||||
if: <2.72.0
|
||||
- run: |
|
||||
perl -p0i -e 's/\nBEGIN\n\{/use Cwd qw(abs_path);\nuse File::Basename;\n\nmy \$prefix;\nBEGIN\n{\n \$prefix = dirname(dirname(abs_path(__FILE__)));\n \$ENV{'\''PREFIX'\''} = \$prefix;\n/s' bin/*
|
||||
perl -p0i -e 's|\n \# Normalize the|\n \# added by pkgx\n \@prepend_include = map { \$_ =~ s/\\\$PREFIX/\$prefix/r } \@prepend_include;\n\n \# Normalize the|g' bin/autom4te
|
||||
if: '>=2.72.0'
|
||||
|
||||
perl -pi -e 's|{{prefix}}|\$PREFIX|' share/autoconf/autom4te.cfg
|
||||
- perl -pi -e "s|$PREFIX|\\\$PREFIX|" share/autoconf/autom4te.cfg
|
||||
|
||||
test:
|
||||
script: |
|
||||
|
|
Loading…
Reference in a new issue