Fix the zdiff patch so it works #70277 by Michael Moen. Update the znew patch with...
authorMike Frysinger <vapier@gentoo.org>
Mon, 13 Dec 2004 04:33:21 +0000 (04:33 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 13 Dec 2004 04:33:21 +0000 (04:33 +0000)
app-arch/gzip/ChangeLog
app-arch/gzip/Manifest
app-arch/gzip/files/digest-gzip-1.3.5-r4 [new file with mode: 0644]
app-arch/gzip/files/gzip-1.3.5-zdiff-tempfile-2.patch [new file with mode: 0644]
app-arch/gzip/files/gzip-1.3.5-znew-tempfile-2.patch [new file with mode: 0644]
app-arch/gzip/gzip-1.3.5-r4.ebuild [new file with mode: 0644]

index 76f2efb581a6aa91d60f1626a7f20e20788ab0d0..c3f46d06fdd63e634cfde8e3b332280c6597de45 100644 (file)
@@ -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.
index 48a503690614f465eefdbdc6a95290884024c20a..3683d31fc096aa37f77c221c61821c3484e2bf1b 100644 (file)
@@ -1,16 +1,20 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 0c65455c9168aa6fc36ab7e933a7971c ChangeLog 6639
+MD5 131c97cfb82f7d392a9ffb24b6d68401 ChangeLog 6946
+MD5 1a2c33e30a5a59ec375695cac55f4c41 gzip-1.3.5-r4.ebuild 2151
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 MD5 0fa25135499054da183a5438768815ee gzip-1.3.5-r3.ebuild 2136
+MD5 17f0be7717f949fc0acd0ef316982cd6 files/gzip-1.3.5-znew-tempfile-2.patch 1931
 MD5 a3bbaab6aec4b44161509caf1883e5d8 files/digest-gzip-1.3.5-r3 134
 MD5 5e7967bad14d0fd7e1e3d4f6086831b9 files/gzip-1.3.5-znew-tempfile.patch 615
+MD5 a3bbaab6aec4b44161509caf1883e5d8 files/digest-gzip-1.3.5-r4 134
 MD5 f4727ba4030d08645aff9e1957453ecf files/gzip-1.3.5-zdiff-tempfile.patch 939
+MD5 fece8c9d7f666a4831b914a61176bc16 files/gzip-1.3.5-zdiff-tempfile-2.patch 715
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.10 (GNU/Linux)
 
-iD8DBQFBvRY3roRuSHgZdywRAobJAJ97NWVuq1P1avYqb9y6qM62nppu7QCfdmoV
-gxfVxeBMWtqNvDrICZwMR4w=
-=49g2
+iD8DBQFBvRuproRuSHgZdywRAoLUAJ0bDVLxiGBArE0xuj+6wZnJZJ/T4ACfRWce
+g0tWMZ99zI0faBS7GVm2DYQ=
+=q5xf
 -----END PGP SIGNATURE-----
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 (file)
index 0000000..d9e68f9
--- /dev/null
@@ -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 (file)
index 0000000..f791e6f
--- /dev/null
@@ -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 (file)
index 0000000..334e6a1
--- /dev/null
@@ -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 (file)
index 0000000..14f64e5
--- /dev/null
@@ -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
+}