diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-13 22:25:15 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-13 22:25:15 +0000 |
commit | fa126ab626d25a8ef53593eb7fa5648934c3a6c8 (patch) | |
tree | 1a9e49905de5ec4ce3aa5ed265eee585ce280b42 /app-arch | |
parent | punt flat profiles, use the obsolete tree to upgrade (diff) | |
download | gentoo-2-fa126ab626d25a8ef53593eb7fa5648934c3a6c8.tar.gz gentoo-2-fa126ab626d25a8ef53593eb7fa5648934c3a6c8.tar.bz2 gentoo-2-fa126ab626d25a8ef53593eb7fa5648934c3a6c8.zip |
Fix wildcard expansion of non-regular files by Bardur Arantsson #51817. Also fix building with gcc4 by Dirk-Jan Heijs #102391.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/par2cmdline/ChangeLog | 12 | ||||
-rw-r--r-- | app-arch/par2cmdline/files/digest-par2cmdline-0.4-r1 | 1 | ||||
-rw-r--r-- | app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch | 62 | ||||
-rw-r--r-- | app-arch/par2cmdline/files/par2cmdline-0.4-wildcard-fix.patch | 75 | ||||
-rw-r--r-- | app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild | 30 |
5 files changed, 178 insertions, 2 deletions
diff --git a/app-arch/par2cmdline/ChangeLog b/app-arch/par2cmdline/ChangeLog index 87d912074285..6cfe13c035dc 100644 --- a/app-arch/par2cmdline/ChangeLog +++ b/app-arch/par2cmdline/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-arch/par2cmdline -# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/par2cmdline/ChangeLog,v 1.10 2005/01/01 11:51:08 eradicator Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/par2cmdline/ChangeLog,v 1.11 2005/08/13 22:25:15 vapier Exp $ + +*par2cmdline-0.4-r1 (13 Aug 2005) + + 13 Aug 2005; Mike Frysinger <vapier@gentoo.org> + +files/par2cmdline-0.4-gcc4.patch, + +files/par2cmdline-0.4-wildcard-fix.patch, +par2cmdline-0.4-r1.ebuild: + Fix wildcard expansion of non-regular files by Bardur Arantsson #51817. Also + fix building with gcc4 by Dirk-Jan Heijs #102391. 17 Nov 2004; Mike Frysinger <vapier@gentoo.org> par2cmdline-0.4.ebuild: Use make install DESTDIR. diff --git a/app-arch/par2cmdline/files/digest-par2cmdline-0.4-r1 b/app-arch/par2cmdline/files/digest-par2cmdline-0.4-r1 new file mode 100644 index 000000000000..baa9c66a199c --- /dev/null +++ b/app-arch/par2cmdline/files/digest-par2cmdline-0.4-r1 @@ -0,0 +1 @@ +MD5 1551b63e57e3c232254dc62073b723a9 par2cmdline-0.4.tar.gz 239312 diff --git a/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch b/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch new file mode 100644 index 000000000000..c6da26789eac --- /dev/null +++ b/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch @@ -0,0 +1,62 @@ +Fix compilation with gcc-4. + +Patch by Dirk-Jan Heijs. + +http://bugs.gentoo.org/102391 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287904 + +--- par2cmdline-0.4/reedsolomon.cpp ++++ par2cmdline-0.4/reedsolomon.cpp +@@ -51,7 +51,7 @@ + } + } + +-bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present) ++template <> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present) + { + inputcount = (u32)present.size(); + +@@ -80,7 +80,7 @@ + return true; + } + +-bool ReedSolomon<Galois8>::SetInput(u32 count) ++template <> bool ReedSolomon<Galois8>::SetInput(u32 count) + { + inputcount = count; + +@@ -101,7 +101,7 @@ + return true; + } + +-bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) + { + // Look up the appropriate element in the RS matrix + Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex]; +@@ -189,7 +189,7 @@ + + // Set which of the source files are present and which are missing + // and compute the base values to use for the vandermonde matrix. +-bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present) ++template <> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present) + { + inputcount = (u32)present.size(); + +@@ -233,7 +233,7 @@ + + // Record that the specified number of source files are all present + // and compute the base values to use for the vandermonde matrix. +-bool ReedSolomon<Galois16>::SetInput(u32 count) ++template <> bool ReedSolomon<Galois16>::SetInput(u32 count) + { + inputcount = count; + +@@ -267,7 +267,7 @@ + return true; + } + +-bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) + { + // Look up the appropriate element in the RS matrix diff --git a/app-arch/par2cmdline/files/par2cmdline-0.4-wildcard-fix.patch b/app-arch/par2cmdline/files/par2cmdline-0.4-wildcard-fix.patch new file mode 100644 index 000000000000..a3dd738e28ad --- /dev/null +++ b/app-arch/par2cmdline/files/par2cmdline-0.4-wildcard-fix.patch @@ -0,0 +1,75 @@ +Fix wildcard expansion of non-regular files. + +Patch by Bardur Arantsson. + +http://bugs.gentoo.org/51817 +http://sourceforge.net/tracker/index.php?func=detail&aid=958902&group_id=30568&atid=399698 + +--- par2cmdline-0.4/diskfile.cpp ++++ par2cmdline-0.4/diskfile.cpp +@@ -618,6 +618,12 @@ + return result; + } + ++bool is_regular_file(const string &p) ++{ ++ struct stat st; ++ return (stat(p.c_str(), &st) == 0 && S_ISREG(st.st_mode)); ++} ++ + list<string>* DiskFile::FindFiles(string path, string wildcard) + { + list<string> *matches = new list<string>; +@@ -648,7 +654,15 @@ + name.substr(0, where) == front && + name.substr(name.size()-back.size()) == back) + { +- matches->push_back(path + name); ++ if (is_regular_file(path + name)) ++ { ++ matches->push_back(path + name); ++ } ++ else ++ { ++ cerr << "Warning: '" << (path + name) ++ << "' ignored; not a regular file" << endl; ++ } + } + } + else +@@ -667,7 +681,15 @@ + + if (pw == wildcard.end()) + { +- matches->push_back(path + name); ++ if (is_regular_file(path + name)) ++ { ++ matches->push_back(path + name); ++ } ++ else ++ { ++ cerr << "Warning: '" << (path + name) ++ << "' ignored; not a regular file" << endl; ++ } + } + } + } +@@ -678,12 +700,15 @@ + } + else + { +- struct stat st; +- string fn = path + wildcard; +- if (stat(fn.c_str(), &st) == 0) ++ if (is_regular_file(path + wildcard)) + { + matches->push_back(path + wildcard); + } ++ else ++ { ++ cerr << "Warning: '" << (path + wildcard) ++ << "' ignored; not a regular file" << endl; ++ } + } + + return matches; diff --git a/app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild b/app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild new file mode 100644 index 000000000000..e3472e7eb0a2 --- /dev/null +++ b/app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild,v 1.1 2005/08/13 22:25:15 vapier Exp $ + +inherit eutils + +DESCRIPTION="A PAR-2.0 file verification and repair tool" +HOMEPAGE="http://parchive.sourceforge.net/" +SRC_URI="mirror://sourceforge/parchive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc-macos ~x86" +IUSE="" + +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-wildcard-fix.patch + epatch "${FILESDIR}"/${P}-gcc4.patch +} + +src_install() { + make install DESTDIR="${D}" || die + local DOCLIST="AUTHORS INSTALL ChangeLog NEWS PORTING README ROADMAP" + chmod -x ${DOCLIST} + dodoc ${DOCLIST} +} |