# HG changeset patch # User Pascal Bellard # Date 1300263097 -3600 # Node ID ffa07731ee844bccce56753cd7edf8f2cc093442 # Parent 62789b5664363900c8bf9f9283fd5c9ddc50a8c9 Add par2 diff -r 62789b566436 -r ffa07731ee84 par2/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/par2/receipt Wed Mar 16 09:11:37 2011 +0100 @@ -0,0 +1,30 @@ +# SliTaz package receipt. + +PACKAGE="par2" +SOURCE="par2cmdline" +VERSION="0.4" +CATEGORY="system" +SHORT_DESC="Utility for posting and recovery of multi-part archives." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://parchive.sourceforge.net/" +WGET_URL="$SF_MIRROR/parchive/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + #http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch + patch -p1 < ../stuff/par2cmdline-0.4-gcc4.patch || true + ./configure --prefix=/usr --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + $CONFIGURE_ARGS && + make && + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + cp -a $_pkg/usr $fs +} diff -r 62789b566436 -r ffa07731ee84 par2/stuff/par2cmdline-0.4-gcc4.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/par2/stuff/par2cmdline-0.4-gcc4.patch Wed Mar 16 09:11:37 2011 +0100 @@ -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::SetInput(const vector &present) ++template <> bool ReedSolomon::SetInput(const vector &present) + { + inputcount = (u32)present.size(); + +@@ -80,7 +80,7 @@ + return true; + } + +-bool ReedSolomon::SetInput(u32 count) ++template <> bool ReedSolomon::SetInput(u32 count) + { + inputcount = count; + +@@ -101,7 +101,7 @@ + return true; + } + +-bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon::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::SetInput(const vector &present) ++template <> bool ReedSolomon::SetInput(const vector &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::SetInput(u32 count) ++template <> bool ReedSolomon::SetInput(u32 count) + { + inputcount = count; + +@@ -267,7 +267,7 @@ + return true; + } + +-bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) ++template <> bool ReedSolomon::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) + { + // Look up the appropriate element in the RS matrix