On 2015/05/04 02:59, heigo wrote:
> par2cmdline doesn't work on 5.7/amd64, just exits with the message:
> "Main packet not found."
>
> Works fine on the same machine under 5.5.
> Tried 5.6 also, same result as 5.7.
>
> h.
>
Is this any better? It does not pass all self-tests but might be
worth committing if it's an improvement over what we have currently.
Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/par2cmdline/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile 19 Apr 2015 17:52:47 -0000 1.10
+++ Makefile 5 May 2015 20:09:06 -0000
@@ -1,22 +1,44 @@
# $OpenBSD: Makefile,v 1.10 2015/04/19 17:52:47 jca Exp $
COMMENT= command line implementation of the PAR v2.0 specification
-DISTNAME= par2cmdline-0.4
-REVISION= 2
+
+V= 0.6.12
+DISTNAME= par2cmdline-$V
+DISTFILES= ${DISTNAME}{v$V}.tar.gz
+
CATEGORIES= archivers
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=parchive/}
-HOMEPAGE= http://parchive.sourceforge.net/\#client_par2cmdline
+HOMEPAGE= https://github.com/BlackIkeEagle/par2cmdline/
-# GPL
+# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
-WANTLIB= c m stdc++
+WANTLIB += c m stdc++
+
+MASTER_SITES= ${HOMEPAGE}archive/
+
+BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \
+ ${MODGNU_AUTOMAKE_DEPENDS}
-CONFIGURE_STYLE=gnu
+CONFIGURE_STYLE= gnu
+
+AUTOCONF_VERSION= 2.69
+AUTOMAKE_VERSION= 1.15
+
+MAKE_ENV= AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION}
+
+post-patch:
+ cd ${WRKSRC}; \
+ export AUTOCONF_VERSION=${AUTOCONF_VERSION}; \
+ export AUTOMAKE_VERSION=${AUTOMAKE_VERSION}; \
+ aclocal; automake --add-missing; autoconf
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/par2cmdline
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/par2cmdline
+
+pre-test:
+ perl -pi -e 's,^tar -xf,tar -xzf,' ${WRKSRC}/tests/test*
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/archivers/par2cmdline/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 4 Apr 2013 16:03:56 -0000 1.5
+++ distinfo 5 May 2015 20:09:06 -0000
@@ -1,2 +1,2 @@
-SHA256 (par2cmdline-0.4.tar.gz) = njK32897yoJJ+YgkdX1IaHFBVv4idlFlBM0m9zbp9nc=
-SIZE (par2cmdline-0.4.tar.gz) = 239312
+SHA256 (par2cmdline-0.6.12.tar.gz) =
F4iqqyzX92DE3CTB0xpHGktYT7v6KkfwbzQLTXNIAUQ=
+SIZE (par2cmdline-0.6.12.tar.gz) = 3536512
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 27 Jun 2004 23:06:47 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.2 2004/06/27 23:06:47 jolan Exp $
---- Makefile.in.orig Mon Apr 12 11:44:18 2004
-+++ Makefile.in Sun Jun 27 17:56:29 2004
-@@ -669,7 +669,6 @@ install-data-am:
-
- install-exec-am: install-binPROGRAMS
- @$(NORMAL_INSTALL)
-- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
-
- install-info: install-info-am
-
Index: patches/patch-README
===================================================================
RCS file: patches/patch-README
diff -N patches/patch-README
--- patches/patch-README 9 May 2010 15:30:53 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-README,v 1.2 2010/05/09 15:30:53 robert Exp $
---- README.orig Thu Apr 22 16:46:05 2004
-+++ README Sun May 9 17:23:38 2010
-@@ -81,12 +81,6 @@ The command line parameters for par2cmdline are as fol
- par2 v(erify) [options] <par2 file> [files]
- par2 r(epair) [options] <par2 file> [files]
-
-- Also:
--
-- par2create [options] <par2 file> [files]
-- par2verify [options] <par2 file> [files]
-- par2repair [options] <par2 file> [files]
--
- Options:
-
- -b<n> : Set the Block-Count
Index: patches/patch-diskfile_cpp
===================================================================
RCS file: patches/patch-diskfile_cpp
diff -N patches/patch-diskfile_cpp
--- patches/patch-diskfile_cpp 9 May 2010 15:30:53 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-diskfile_cpp,v 1.3 2010/05/09 15:30:53 robert Exp $
---- diskfile.cpp.orig Mon Apr 12 13:25:37 2004
-+++ diskfile.cpp Sun May 9 17:23:38 2010
-@@ -17,6 +17,8 @@
- // along with this program; if not, write to the Free Software
- // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-+#include <sys/param.h>
-+
- #include "par2cmdline.h"
-
- #ifdef _MSC_VER
-@@ -562,7 +564,7 @@ string DiskFile::GetCanonicalPathname(string filename)
- return filename;
-
- // Get the current directory
-- char curdir[1000];
-+ char curdir[MAXPATHLEN];
- if (0 == getcwd(curdir, sizeof(curdir)))
- {
- return filename;
Index: patches/patch-par2creatorsourcefile_cpp
===================================================================
RCS file: patches/patch-par2creatorsourcefile_cpp
diff -N patches/patch-par2creatorsourcefile_cpp
--- patches/patch-par2creatorsourcefile_cpp 19 Apr 2015 17:53:59 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-par2creatorsourcefile_cpp,v 1.2 2015/04/19 17:53:59 jca Exp $
-
-- par2 crash with -q or -qq: https://bugs.debian.org/299658 and
- http://sf.net/p/parchive/bugs/37/
-
---- par2creatorsourcefile.cpp.orig Thu Apr 15 14:45:23 2004
-+++ par2creatorsourcefile.cpp Sun Apr 19 10:57:32 2015
-@@ -213,11 +213,12 @@ bool Par2CreatorSourceFile::Open(CommandLine::NoiseLev
- }
- }
-
-+ offset += want;
-+
- if (noiselevel > CommandLine::nlQuiet)
- {
- // Display progress
- u32 oldfraction = (u32)(1000 * offset / filesize);
-- offset += want;
- u32 newfraction = (u32)(1000 * offset / filesize);
- if (oldfraction != newfraction)
- {
Index: patches/patch-reedsolomon_cpp
===================================================================
RCS file: patches/patch-reedsolomon_cpp
diff -N patches/patch-reedsolomon_cpp
--- patches/patch-reedsolomon_cpp 9 May 2010 15:30:53 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-$OpenBSD: patch-reedsolomon_cpp,v 1.1 2010/05/09 15:30:53 robert Exp $
---- reedsolomon.cpp.orig Sun May 9 17:26:56 2010
-+++ reedsolomon.cpp Sun May 9 17:28:12 2010
-@@ -51,7 +51,7 @@ u32 gcd(u32 a, u32 b)
- }
- }
-
--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 @@ bool ReedSolomon<Galois8>::SetInput(const vector<bool>
- return true;
- }
-
--bool ReedSolomon<Galois8>::SetInput(u32 count)
-+template<> bool ReedSolomon<Galois8>::SetInput(u32 count)
- {
- inputcount = count;
-
-@@ -101,7 +101,7 @@ bool ReedSolomon<Galois8>::SetInput(u32 count)
- 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 @@ bool ReedSolomon<Galois8>::Process(size_t size, u32 in
-
- // 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 @@ bool ReedSolomon<Galois16>::SetInput(const vector<bool
-
- // 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 @@ bool ReedSolomon<Galois16>::SetInput(u32 count)
- 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
-
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/archivers/par2cmdline/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 24 Jul 2004 14:20:49 -0000 1.2
+++ pkg/PLIST 5 May 2015 20:09:06 -0000
@@ -1,4 +1,8 @@
@comment $OpenBSD: PLIST,v 1.2 2004/07/24 14:20:49 espie Exp $
-bin/par2
+@bin bin/par2
+bin/par2create
+bin/par2repair
+bin/par2verify
+@man man/man1/par2.1
share/doc/par2cmdline/
share/doc/par2cmdline/README