diff options
author | Thilo Bangert <bangert@gentoo.org> | 2010-01-17 19:30:05 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2010-01-17 19:30:05 +0000 |
commit | ac20537a910ab8e779e27f36d6d3f2483530b39d (patch) | |
tree | 23750398213753f625fec87e676aeb5dbdf018c4 /app-arch/rzip | |
parent | sparc stable wrt #299590 (diff) | |
download | gentoo-2-ac20537a910ab8e779e27f36d6d3f2483530b39d.tar.gz gentoo-2-ac20537a910ab8e779e27f36d6d3f2483530b39d.tar.bz2 gentoo-2-ac20537a910ab8e779e27f36d6d3f2483530b39d.zip |
add updated darwin.patch (-r1), also include ability to read broken archives (-r2) (#217552)
(Portage version: 2.2_rc61/cvs/Linux i686)
Diffstat (limited to 'app-arch/rzip')
-rw-r--r-- | app-arch/rzip/ChangeLog | 11 | ||||
-rw-r--r-- | app-arch/rzip/files/rzip-2.1-darwin.patch | 165 | ||||
-rw-r--r-- | app-arch/rzip/files/rzip-2.1-handle-broken-archive.patch | 81 | ||||
-rw-r--r-- | app-arch/rzip/rzip-2.1-r1.ebuild | 27 | ||||
-rw-r--r-- | app-arch/rzip/rzip-2.1-r2.ebuild | 28 |
5 files changed, 311 insertions, 1 deletions
diff --git a/app-arch/rzip/ChangeLog b/app-arch/rzip/ChangeLog index ebd7eec20ab0..0c1f0553e240 100644 --- a/app-arch/rzip/ChangeLog +++ b/app-arch/rzip/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-arch/rzip # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/rzip/ChangeLog,v 1.28 2010/01/10 00:36:27 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/rzip/ChangeLog,v 1.29 2010/01/17 19:30:05 bangert Exp $ + +*rzip-2.1-r2 (17 Jan 2010) +*rzip-2.1-r1 (17 Jan 2010) + + 17 Jan 2010; Thilo Bangert <bangert@gentoo.org> +rzip-2.1-r1.ebuild, + +rzip-2.1-r2.ebuild, +files/rzip-2.1-darwin.patch, + +files/rzip-2.1-handle-broken-archive.patch: + add updated darwin.patch (-r1), also include ability to read broken + archives (-r2) (#217552) 10 Jan 2010; Jeroen Roovers <jer@gentoo.org> rzip-2.1.ebuild: Stable for HPPA too. diff --git a/app-arch/rzip/files/rzip-2.1-darwin.patch b/app-arch/rzip/files/rzip-2.1-darwin.patch new file mode 100644 index 000000000000..b62a1d404051 --- /dev/null +++ b/app-arch/rzip/files/rzip-2.1-darwin.patch @@ -0,0 +1,165 @@ +diff -r -uN rzip-2.1/configure.in rzip-2.1-patched/configure.in +--- rzip-2.1/configure.in 2003-11-03 09:19:11.000000000 +0100 ++++ rzip-2.1-patched/configure.in 2008-07-27 21:59:45.774740303 +0200 +@@ -2,6 +2,12 @@ + AC_INIT(main.c) + AC_CONFIG_HEADER(config.h) + ++# test prior to AC_PROG_CC, since it sets cflags on it's own. ++if test x"CFLAGS" = x ++then ++ DEFAULT_CFLAGS="-g -Wall -O3" ++fi ++ + dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL +@@ -9,10 +15,10 @@ + AC_SYS_LARGEFILE + + # Thanks to Martin Pool +-if test x"$GCC" = xyes ++if test x"$GCC" = xyes && test x"$DEFAULT_CFLAGS" != x + then + CFLAGS="-g -Wall -O3" +- AC_MSG_NOTICE([Setting gcc options: $CFLAGS]) ++ AC_MSG_RESULT([Setting default cflags: $CFLAGS]) + fi + + AC_CHECK_HEADERS(fcntl.h sys/time.h sys/unistd.h unistd.h) +@@ -45,12 +51,8 @@ + AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, , + AC_MSG_ERROR([Could not find bz2 library - please install libbz2-devel])) + +-echo $ac_n "checking for errno in errno.h... $ac_c" +-AC_TRY_COMPILE([#include <errno.h>],[int i = errno], +-echo yes; AC_DEFINE(HAVE_ERRNO_DECL), +-echo no) +- + AC_CHECK_FUNCS(mmap strerror) + AC_CHECK_FUNCS(getopt_long) ++AC_CHECK_FUNCS(strndup) + + AC_OUTPUT(Makefile) +diff -r -uN rzip-2.1/main.c rzip-2.1-patched/main.c +--- rzip-2.1/main.c 2006-02-14 01:38:23.000000000 +0100 ++++ rzip-2.1-patched/main.c 2008-07-27 22:00:28.298071207 +0200 +@@ -18,6 +18,7 @@ + /* rzip compression - main program */ + + #include "rzip.h" ++#include "strutils.h" + + static void usage(void) + { +diff -r -uN rzip-2.1/Makefile.in rzip-2.1-patched/Makefile.in +--- rzip-2.1/Makefile.in 2006-02-14 01:38:23.000000000 +0100 ++++ rzip-2.1-patched/Makefile.in 2008-07-27 21:58:08.201419790 +0200 +@@ -3,8 +3,8 @@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-INSTALL_BIN=$(exec_prefix)/bin +-INSTALL_MAN=$(prefix)/man ++INSTALL_BIN=$(DESTDIR)/@bindir@ ++INSTALL_MAN=$(DESTDIR)/@mandir@ + + LIBS=@LIBS@ + CC=@CC@ +@@ -20,7 +20,7 @@ + .SUFFIXES: + .SUFFIXES: .c .o + +-OBJS= rzip.o runzip.o main.o stream.o util.o crc32.o ++OBJS= rzip.o runzip.o strutils.o main.o stream.o util.o crc32.o + + # note that the -I. is needed to handle config.h when using VPATH + .c.o: +@@ -35,6 +35,7 @@ + ${INSTALLCMD} -m 755 rzip ${INSTALL_BIN} + -mkdir -p ${INSTALL_MAN}/man1 + ${INSTALLCMD} -m 644 $(srcdir)/rzip.1 ${INSTALL_MAN}/man1/ ++ ln -s rzip $(INSTALL_BIN)/runzip + + rzip: $(OBJS) + $(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS) +diff -r -uN rzip-2.1/rzip.h rzip-2.1-patched/rzip.h +--- rzip-2.1/rzip.h 2006-02-14 01:38:23.000000000 +0100 ++++ rzip-2.1-patched/rzip.h 2008-07-27 21:58:08.204752617 +0200 +@@ -94,7 +94,7 @@ + #define strerror(i) sys_errlist[i] + #endif + +-#ifndef HAVE_ERRNO_DECL ++#if !defined(errno) + extern int errno; + #endif + +diff -r -uN rzip-2.1/strutils.c rzip-2.1-patched/strutils.c +--- rzip-2.1/strutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ rzip-2.1-patched/strutils.c 2008-07-27 21:58:08.204752617 +0200 +@@ -0,0 +1,29 @@ ++/* ++ Copyright (C) 2005 Gentoo Foundation ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++*/ ++/* string utilities that may be missing on various platforms */ ++ ++#include "strutils.h" ++ ++#ifndef HAVE_STRNDUP ++char* strndup(const char* s, size_t n) { ++ char* ret = malloc(n + 1); ++ if (ret == NULL) return(ret); ++ ret[n] = '\0'; ++ return(memcpy(ret, s, n)); ++} ++#endif +diff -r -uN rzip-2.1/strutils.h rzip-2.1-patched/strutils.h +--- rzip-2.1/strutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ rzip-2.1-patched/strutils.h 2008-07-27 21:58:08.204752617 +0200 +@@ -0,0 +1,31 @@ ++/* ++ Copyright (C) 2005 Gentoo Foundation ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++*/ ++/* string utilities that may be missing on various platforms */ ++ ++#ifndef _HEADER_STRUTIL ++#define _HEADER_STRUTIL 1 ++ ++#include <stdlib.h> ++#include <string.h> ++#include "config.h" ++ ++# ifndef HAVE_STRNDUP ++char* strndup(const char* s, size_t n); ++# endif ++ ++#endif diff --git a/app-arch/rzip/files/rzip-2.1-handle-broken-archive.patch b/app-arch/rzip/files/rzip-2.1-handle-broken-archive.patch new file mode 100644 index 000000000000..860c866eeab3 --- /dev/null +++ b/app-arch/rzip/files/rzip-2.1-handle-broken-archive.patch @@ -0,0 +1,81 @@ +diff -ur rzip-2.1/main.c rzip-2.1-patched/main.c +--- rzip-2.1/main.c 2006-02-14 01:38:23.000000000 +0100 ++++ rzip-2.1-patched/main.c 2008-07-30 19:29:49.426926726 +0200 +@@ -35,6 +35,7 @@ + printf(" -k keep existing files\n"); + printf(" -P show compression progress\n"); + printf(" -L level set compression level\n"); ++ printf(" -l nr set higher bits of the expected file length to nr\n"); + printf(" -V show version\n"); + #if 0 + /* damn, this will be quite hard to do */ +@@ -172,6 +173,13 @@ + + + read_magic(fd_in, fd_out, &expected_size); ++ ++#ifdef HAVE_LARGE_FILES ++ if (control->nr) { ++ expected_size = ( ((off_t)(control->nr))<<32) | (expected_size & 0xFFFFFFFF); ++ } ++#endif ++ + runzip_fd(fd_in, fd_out, fd_hist, expected_size); + + if ((control->flags & FLAG_TEST_ONLY) == 0) { +@@ -267,7 +275,7 @@ + control.flags |= FLAG_DECOMPRESS; + } + +- while ((c = getopt(argc, argv, "h0123456789dS:tVvkfPo:L:")) != -1) { ++ while ((c = getopt(argc, argv, "h0123456789dS:tVvkl:fPo:L:")) != -1) { + if (isdigit(c)) { + control.compression_level = c - '0'; + continue; +@@ -295,6 +303,12 @@ + case 'k': + control.flags |= FLAG_KEEP_FILES; + break; ++ case 'l': ++#ifndef HAVE_LARGE_FILES ++ fatal("You used the -l option, but this rzip doesn't support large files."); ++#endif ++ control.nr = atoi(optarg); ++ break; + case 'v': + control.verbosity++; + break; +diff -ur rzip-2.1/runzip.c rzip-2.1-patched/runzip.c +--- rzip-2.1/runzip.c 2003-10-08 00:08:28.000000000 +0200 ++++ rzip-2.1-patched/runzip.c 2008-07-30 19:34:03.803564086 +0200 +@@ -179,10 +179,16 @@ + */ + off_t runzip_fd(int fd_in, int fd_out, int fd_hist, off_t expected_size) + { +- off_t total = 0; +- while (total < expected_size) { +- total += runzip_chunk(fd_in, fd_out, fd_hist); ++ off_t total = 0, fin=1; ++ while (fin && total < expected_size) { ++ fin = runzip_chunk(fd_in, fd_out, fd_hist); ++ total += fin; + } ++ ++ if (total < expected_size) { ++ fprintf(stderr, "Warning: The uncompressed size does not equal the expected file size.\nHowever if you used the -l option, this may be okay.\n"); ++ } ++ + return total; + } + +diff -ur rzip-2.1/rzip.h rzip-2.1-patched/rzip.h +--- rzip-2.1/rzip.h 2006-02-14 01:38:23.000000000 +0100 ++++ rzip-2.1-patched/rzip.h 2008-07-30 19:29:49.426926726 +0200 +@@ -113,6 +113,7 @@ + unsigned compression_level; + unsigned flags; + unsigned verbosity; ++ unsigned nr; + }; + + void fatal(const char *format, ...); diff --git a/app-arch/rzip/rzip-2.1-r1.ebuild b/app-arch/rzip/rzip-2.1-r1.ebuild new file mode 100644 index 000000000000..7d0ae6a645ec --- /dev/null +++ b/app-arch/rzip/rzip-2.1-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rzip/rzip-2.1-r1.ebuild,v 1.1 2010/01/17 19:30:05 bangert Exp $ + +EAPI="2" + +inherit autotools eutils + +DESCRIPTION="Compression program for large files" +HOMEPAGE="http://rzip.samba.org" +SRC_URI="http://rzip.samba.org/ftp/rzip/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="" + +DEPEND="app-arch/bzip2" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.1-darwin.patch + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." +} diff --git a/app-arch/rzip/rzip-2.1-r2.ebuild b/app-arch/rzip/rzip-2.1-r2.ebuild new file mode 100644 index 000000000000..a6250fb94cd7 --- /dev/null +++ b/app-arch/rzip/rzip-2.1-r2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rzip/rzip-2.1-r2.ebuild,v 1.1 2010/01/17 19:30:05 bangert Exp $ + +EAPI="2" + +inherit autotools eutils + +DESCRIPTION="Compression program for large files" +HOMEPAGE="http://rzip.samba.org" +SRC_URI="http://rzip.samba.org/ftp/rzip/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="" + +DEPEND="app-arch/bzip2" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.1-darwin.patch + epatch "${FILESDIR}"/${PN}-2.1-handle-broken-archive.patch + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." +} |