Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-01 20:58:14 +0200
committerErich Eckner <git@eckner.net>2019-07-01 20:58:14 +0200
commit8d36443a8876dff1c31d86717a1197f5231b0bfc (patch)
tree2da64e52aeb7a8412bdf1bf80809ae045466fed9 /bin/build-packages
parentc0551a94fd73e5184e673404e01d255be21cf2f0 (diff)
bin/build-packages: extract perl version from `objdump -x`s RPATH, too
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages39
1 files changed, 26 insertions, 13 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 185bada..4034782 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -725,6 +725,11 @@ while [ "${count}" -ne 0 ] && \
-exec objdump -x '{}' \; 2>/dev/null | \
sed '
/^architecture:.* i386:x86-64, /,/^architecture:.* i386:x86-32, / d
+ \@^\s*RPATH\s\+/usr/lib/perl\([0-9]\+\)/\1\.[0-9.]\+/@ {
+ s@^\s*RPATH\s\+/usr/lib/perl\([0-9]\+\)/\(\1\(\.[0-9.]\+\)\?\)\.\([0-9]\+\)/.*$@\2 \4@
+ w '"${pkgfile}"'.needed-perl-version
+ d
+ }
/\sNEEDED\s/ {
s/^\s*\S\+\s\+\(\S\+\)\(\s.*\)\?$/\1/
/\.c32$/d
@@ -789,19 +794,27 @@ while [ "${count}" -ne 0 ] && \
find "${package_content_dir:?}/${pkgfile##*/}" -xdev -not -type l -exec chmod 777 '{}' \;
rm -rf --one-file-system "${package_content_dir:?}/${pkgfile##*/}"
fi
- tar -tJf "${pkgfile}" 2>/dev/null | \
- sed -n '
- s,^usr/lib/python\(2\?\)\([013-9.][0-9.]*\)/$,python\1 \1\2,
- t print
- s,^usr/lib/perl[^/]\+/\([0-9.]\+\)/$,perl \1,
- t print
- s,^usr/lib/ruby/\([0-9.]\+\)/$,ruby \1,
- t print
- b
- :print
- s/\.\([^.]\+\)$/ \1/
- p
- ' | \
+ {
+ tar -tJf "${pkgfile}" 2>/dev/null | \
+ sed -n '
+ s,^usr/lib/python\(2\?\)\([013-9.][0-9.]*\)/$,python\1 \1\2,
+ t print
+ s,^usr/lib/perl[^/]\+/\([0-9.]\+\)/$,perl \1,
+ t print
+ s,^usr/lib/ruby/\([0-9.]\+\)/$,ruby \1,
+ t print
+ b
+ :print
+ s/\.\([^.]\+\)$/ \1/
+ p
+ '
+ if [ -f "${pkgfile}.needed-perl-versions" ]; then
+ sed '
+ s/^/perl /
+ ' "${pkgfile}.needed-perl-versions"
+ rm "${pkgfile}.needed-perl-versions"
+ fi
+ } | \
while read -r name major_version minor_version; do
printf '%s>=%s.%s\n%s<%s.%s\n' \
"${name}" \