termux-packages/packages/gzip/fix-gzexe.patch

43 lines
1.1 KiB
Diff
Raw Normal View History

2018-03-05 17:41:51 +01:00
diff -uNr gzip-1.9/gzexe.in gzip-1.9.mod/gzexe.in
--- gzip-1.9/gzexe.in 2018-01-07 07:05:21.000000000 +0200
2018-03-05 20:39:56 +01:00
+++ gzip-1.9.mod/gzexe.in 2018-03-05 21:35:50.589287700 +0200
2018-03-05 20:29:08 +01:00
@@ -113,7 +113,7 @@
2018-03-05 17:41:51 +01:00
esac
2018-03-05 20:29:08 +01:00
dir=`dirname "$file"` || dir=$TMPDIR
2018-03-05 17:41:51 +01:00
- test -d "$dir" && test -w "$dir" && test -x "$dir" || dir=/tmp
2018-03-05 20:29:08 +01:00
+ test -d "$dir" && test -w "$dir" && test -x "$dir" || dir=@TERMUX_PREFIX@/tmp
test -n "$tmp" && rm -f "$tmp"
if test -z "$mktemp_status"; then
2018-03-05 17:41:51 +01:00
type mktemp >/dev/null 2>&1
2018-03-05 20:29:08 +01:00
@@ -144,8 +144,9 @@
2018-03-05 17:41:51 +01:00
fi
2018-03-05 20:29:08 +01:00
if test $decomp -eq 0; then
2018-03-05 17:41:51 +01:00
(cat <<'EOF' &&
-#!/bin/sh
-skip=44
+#!@TERMUX_PREFIX@/bin/sh
2018-03-05 20:29:08 +01:00
+skip=50
2018-03-05 17:41:51 +01:00
+set -e
tab=' '
nl='
2018-03-05 20:29:08 +01:00
@@ -164,7 +165,7 @@
2018-03-05 17:41:51 +01:00
case $TMPDIR in
/ | /*/) ;;
/*) TMPDIR=$TMPDIR/;;
- *) TMPDIR=/tmp/;;
+ *) TMPDIR=@TERMUX_PREFIX@/tmp/;;
esac
if type mktemp >/dev/null 2>&1; then
2018-03-05 20:29:08 +01:00
gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`
2018-03-05 20:39:56 +01:00
@@ -201,7 +202,7 @@
else
# decompression
- skip=44
+ skip=50
skip_line=`sed -e 1d -e 2q "$file"`
case $skip_line in
skip=[0-9] | skip=[0-9][0-9] | skip=[0-9][0-9][0-9])