summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-13 22:25:15 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-13 22:25:15 +0000
commita67980aa3959f4a7b3e159b4c24f08309aa53f71 (patch)
tree8220d58d7996f0057d95744e4d62ffb1244f8f06 /app-arch/par2cmdline
parentpunt flat profiles, use the obsolete tree to upgrade (diff)
downloadhistorical-a67980aa3959f4a7b3e159b4c24f08309aa53f71.tar.gz
historical-a67980aa3959f4a7b3e159b4c24f08309aa53f71.tar.bz2
historical-a67980aa3959f4a7b3e159b4c24f08309aa53f71.zip
Fix wildcard expansion of non-regular files by Bardur Arantsson #51817. Also fix building with gcc4 by Dirk-Jan Heijs #102391.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'app-arch/par2cmdline')
-rw-r--r--app-arch/par2cmdline/ChangeLog12
-rw-r--r--app-arch/par2cmdline/Manifest16
-rw-r--r--app-arch/par2cmdline/files/digest-par2cmdline-0.4-r11
-rw-r--r--app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch62
-rw-r--r--app-arch/par2cmdline/files/par2cmdline-0.4-wildcard-fix.patch75
-rw-r--r--app-arch/par2cmdline/par2cmdline-0.4-r1.ebuild30
6 files changed, 193 insertions, 3 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/Manifest b/app-arch/par2cmdline/Manifest
index 0d7e1467737a..88d921b0cf0c 100644
--- a/app-arch/par2cmdline/Manifest
+++ b/app-arch/par2cmdline/Manifest
@@ -1,4 +1,18 @@
-MD5 382ba2cb38cf95986da9f257f68bebb3 ChangeLog 1166
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 1652522405f5936eb29776ef8d5ffa5b metadata.xml 310
+MD5 f456aecf06e42366b7c6b3f5cc9efb04 par2cmdline-0.4-r1.ebuild 774
MD5 c94644ad155ca9b9876df4dad13105cb par2cmdline-0.4.ebuild 630
+MD5 a99d7aebf31db31fe57c95376352c71c ChangeLog 1489
+MD5 63535457a22c3f35097d27d7af6e8d10 files/par2cmdline-0.4-wildcard-fix.patch 1928
+MD5 d52515669d3bc43f19c545fd6405dacc files/par2cmdline-0.4-gcc4.patch 2064
MD5 c4c768958c9fb685125ffc0399983685 files/digest-par2cmdline-0.4 67
+MD5 c4c768958c9fb685125ffc0399983685 files/digest-par2cmdline-0.4-r1 67
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFC/nN6gIKl8Uu19MoRArNFAJwM2iwOoGVxYWZrDmeAYkul7Kv+kQCcC99G
+n1gnwWruqwk9PwOEqBILF3k=
+=qEri
+-----END PGP SIGNATURE-----
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}
+}