aboutsummaryrefslogtreecommitdiffstats
path: root/main/checkbashisms
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2017-09-08 19:51:47 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-09-19 14:45:04 +0000
commit041e0f9c4faff947c22398af85ec534b4c4369e8 (patch)
treeb5f1054afb7be255701a2d4a370978fd0ce499c9 /main/checkbashisms
parentef0c973ce651944cb71939a35f8ee9856213bcdd (diff)
downloadaports-041e0f9c4faff947c22398af85ec534b4c4369e8.tar.bz2
aports-041e0f9c4faff947c22398af85ec534b4c4369e8.tar.xz
main/checkbashisms: fix for perl 5.26
add a trivial check
Diffstat (limited to 'main/checkbashisms')
-rw-r--r--main/checkbashisms/APKBUILD24
-rw-r--r--main/checkbashisms/checkbashisms-perl-5.26.patch20
2 files changed, 42 insertions, 2 deletions
diff --git a/main/checkbashisms/APKBUILD b/main/checkbashisms/APKBUILD
index 3366e64da6..499560e40a 100644
--- a/main/checkbashisms/APKBUILD
+++ b/main/checkbashisms/APKBUILD
@@ -8,13 +8,33 @@ arch="noarch"
license="GPL2"
options="!check" # No test suite.
depends="perl"
-source="http://downloads.sourceforge.net/project/checkbaskisms/$pkgver/checkbashisms"
+source="http://downloads.sourceforge.net/project/checkbaskisms/$pkgver/checkbashisms
+ checkbashisms-perl-5.26.patch"
builddir="$srcdir"
+check() {
+ cd "$builddir"
+ printf '#!/bin/sh\necho "hello world"\n' > ./testfile
+ perl ./checkbashisms --version
+ perl ./checkbashisms ./testfile
+}
+
+prepare() {
+ cd "$builddir"
+
+ # can not patch a symlink
+ src=$(realpath checkbashisms)
+ rm "$pkgname"
+ cp "$src" "$pkgname"
+
+ default_prepare
+}
+
package() {
cd "$builddir"
install -D -m755 "$srcdir"/$pkgname "$pkgdir"/usr/bin/$pkgname
}
-sha512sums="cd9376f4c34773aba79f81b8bb129d912844102e91e363480b9983092efd36c4827e0447242aecfcdb3cfd4cc50e19e105cc645368e8c9735f49c8e381964dd4 checkbashisms"
+sha512sums="cd9376f4c34773aba79f81b8bb129d912844102e91e363480b9983092efd36c4827e0447242aecfcdb3cfd4cc50e19e105cc645368e8c9735f49c8e381964dd4 checkbashisms
+78ef7c52748e3aee4202b316ee22a67b17024fecbdd0e9008a6e68348bf0454a362ed728da550799ffbed4ad916735cef965e9dd83a7d69af257710fbd69d69a checkbashisms-perl-5.26.patch"
diff --git a/main/checkbashisms/checkbashisms-perl-5.26.patch b/main/checkbashisms/checkbashisms-perl-5.26.patch
new file mode 100644
index 0000000000..baea1b1707
--- /dev/null
+++ b/main/checkbashisms/checkbashisms-perl-5.26.patch
@@ -0,0 +1,20 @@
+--- a/checkbashisms 2017-08-28 08:42:38.000000000 +0200
++++ b/checkbashisms 2017-09-08 19:47:57.154908415 +0200
+@@ -440,7 +440,7 @@
+ # Finally the whole subexpression may be omitted for scripts
+ # which do not pass on their parameters (i.e. after re-execing
+ # they take their parameters (and potentially data) from stdin
+- .?(\${1:?\+.?)?(\$(\@|\*))?~x) {
++ .?(\$[{]1:?\+.?)?(\$(\@|\*))?~x) {
+ $ret = $. - 1;
+ last;
+ } elsif (/^\s*(\w+)=\$0;/) {
+@@ -453,7 +453,7 @@
+ # As above
+ .?\$$var.?\s*
+ (--\s*)?
+- .?(\${1:?\+.?)?(\$(\@|\*))?.?\s*\&~x) {
++ .?(\$[{]1:?\+.?)?(\$(\@|\*))?.?\s*\&~x) {
+
+ $backgrounded = 1;
+ } elsif ($backgrounded and m~