ports/110589: archivers/par2cmdline gcc4 patches

Jonathan Stewart jonathan at kc8onw.net
Tue Mar 20 17:10:06 UTC 2007


>Number:         110589
>Category:       ports
>Synopsis:       archivers/par2cmdline gcc4 patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 20 17:10:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Stewart
>Release:        6-Stable
>Organization:
>Environment:
N/A
>Description:
Email to maintainer (me)...

"As you may know, in the near future FreeBSD 7.x will be switching from
the gcc 3.4 compiler to gcc 4.x.  Unfortunately your port fails to
build with the new compiler; see the log below."

>How-To-Repeat:
Build the port with gcc4+
>Fix:
The diff below as well as the attached patch file cleans up the warnings and fixes  gcc4 compile errors.

--- Makefile.old	Sun Jan 28 13:54:37 2007
+++ Makefile	Tue Mar 20 12:51:07 2007
@@ -25,6 +25,8 @@
 
 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)


Patch attached with submission follows:

--- reedsolomon.cpp.old	Sun Jan 28 15:56:12 2007
+++ reedsolomon.cpp	Sun Jan 28 15:58:17 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
 

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list