summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-12-13 04:33:21 +0000
committerMike Frysinger <vapier@gentoo.org>2004-12-13 04:33:21 +0000
commit5e6034f438bd043b7e02d83ab0e1f523f30bdbec (patch)
treea52860186193faa97aa94b074d21f641ca8cf229 /app-arch/gzip
parentold (Manifest recommit) (diff)
downloadgentoo-2-5e6034f438bd043b7e02d83ab0e1f523f30bdbec.tar.gz
gentoo-2-5e6034f438bd043b7e02d83ab0e1f523f30bdbec.tar.bz2
gentoo-2-5e6034f438bd043b7e02d83ab0e1f523f30bdbec.zip
Fix the zdiff patch so it works #70277 by Michael Moen. Update the znew patch with the mandrake version #70825.
Diffstat (limited to 'app-arch/gzip')
-rw-r--r--app-arch/gzip/ChangeLog10
-rw-r--r--app-arch/gzip/files/digest-gzip-1.3.5-r42
-rw-r--r--app-arch/gzip/files/gzip-1.3.5-zdiff-tempfile-2.patch19
-rw-r--r--app-arch/gzip/files/gzip-1.3.5-znew-tempfile-2.patch73
-rw-r--r--app-arch/gzip/gzip-1.3.5-r4.ebuild83
5 files changed, 186 insertions, 1 deletions
diff --git a/app-arch/gzip/ChangeLog b/app-arch/gzip/ChangeLog
index 76f2efb581a6..c3f46d06fdd6 100644
--- a/app-arch/gzip/ChangeLog
+++ b/app-arch/gzip/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-arch/gzip
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/ChangeLog,v 1.35 2004/11/24 14:44:54 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/ChangeLog,v 1.36 2004/12/13 04:33:21 vapier Exp $
+
+*gzip-1.3.5-r4 (12 Dec 2004)
+
+ 12 Dec 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/gzip-1.3.5-zdiff-tempfile-2.patch,
+ +files/gzip-1.3.5-znew-tempfile-2.patch, +gzip-1.3.5-r4.ebuild:
+ Fix the zdiff patch so it works #70277 by Michael Moen. Update the znew
+ patch with the mandrake version #70825.
24 Nov 2004; Guy Martin <gmsoft@gentoo.org> gzip-1.3.5-r3.ebuild:
Stable on hppa.
diff --git a/app-arch/gzip/files/digest-gzip-1.3.5-r4 b/app-arch/gzip/files/digest-gzip-1.3.5-r4
new file mode 100644
index 000000000000..d9e68f978e4f
--- /dev/null
+++ b/app-arch/gzip/files/digest-gzip-1.3.5-r4
@@ -0,0 +1,2 @@
+MD5 3d6c191dfd2bf307014b421c12dc8469 gzip_1.3.5.orig.tar.gz 331550
+MD5 63d6cf343da210a3740aef2ed583f85d gzip-1.3.5-deb.patch.bz2 9136
diff --git a/app-arch/gzip/files/gzip-1.3.5-zdiff-tempfile-2.patch b/app-arch/gzip/files/gzip-1.3.5-zdiff-tempfile-2.patch
new file mode 100644
index 000000000000..f791e6fea674
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.3.5-zdiff-tempfile-2.patch
@@ -0,0 +1,19 @@
+--- zdiff.in 2002-09-26 04:33:24.000000000 -0400
++++ zdiff.in.new 2004-10-26 19:06:08.000000000 -0400
+@@ -47,11 +51,12 @@
+ *[-.]gz* | *[-.][zZ] | *.t[ga]z)
+ F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*||'`
+ set -C
+- trap 'rm -f /tmp/"$F".$$; exit 2' HUP INT PIPE TERM 0
+- gzip -cdfq "$2" > /tmp/"$F".$$ || exit
+- gzip -cdfq "$1" | $comp $OPTIONS - /tmp/"$F".$$
++ tmp=`mktemp /tmp/$F.XXXXXX`
++ trap 'rm -f $tmp; exit 2' HUP INT PIPE TERM 0
++ gzip -cdfq "$2" > $tmp || exit
++ gzip -cdfq "$1" | $comp $OPTIONS - $tmp
+ STAT="$?"
+- /bin/rm -f /tmp/"$F".$$ || STAT=2
++ /bin/rm -f $tmp || STAT=2
+ trap - HUP INT PIPE TERM 0
+ exit $STAT;;
+
diff --git a/app-arch/gzip/files/gzip-1.3.5-znew-tempfile-2.patch b/app-arch/gzip/files/gzip-1.3.5-znew-tempfile-2.patch
new file mode 100644
index 000000000000..334e6a134d3e
--- /dev/null
+++ b/app-arch/gzip/files/gzip-1.3.5-znew-tempfile-2.patch
@@ -0,0 +1,73 @@
+--- znew.in.orig 2004-12-12 23:22:11.668680240 -0500
++++ znew.in 2004-12-12 23:23:48.827909792 -0500
+@@ -14,7 +14,7 @@
+ # block is the disk block size (best guess, need not be exact)
+
+ warn="(does not preserve modes and timestamp)"
+-tmp=/tmp/zfoo.$$
++tmp=`mktemp /tmp/zfoo.XXXXXX`
+ set -C
+ echo hi > $tmp.1 || exit 1
+ echo hi > $tmp.2 || exit 1
+@@ -77,6 +77,7 @@
+
+ for i do
+ n=`echo $i | sed 's/.Z$//'`
++ ntmp=`mktemp $n.XXXXXX`
+ if test ! -f "$n.Z" ; then
+ echo $n.Z not found
+ res=1; continue
+@@ -92,7 +93,7 @@
+ fi
+ else
+ if test $check -eq 1; then
+- if cp -p "$n.Z" "$n.$$" 2> /dev/null || cp "$n.Z" "$n.$$"; then
++ if cp -p "$n.Z" "$ntmp" 2> /dev/null || cp "$n.Z" "$ntmp"; then
+ :
+ else
+ echo cannot backup "$n.Z"
+@@ -102,7 +103,7 @@
+ if gzip -d "$n.Z"; then
+ :
+ else
+- test $check -eq 1 && mv "$n.$$" "$n.Z"
++ test $check -eq 1 && mv "$ntmp" "$n.Z"
+ echo error while uncompressing $n.Z
+ res=1; continue
+ fi
+@@ -110,7 +111,7 @@
+ :
+ else
+ if test $check -eq 1; then
+- mv "$n.$$" "$n.Z" && rm -f "$n"
++ mv "$ntmp" "$n.Z" && rm -f "$n"
+ echo error while recompressing $n
+ else
+ # compress $n (might be dangerous if disk full)
+@@ -125,7 +126,7 @@
+ if test $pipe -eq 1; then
+ rm -f "$n$ext"
+ elif test $check -eq 1; then
+- mv "$n.$$" "$n.Z" && rm -f "$n$ext"
++ mv "$ntmp" "$n.Z" && rm -f "$n$ext"
+ else
+ gzip -d "$n$ext" && compress "$n" && rm -f "$n$ext"
+ fi
+@@ -133,9 +134,9 @@
+
+ elif test $check -eq 1; then
+ if gzip -t "$n$ext" ; then
+- rm -f "$n.$$" "$n.Z"
++ rm -f "$ntmp" "$n.Z"
+ else
+- test $pipe -eq 0 && mv "$n.$$" "$n.Z"
++ test $pipe -eq 0 && mv "$ntmp" "$n.Z"
+ rm -f "$n$ext"
+ echo error while testing $n$ext, $n.Z unchanged
+ res=1; continue
+@@ -144,4 +145,5 @@
+ rm -f "$n.Z"
+ fi
+ done
++rm -f "$ntmp"
+ exit $res
diff --git a/app-arch/gzip/gzip-1.3.5-r4.ebuild b/app-arch/gzip/gzip-1.3.5-r4.ebuild
new file mode 100644
index 000000000000..14f64e5c2751
--- /dev/null
+++ b/app-arch/gzip/gzip-1.3.5-r4.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/gzip-1.3.5-r4.ebuild,v 1.1 2004/12/13 04:33:21 vapier Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Standard GNU compressor"
+HOMEPAGE="http://www.gnu.org/software/gzip/gzip.html"
+# This is also available from alpha.gnu.org, but that site has very limited
+# bandwidth and often isn't accessible
+SRC_URI="mirror://debian/pool/main/g/gzip/gzip_${PV}.orig.tar.gz
+ mirror://gentoo/${P}-deb.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nls build static pic"
+
+RDEPEND="virtual/libc"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+PROVIDE="virtual/gzip"
+
+src_unpack() {
+ unpack gzip_${PV}.orig.tar.gz
+ cd ${S}
+ epatch ${DISTDIR}/${P}-deb.patch.bz2
+ epatch ${FILESDIR}/gzip-1.3.5-zdiff-tempfile-2.patch
+ epatch ${FILESDIR}/gzip-1.3.5-znew-tempfile-2.patch
+}
+
+src_compile() {
+ use static && append-flags -static
+ # avoid text relocation in gzip
+ use pic && export DEFS="NO_ASM"
+ econf --exec-prefix=/ $(use_enable nls) || die
+ emake || die
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/man/man1
+ make prefix=${D}/usr \
+ exec_prefix=${D}/ \
+ mandir=${D}/usr/share/man \
+ infodir=${D}/usr/share/info \
+ install || die
+
+ cd ${D}/bin
+
+ for i in gzexe zforce zgrep zmore znew zcmp
+ do
+ sed -i -e "s:${D}::" ${i} || die
+ chmod 755 ${i}
+ done
+
+ # No need to waste space -- these guys should be links
+ # gzcat is equivilant to zcat, but historically zcat
+ # was a link to compress.
+ rm -f gunzip zcat zcmp zegrep zfgrep
+ dosym gzip /bin/gunzip
+ dosym gzip /bin/gzcat
+ dosym gzip /bin/zcat
+ dosym zdiff /bin/zcmp
+ dosym zgrep /bin/zegrep
+ dosym zgrep /bin/zfgrep
+
+ if ! use build
+ then
+ cd ${D}/usr/share/man/man1
+ rm -f gunzip.* zcmp.* zcat.*
+ ln -s gzip.1.gz gunzip.1.gz
+ ln -s zdiff.1.gz zcmp.1.gz
+ ln -s gzip.1.gz zcat.1.gz
+ ln -s gzip.1.gz gzcat.1.gz
+ cd ${S}
+ rm -rf ${D}/usr/man ${D}/usr/lib
+ dodoc ChangeLog NEWS README THANKS TODO
+ docinto txt
+ dodoc algorithm.doc gzip.doc
+ else
+ rm -rf ${D}/usr
+ fi
+}