aboutsummaryrefslogtreecommitdiffstats
path: root/archivers
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-03-23 00:51:55 +0800
committerrafan <rafan@FreeBSD.org>2007-03-23 00:51:55 +0800
commit68a862439380b85488ba122eff27be9db021c0ed (patch)
tree0a985396f2057132840f8e3ff32e7d29bdb9ac18 /archivers
parent316094a9d48fe714969632cf7f076f6719464ce5 (diff)
downloadfreebsd-ports-gnome-68a862439380b85488ba122eff27be9db021c0ed.tar.gz
freebsd-ports-gnome-68a862439380b85488ba122eff27be9db021c0ed.tar.zst
freebsd-ports-gnome-68a862439380b85488ba122eff27be9db021c0ed.zip
- Fix gcc4 build
PR: ports/110589 Submitted by: Jonathan Stewart <jonathan at kc8onw.net> (maintainer)
Diffstat (limited to 'archivers')
-rw-r--r--archivers/par2cmdline/Makefile2
-rw-r--r--archivers/par2cmdline/files/patch-reedsolomon.cpp56
2 files changed, 58 insertions, 0 deletions
diff --git a/archivers/par2cmdline/Makefile b/archivers/par2cmdline/Makefile
index f832a03571db..da32ba91aa91 100644
--- a/archivers/par2cmdline/Makefile
+++ b/archivers/par2cmdline/Makefile
@@ -25,6 +25,8 @@ PLIST_FILES= bin/par2 bin/par2create bin/par2repair bin/par2verify
post-patch:
@${REINPLACE_CMD} -e 's| -lstdc++||g' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|#define PACKED __attribute__ ((packed))|#define PACKED|' ${WRKSRC}/par1fileformat.h
+ @${REINPLACE_CMD} -e 's|#define PACKED __attribute__ ((packed))|#define PACKED|' ${WRKSRC}/par2fileformat.h
post-install:
.if !defined(NOPORTDOCS)
diff --git a/archivers/par2cmdline/files/patch-reedsolomon.cpp b/archivers/par2cmdline/files/patch-reedsolomon.cpp
new file mode 100644
index 000000000000..279479af1dc5
--- /dev/null
+++ b/archivers/par2cmdline/files/patch-reedsolomon.cpp
@@ -0,0 +1,56 @@
+--- ./reedsolomon.cpp.orig Tue May 27 02:01:31 2003
++++ ./reedsolomon.cpp Fri Mar 23 00:49:59 2007
+@@ -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
+