From 19eeb60d584d3aaf2643480f261c6fe834484426 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 7 Jan 2010 23:15:36 +0100 Subject: [PATCH] new package: (thanks to Andras) - add package par2cmdline needed by upcoming SABnzbd plugin --- packages/sysutils/par2cmdline/build | 16 +++++ packages/sysutils/par2cmdline/install | 6 ++ .../010_par2cmdline-0.4-gcc4.patch.diff | 62 +++++++++++++++++++ packages/sysutils/par2cmdline/url | 2 + 4 files changed, 86 insertions(+) create mode 100755 packages/sysutils/par2cmdline/build create mode 100755 packages/sysutils/par2cmdline/install create mode 100644 packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff create mode 100644 packages/sysutils/par2cmdline/url diff --git a/packages/sysutils/par2cmdline/build b/packages/sysutils/par2cmdline/build new file mode 100755 index 0000000000..aab03ad6ba --- /dev/null +++ b/packages/sysutils/par2cmdline/build @@ -0,0 +1,16 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --disable-static \ + --enable-shared \ + +make + +$MAKEINSTALL diff --git a/packages/sysutils/par2cmdline/install b/packages/sysutils/par2cmdline/install new file mode 100755 index 0000000000..440e1c013f --- /dev/null +++ b/packages/sysutils/par2cmdline/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options + +mkdir -p $INSTALL/usr/bin + cp -PR $PKG_BUILD/par2 $INSTALL/usr/bin diff --git a/packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff b/packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff new file mode 100644 index 0000000000..c6da26789e --- /dev/null +++ b/packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff @@ -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 diff --git a/packages/sysutils/par2cmdline/url b/packages/sysutils/par2cmdline/url new file mode 100644 index 0000000000..b7c404740d --- /dev/null +++ b/packages/sysutils/par2cmdline/url @@ -0,0 +1,2 @@ +http://mesh.dl.sourceforge.net/project/parchive/par2cmdline/0.4/par2cmdline-0.4.tar.gz +