diff options
author | Elias Pipping <pipping@gentoo.org> | 2007-09-24 10:31:01 +0000 |
---|---|---|
committer | Elias Pipping <pipping@gentoo.org> | 2007-09-24 10:31:01 +0000 |
commit | 9542742ddcce118962aa5b3002b3390434c1c458 (patch) | |
tree | 9e97883fed01b79e81589fbe3b7c58dc091afe5d /app-arch/bzip2/files | |
parent | marked ~x86-solaris (diff) | |
download | prefix-9542742ddcce118962aa5b3002b3390434c1c458.tar.gz prefix-9542742ddcce118962aa5b3002b3390434c1c458.tar.bz2 prefix-9542742ddcce118962aa5b3002b3390434c1c458.zip |
app-arch/bzip2: add missing patch
(Portage version: 2.2.00.7791-prefix/SVN/Darwin 8.10.1 i386)
Diffstat (limited to 'app-arch/bzip2/files')
-rw-r--r-- | app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch | 21 |
1 files changed, 21 insertions, 0 deletions
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 0000000000..b31cc061db --- /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 |