diff options
author | Dror Levin <spatz@gentoo.org> | 2010-09-04 13:23:51 +0000 |
---|---|---|
committer | Dror Levin <spatz@gentoo.org> | 2010-09-04 13:23:51 +0000 |
commit | 4f0a65fef2bb282b64b22890aafe364630895dc8 (patch) | |
tree | 2645ea0d50cefb9d48cbed25d0d1387c2dd672cc /app-arch/pigz | |
parent | alpha stable (diff) | |
download | gentoo-2-4f0a65fef2bb282b64b22890aafe364630895dc8.tar.gz gentoo-2-4f0a65fef2bb282b64b22890aafe364630895dc8.tar.bz2 gentoo-2-4f0a65fef2bb282b64b22890aafe364630895dc8.zip |
Add patch to support double dash command-line option (--), bug 335852.
(Portage version: 2.2_rc74/cvs/Linux x86_64)
Diffstat (limited to 'app-arch/pigz')
-rw-r--r-- | app-arch/pigz/ChangeLog | 8 | ||||
-rw-r--r-- | app-arch/pigz/files/pigz-2.1.6-doubledash.patch | 45 | ||||
-rw-r--r-- | app-arch/pigz/pigz-2.1.6-r1.ebuild | 38 |
3 files changed, 90 insertions, 1 deletions
diff --git a/app-arch/pigz/ChangeLog b/app-arch/pigz/ChangeLog index 4cb07e14fed5..dad5c6be86ca 100644 --- a/app-arch/pigz/ChangeLog +++ b/app-arch/pigz/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-arch/pigz # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/pigz/ChangeLog,v 1.12 2010/04/13 21:41:07 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/pigz/ChangeLog,v 1.13 2010/09/04 13:23:51 spatz Exp $ + +*pigz-2.1.6-r1 (04 Sep 2010) + + 04 Sep 2010; Dror Levin <spatz@gentoo.org> +pigz-2.1.6-r1.ebuild, + +files/pigz-2.1.6-doubledash.patch: + Add patch to support double dash command-line option (--), bug 335852. 13 Apr 2010; Markos Chandras <hwoarang@gentoo.org> pigz-2.1.6.ebuild: Stable on amd64 wrt bug #307837 diff --git a/app-arch/pigz/files/pigz-2.1.6-doubledash.patch b/app-arch/pigz/files/pigz-2.1.6-doubledash.patch new file mode 100644 index 000000000000..d528a7956b76 --- /dev/null +++ b/app-arch/pigz/files/pigz-2.1.6-doubledash.patch @@ -0,0 +1,45 @@ +diff --git a/pigz.c b/pigz.c +index 97e6faa..29d88c3 100644 +--- a/pigz.c ++++ b/pigz.c +@@ -2940,6 +2940,9 @@ local int option(char *arg) + arg = longopts[j][1]; + break; + } ++ /* double dash to terminate option processing */ ++ if (*(arg-1) == '-') ++ return 2; + if (j < 0) + bail("invalid option: ", arg - 2); + } +@@ -3061,6 +3064,7 @@ int main(int argc, char **argv) + int n; /* general index */ + unsigned long done; /* number of named files processed */ + char *opts, *p; /* environment default options, marker */ ++ int doubledash; /* -- to terminate option checking */ + + /* prepare for interrupts and logging */ + signal(SIGINT, cut_short); +@@ -3106,15 +3110,20 @@ int main(int argc, char **argv) + + /* process command-line arguments */ + done = 0; +- for (n = 1; n < argc; n++) +- if (option(argv[n])) { /* true if file name, process it */ ++ doubledash = 0; ++ for (n = 1; n < argc; n++) { ++ int optionreturn = doubledash ? 1 : option(argv[n]); ++ if (optionreturn == 1) { /* true if file name, process it */ + if (done == 1 && pipeout && !decode && !list && form > 1) { + fprintf(stderr, "warning: output is concatenated zip files "); + fprintf(stderr, "-- pigz will not be able to extract\n"); + } + process(strcmp(argv[n], "-") ? argv[n] : NULL); + done++; ++ } else if (optionreturn == 2) { ++ doubledash++; + } ++ } + option(NULL); + + /* list stdin or compress stdin to stdout if no file names provided */ diff --git a/app-arch/pigz/pigz-2.1.6-r1.ebuild b/app-arch/pigz/pigz-2.1.6-r1.ebuild new file mode 100644 index 000000000000..a2797c34e0c0 --- /dev/null +++ b/app-arch/pigz/pigz-2.1.6-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/pigz/pigz-2.1.6-r1.ebuild,v 1.1 2010/09/04 13:23:51 spatz Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs + +DESCRIPTION="A parallel implementation of gzip" +HOMEPAGE="http://www.zlib.net/pigz/" +SRC_URI="http://www.zlib.net/pigz/${P}.tar.gz" + +LICENSE="PIGZ" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~sparc64-solaris" +IUSE="symlink test" + +RDEPEND="sys-libs/zlib" +DEPEND="${RDEPEND} + test? ( app-arch/ncompress )" + +src_prepare() { + sed -i -e '/^CFLAGS=/ d' -e '4s/cc/$(CC) $(LDFLAGS)/' "${S}/Makefile" || die + epatch "${FILESDIR}/${P}-doubledash.patch" + tc-export CC +} + +src_install() { + dobin ${PN} || die "Failed to install" + dosym /usr/bin/${PN} /usr/bin/un${PN} || die + dodoc README || die + doman ${PN}.1 || die + + if use symlink; then + dosym /usr/bin/${PN} /usr/bin/gzip || die + dosym /usr/bin/un${PN} /usr/bin/gunzip || die + fi +} |