From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch (limited to 'app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch') diff --git a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch new file mode 100644 index 000000000000..b31cc061db6f --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch @@ -0,0 +1,21 @@ +bzgrep uses !/bin/sh but then uses the bashism ${var//} so replace those +with calls to sed so POSIX shells work + +http://bugs.gentoo.org/193365 + +--- bzgrep ++++ bzgrep +@@ -63,10 +63,9 @@ + bzip2 -cdfq "$i" | $grep $opt "$pat" + r=$? + else +- j=${i//\\/\\\\} +- j=${j//|/\\|} +- j=${j//&/\\&} +- j=`printf "%s" "$j" | tr '\n' ' '` ++ # the backslashes here are doubled up as we have to escape each one for the ++ # shell and then escape each one for the sed expression ++ j=`printf "%s" "${i}" | sed -e 's:\\\\:\\\\\\\\:g' -e 's:[|]:\\\\|:g' -e 's:[&]:\\\\&:g' | tr '\n' ' '` + bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|" + r=$? + fi -- cgit v1.2.3