On 2017/05/14 09:44, Graham Stephens wrote:

This port diff switches to using libc's MD5 implementation
which I think should help. It creates a new patches/ directory,
use "patch -E -p0" to apply it (then make clean; make repackage;
make reinstall)..

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/wavpack/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile    1 Feb 2017 22:06:14 -0000       1.22
+++ Makefile    13 May 2017 21:54:58 -0000
@@ -3,6 +3,7 @@
 COMMENT =              audio codec for lossless, lossy and hybrid compression

 DISTNAME =             wavpack-5.1.0
+REVISION =             0
 CATEGORIES =           audio

 HOMEPAGE =             http://www.wavpack.com/
@@ -28,6 +29,9 @@ CONFIGURE_ENV =               CPPFLAGS="-I${LOCALBASE
                        LDFLAGS="-L${LOCALBASE}/lib"

 DOCDIR =               ${PREFIX}/share/doc/wavpack
+
+pre-configure:
+       sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c

 post-install:
        ${INSTALL_DATA_DIR} ${DOCDIR}
Index: patches/patch-cli_Makefile_in
===================================================================
RCS file: patches/patch-cli_Makefile_in
diff -N patches/patch-cli_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cli_Makefile_in       13 May 2017 21:54:58 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: cli/Makefile.in
+--- cli/Makefile.in.orig
++++ cli/Makefile.in
+@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
+ am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
+       wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
+       wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
+-      wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
++      wavpack-utils.$(OBJEXT) \
+       wavpack-import_id3.$(OBJEXT) $(am__objects_1)
+ wavpack_OBJECTS = $(am_wavpack_OBJECTS)
+ am__DEPENDENCIES_1 =
+@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
+-      utils.c md5.c import_id3.c $(am__append_1)
++      utils.c import_id3.c $(am__append_1)
+ wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
+ wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) 
$(ICONV_LIBS)
+ wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
+-      utils.c md5.c $(am__append_2)
++      utils.c $(am__append_2)
+ wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
+ wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) 
$(ICONV_LIBS)
+@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
+ wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
+ wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) 
$(ICONV_LIBS)
+-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
+ @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
+ @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) 
$(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread


Sorry Guys, I'm having trouble here...

cd to /usr/ports/audio/wavpack
copy patch to same

Running "patch -E -p0 < wavpack.patch" returns:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: Makefile
|===================================================================
|RCS file: /cvs/ports/audio/wavpack/Makefile,v
|retrieving revision 1.22
|diff -u -p -r1.22 Makefile
|--- Makefile   1 Feb 2017 22:06:14 -0000       1.22
|+++ Makefile   13 May 2017 21:54:58 -0000
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 3.
Hunk #2 failed at 29.
2 out of 2 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: patches/patch-cli_Makefile_in
|===================================================================
|RCS file: patches/patch-cli_Makefile_in
|diff -N patches/patch-cli_Makefile_in
|--- /dev/null  1 Jan 1970 00:00:00 -0000
|+++ patches/patch-cli_Makefile_in      13 May 2017 21:54:58 -0000
--------------------------
(Creating file patches/patch-cli_Makefile_in...)
Patching file patches/patch-cli_Makefile_in using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
done


I tried to make what changes I thought were necessary manually but obviously
failed as the repackage wouldn't work :(


I suspect your mail client may have mangled the diff. I would do this
to clean and fetch a fresh copy from the marc.info archive:

cd /usr/ports/audio/wavpack
rm Makefile patches/patch-*
cvs up -Pd
ftp -o- 'https://marc.info/?l=openbsd-ports&m=149471266205406&q=raw' | patch 
-Ep0

then clean/repackage/reinstall.

If it doesn't work, paste in the output from the "make clean" stage
onwards.


Thanks Guys,

Tested and working/matching against JF's sample.

Err... however - and I apologise for not thinking ahead and mentioning it earlier - but there's also a wvunpack program in the same package (with the opposite functionality). It was only when I came to test it against itself that I realised this might also be an issue. :(

Reply via email to