Skip to content

Commit 9dad7ac

Browse files
authored
Merge pull request #270 from rhubert/perl+c23
Perl+c23
2 parents 051e1d2 + 9dacd40 commit 9dad7ac

33 files changed

Lines changed: 423 additions & 110 deletions

classes/basement/rootrecipe.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ depends:
3232
- name: devel::make
3333
use: [tools]
3434
forward: True
35+
- name: perl::perl
36+
use: [tools]
37+
forward: True
3538
- name: devel::m4
3639
use: [tools]
3740
forward: True

classes/install.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inherit: [strip, "basement::bits::libs"]
1010
# be adapted to promote *.private dependencies to regular dependencies (We do
1111
# not pass --static to pkg-config. Executables are still linked dynamically
1212
# because glibc cannot be linked statically).
13-
packageVars: [READELF]
13+
packageVars: [READELF, INSTALL_APPLY_SHEBANG_FIXUP]
1414
packageSetup: |
1515
case "$(basementBitsLibraryType)" in
1616
shared|both)
@@ -163,6 +163,25 @@ packageSetup: |
163163
fi
164164
}
165165
166+
# replace absolute interpreter paths with /usr/bin/env <interpreter>
167+
installFixShebang()
168+
{
169+
local f old new
170+
while IFS= read -r -d $'\0' f; do
171+
if cmp -s -n2 "$f" <<<'#!' ; then
172+
read -r old_cmd old_arg < "$f"
173+
if [[ "$old_cmd" == "#!/usr/bin/env" ]]; then
174+
continue
175+
else
176+
old_cmd="${old_cmd:2}"
177+
old_cmd="${old_cmd##*/}"
178+
fi
179+
new="#!/usr/bin/env ${old_arg:+-S }${old_cmd}${old_arg:+ ${old_arg@Q}}"
180+
sed -i -e "1c $new" "$f"
181+
fi
182+
done < <(find "${1:-.}" -type f -perm -/111 -print0)
183+
}
184+
166185
# Everything except shared or static libraries or header files.
167186
installPackageBin()
168187
{
@@ -173,6 +192,9 @@ packageSetup: |
173192
"!/usr/share/pkgconfig" \
174193
"!/usr/lib/cmake"
175194
installStripAll .
195+
if [[ ${INSTALL_APPLY_SHEBANG_FIXUP:-yes} != no ]] ; then
196+
installFixShebang
197+
fi
176198
}
177199
178200
installPackageTgt()

classes/perl5.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
buildTools: [perl]
2+
buildSetup: &ref |
3+
PERL5LIB=
4+
for i in "${!BOB_ALL_PATHS[@]}" ; do
5+
if [[ -d ${BOB_ALL_PATHS[$i]}/usr/lib/perl5/site_perl ]]; then
6+
PERL5LIB+="${PERL5LIB:+:}${BOB_ALL_PATHS[$i]}/usr/lib/perl5/site_perl"
7+
fi
8+
done
9+
export PERL5LIB
10+
11+
packageSetup: *ref

classes/perl5/build.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
inherit: [perl5, 'basement::bits::libs']
2+
3+
depends:
4+
- name: perl::perl-dev
5+
use: [result, deps, environment]
6+
7+
buildVars: [AUTOCONF_BUILD, AUTOCONF_HOST, PERL_ARCH, PERL_VERSION]
8+
buildSetup: |
9+
export PERL_INC=${BOB_DEP_PATHS['perl::perl-dev']}/usr/lib/perl5/${PERL_VERSION}/${PERL_ARCH}/CORE
10+
export PERL_SRC=${BOB_DEP_PATHS['perl::perl-dev']}/usr/lib/perl5/${PERL_VERSION}
11+
export PERL_ARCHLIB=${BOB_DEP_PATHS['perl::perl-dev']}/usr/lib/perl5/${PERL_VERSION}/${PERL_ARCH}
12+
if basementBitsCrossCompiling; then
13+
export PERLCONFIGTARGET=yes
14+
fi

recipes/devel/autoconf-2.69.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ checkoutScript: |
1616
# Prevent that...
1717
touch man/*.1
1818
19-
buildTools: [m4]
19+
buildTools: [m4, perl]
2020
buildScript: |
2121
export EMACS="no"
2222
export HELP2MAN=false

recipes/devel/autoconf.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ checkoutScript: |
1616
# Prevent that...
1717
touch man/*.1
1818
19-
buildTools: [m4]
19+
buildTools: [m4, perl]
2020
buildScript: |
2121
export EMACS="no"
2222
export HELP2MAN=false
@@ -33,4 +33,6 @@ packageScript: |
3333
usr/share/autoconf/m4sugar/m4sh.m4
3434
3535
provideTools:
36-
autoconf: "usr/bin"
36+
autoconf:
37+
path: "usr/bin"
38+
dependTools: ["perl"]

recipes/devel/automake.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ checkoutDeterministic: True
1616
checkoutScript: |
1717
patchApplySeries $<@automake/*.patch@>
1818
19-
buildTools: [m4, help2man]
19+
buildTools: [m4, help2man, perl]
2020
buildScript: |
2121
export PATH="${BOB_DEP_PATHS[devel::autoconf]}/usr/bin:$PATH"
2222
autotoolsNoarchBuild $1
@@ -25,4 +25,6 @@ packageScript: |
2525
autotoolsNoarchPackageTgt
2626
2727
provideTools:
28-
automake: "usr/bin"
28+
automake:
29+
path: "usr/bin"
30+
dependTools: ["perl"]

recipes/devel/autotools-2.69.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ buildScript: |
1818
packageScript: |
1919
cp -a $1/* .
2020
provideTools:
21-
autotools: usr/bin
21+
autotools:
22+
path: "usr/bin"
23+
dependTools: ["perl"]

recipes/devel/autotools.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ buildScript: |
1818
packageScript: |
1919
cp -a $1/* .
2020
provideTools:
21-
autotools: usr/bin
21+
autotools:
22+
path: "usr/bin"
23+
dependTools: ["perl"]

recipes/devel/binutils.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
inherit: [autotools, patch]
22

33
metaEnvironment:
4-
PKG_VERSION: "2.42"
4+
PKG_VERSION: "2.45"
55

66
checkoutSCM:
77
scm: url
88
url: ${GNU_MIRROR}/binutils/binutils-${PKG_VERSION}.tar.xz
9-
digestSHA1: "44da41792c60419863d7e13fa1deaf6b24dd69b8"
9+
digestSHA1: "09fd8a50a95be4a94412fe3847d16280996679c5"
1010
stripComponents: 1
1111

1212
checkoutDeterministic: True

0 commit comments

Comments
 (0)