wok rev 9280

Add par2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 16 09:11:37 2011 +0100 (2011-03-16)
parents 62789b566436
children 84e5f2e10ea6
files par2/receipt par2/stuff/par2cmdline-0.4-gcc4.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/par2/receipt	Wed Mar 16 09:11:37 2011 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="par2"
     1.7 +SOURCE="par2cmdline"
     1.8 +VERSION="0.4"
     1.9 +CATEGORY="system"
    1.10 +SHORT_DESC="Utility for posting and recovery of multi-part archives."
    1.11 +MAINTAINER="pascal.bellard@slitaz.org"
    1.12 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://parchive.sourceforge.net/"
    1.14 +WGET_URL="$SF_MIRROR/parchive/$TARBALL"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +	cd $src
    1.20 +	#http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch
    1.21 +	patch -p1 < ../stuff/par2cmdline-0.4-gcc4.patch || true
    1.22 +	./configure --prefix=/usr --infodir=/usr/share/info \
    1.23 +	--mandir=/usr/share/man \
    1.24 +	$CONFIGURE_ARGS &&
    1.25 +	make &&
    1.26 +	make DESTDIR=$PWD/_pkg install
    1.27 +}
    1.28 +
    1.29 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.30 +genpkg_rules()
    1.31 +{
    1.32 +	cp -a $_pkg/usr $fs
    1.33 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/par2/stuff/par2cmdline-0.4-gcc4.patch	Wed Mar 16 09:11:37 2011 +0100
     2.3 @@ -0,0 +1,62 @@
     2.4 +Fix compilation with gcc-4.
     2.5 +
     2.6 +Patch by Dirk-Jan Heijs.
     2.7 +
     2.8 +http://bugs.gentoo.org/102391
     2.9 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287904
    2.10 +
    2.11 +--- par2cmdline-0.4/reedsolomon.cpp
    2.12 ++++ par2cmdline-0.4/reedsolomon.cpp
    2.13 +@@ -51,7 +51,7 @@
    2.14 +   }
    2.15 + }
    2.16 + 
    2.17 +-bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
    2.18 ++template <> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
    2.19 + {
    2.20 +   inputcount = (u32)present.size();
    2.21 + 
    2.22 +@@ -80,7 +80,7 @@
    2.23 +   return true;
    2.24 + }
    2.25 + 
    2.26 +-bool ReedSolomon<Galois8>::SetInput(u32 count)
    2.27 ++template <> bool ReedSolomon<Galois8>::SetInput(u32 count)
    2.28 + {
    2.29 +   inputcount = count;
    2.30 + 
    2.31 +@@ -101,7 +101,7 @@
    2.32 +   return true;
    2.33 + }
    2.34 + 
    2.35 +-bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
    2.36 ++template <> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
    2.37 + {
    2.38 +   // Look up the appropriate element in the RS matrix
    2.39 +   Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex];
    2.40 +@@ -189,7 +189,7 @@
    2.41 + 
    2.42 + // Set which of the source files are present and which are missing
    2.43 + // and compute the base values to use for the vandermonde matrix.
    2.44 +-bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
    2.45 ++template <> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
    2.46 + {
    2.47 +   inputcount = (u32)present.size();
    2.48 + 
    2.49 +@@ -233,7 +233,7 @@
    2.50 + 
    2.51 + // Record that the specified number of source files are all present
    2.52 + // and compute the base values to use for the vandermonde matrix.
    2.53 +-bool ReedSolomon<Galois16>::SetInput(u32 count)
    2.54 ++template <> bool ReedSolomon<Galois16>::SetInput(u32 count)
    2.55 + {
    2.56 +   inputcount = count;
    2.57 + 
    2.58 +@@ -267,7 +267,7 @@
    2.59 +   return true;
    2.60 + }
    2.61 + 
    2.62 +-bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
    2.63 ++template <> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
    2.64 + {
    2.65 +   // Look up the appropriate element in the RS matrix