Hi.

This diff updates libaudiofile to its latest release.
This work started during sl2k11 but there was still a lot of regressions with 
the 0.3.X at that time. I believe all are fixed with this release.
All direct dependencies are happy with it and make regress passes all tests.

Comments/OK?

-- 
Antoine
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libaudiofile/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- Makefile    15 Nov 2010 19:45:59 -0000      1.38
+++ Makefile    12 Jan 2012 08:34:48 -0000
@@ -2,12 +2,13 @@
 
 COMMENT=       SGI audiofile library clone
 
-DISTNAME=      audiofile-0.2.6
+V=             0.3.3
+SUBST_VARS=    V
+DISTNAME=      audiofile-${V}
 PKGNAME=       lib${DISTNAME}
-REVISION =     2
-SHARED_LIBS += audiofile            0.2      # .0.2
+SHARED_LIBS += audiofile 1.0
 CATEGORIES=    devel audio
-MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/audiofile/0.2/}
+MASTER_SITES=  ${HOMEPAGE}
 
 HOMEPAGE=      http://www.68k.org/~michael/audiofile/
 
@@ -16,13 +17,22 @@
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               c m
+
+WANTLIB += c m stdc++
 
 USE_LIBTOOL=   Yes
 
 SEPARATE_BUILD=        simple
+
 CONFIGURE_STYLE= gnu
-CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
+CONFIGURE_ENV= ac_cv_path_ASCIIDOC=no
+CONFIGURE_ARGS=        ${CONFIGURE_SHARED}
+
+# audiofile-config is still needed by audio/normalize and devel/libspectrum
+post-install:
+       ${SUBST_CMD} -o ${BINOWN} -g ${BINGRP} -c ${FILESDIR}/audiofile-config \
+               ${PREFIX}/bin/audiofile-config
+       chmod ${BINMODE} ${PREFIX}/bin/audiofile-config
 
 do-regress:
        @cd ${WRKBUILD}/test && ${MAKE_PROGRAM} ${ALL_REGRESS_FLAGS} check
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/libaudiofile/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo    5 Apr 2007 15:37:55 -0000       1.6
+++ distinfo    12 Jan 2012 08:34:48 -0000
@@ -1,5 +1,5 @@
-MD5 (audiofile-0.2.6.tar.gz) = nBBJh2zVHA8bEsKIbM5NQg==
-RMD160 (audiofile-0.2.6.tar.gz) = th+8hWdopYOMpcD61gLzUgXo0Dc=
-SHA1 (audiofile-0.2.6.tar.gz) = lKarjlEivBlxzxhuWlLQMoEcm8U=
-SHA256 (audiofile-0.2.6.tar.gz) = S2FntW4hVW+wfJ7waWL+MoFwZMYhgbpHr9MyLg0PIqk=
-SIZE (audiofile-0.2.6.tar.gz) = 374688
+MD5 (audiofile-0.3.3.tar.gz) = ZMegMCO0sYHZl/8LJy0p5A==
+RMD160 (audiofile-0.3.3.tar.gz) = yrL69q5CAjYW3pvktZw/tePG7uc=
+SHA1 (audiofile-0.3.3.tar.gz) = 97fwB+XFxHj5uz/tNTShBcvR6IQ=
+SHA256 (audiofile-0.3.3.tar.gz) = +En5LoePxlbAEm30NsIjicIMYntUH1RD7CynFh74p+I=
+SIZE (audiofile-0.3.3.tar.gz) = 721989
Index: files/audiofile-config
===================================================================
RCS file: files/audiofile-config
diff -N files/audiofile-config
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/audiofile-config      12 Jan 2012 08:34:48 -0000
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+prefix=${TRUEPREFIX}
+exec_prefix=${prefix}
+exec_prefix_set=no
+
+usage="\
+Usage: audiofile-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] 
[--libs] [--cflags]"
+
+if test $# -eq 0; then
+      echo "${usage}" 1>&2
+      exit 1
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      if test $exec_prefix_set = no ; then
+        exec_prefix=$optarg
+      fi
+      ;;
+    --prefix)
+      echo $prefix
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      exec_prefix_set=yes
+      ;;
+    --exec-prefix)
+      echo $exec_prefix
+      ;;
+    --version)
+      echo ${V}
+      ;;
+    --cflags)
+      if test ${prefix}/include != /usr/include ; then
+        includes=-I${prefix}/include
+      fi
+      echo $includes
+      ;;
+    --libs)
+      libdirs=-L${exec_prefix}/lib
+      echo $libdirs -laudiofile
+      ;;
+    *)
+      echo "${usage}" 1>&2
+      exit 1
+      ;;
+  esac
+  shift
+done
+
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in   24 Feb 2004 23:23:27 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.3 2004/02/24 23:23:27 brad Exp $
---- Makefile.in.orig   2003-12-21 16:44:56.000000000 -0500
-+++ Makefile.in        2004-02-24 18:08:20.000000000 -0500
-@@ -89,7 +89,7 @@ bin_SCRIPTS = \
-          audiofile-config
- 
- 
--SRC_SUBDIRS = libaudiofile sfcommands test examples
-+SRC_SUBDIRS = libaudiofile sfcommands
- SUBDIRS = $(SRC_SUBDIRS) docs win32
- 
- EXTRA_DIST = \
Index: patches/patch-audiofile_m4
===================================================================
RCS file: patches/patch-audiofile_m4
diff -N patches/patch-audiofile_m4
--- patches/patch-audiofile_m4  22 Dec 2008 20:28:18 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-audiofile_m4,v 1.1 2008/12/22 20:28:18 naddy Exp $
---- audiofile.m4.orig  Mon Dec 22 21:07:40 2008
-+++ audiofile.m4       Mon Dec 22 21:08:05 2008
-@@ -9,7 +9,7 @@
- dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, 
ACTION-IF-NOT-FOUND]]])
- dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and 
AUDIOFILE_LIBS.
- dnl
--AC_DEFUN(AM_PATH_AUDIOFILE,
-+AC_DEFUN([AM_PATH_AUDIOFILE],
- [dnl 
- dnl Get compiler flags and libraries from the audiofile-config script.
- dnl
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure     24 Feb 2004 23:23:27 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-configure,v 1.2 2004/02/24 23:23:27 brad Exp $
---- configure.orig     2003-12-21 16:45:36.000000000 -0500
-+++ configure  2004-02-24 18:06:49.000000000 -0500
-@@ -5399,8 +5399,8 @@ else
-     hardcode_direct=yes
-     hardcode_shlibpath_var=no
-     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
--      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs 
$linker_flags'
--      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs 
$compiler_flags'
-+      hardcode_libdir_flag_spec='${wl}-R$libdir'
-       export_dynamic_flag_spec='${wl}-E'
-     else
-       case "$host_os" in
-@@ -5409,8 +5409,8 @@ else
-       hardcode_libdir_flag_spec='-R$libdir'
-         ;;
-       *)
--        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs 
$linker_flags'
--        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs 
$compiler_flags'
-+        hardcode_libdir_flag_spec='${wl}-R$libdir'
-         ;;
-       esac
-     fi
-@@ -5929,6 +5929,8 @@ openbsd*)
-   version_type=sunos
-   need_lib_prefix=no
-   need_version=no
-+  sys_lib_search_path_spec="/usr/lib"
-+  sys_lib_dlsearch_path_spec="/usr/lib /usr/local/lib"
-   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-     case "$host_os" in
-     openbsd2.[89] | openbsd2.[89].*)
Index: patches/patch-libaudiofile_Makefile_in
===================================================================
RCS file: patches/patch-libaudiofile_Makefile_in
diff -N patches/patch-libaudiofile_Makefile_in
--- patches/patch-libaudiofile_Makefile_in      2 Jan 2006 18:15:53 -0000       
1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-libaudiofile_Makefile_in,v 1.2 2006/01/02 18:15:53 bernd Exp $
---- libaudiofile/Makefile.in.orig      Sat Mar  6 08:40:08 2004
-+++ libaudiofile/Makefile.in   Mon Jan  2 16:27:06 2006
-@@ -114,8 +114,8 @@ libaudiofile_la_SOURCES = \
- 
- libaudiofile_la_LIBADD = modules/libmodules.la
- 
--libaudiofile_la_LDFLAGS = -version-info 0:2:0 -no-undefined \
--      -export-symbols audiofile.exports
-+libaudiofile_la_LDFLAGS = $(LIBaudiofile_LTVERSION) -no-undefined \
-+      -export-symbols $(srcdir)/audiofile.exports
- 
- 
- include_HEADERS = audiofile.h aupvlist.h af_vfs.h
Index: patches/patch-libaudiofile_modules_msadpcm_c
===================================================================
RCS file: patches/patch-libaudiofile_modules_msadpcm_c
diff -N patches/patch-libaudiofile_modules_msadpcm_c
--- patches/patch-libaudiofile_modules_msadpcm_c        12 Jan 2009 16:15:03 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-libaudiofile_modules_msadpcm_c,v 1.1 2009/01/12 16:15:03 
jasper Exp $
-
-Security fix for CVE-2008-5824
-Patch taken from the Debian bug report, #510205. 
-
---- libaudiofile/modules/msadpcm.c.orig        Mon Jan 12 17:05:16 2009
-+++ libaudiofile/modules/msadpcm.c     Mon Jan 12 17:06:05 2009
-@@ -129,8 +129,7 @@ static int ms_adpcm_decode_block (ms_adpcm_data *msadp
-       ms_adpcm_state  *state[2];
- 
-       /* Calculate the number of bytes needed for decoded data. */
--      outputLength = msadpcm->samplesPerBlock * sizeof (int16_t) *
--              msadpcm->track->f.channelCount;
-+      outputLength = msadpcm->samplesPerBlock * sizeof (int16_t);
- 
-       channelCount = msadpcm->track->f.channelCount;
- 
-@@ -180,8 +179,7 @@ static int ms_adpcm_decode_block (ms_adpcm_data *msadp
-               The first two samples have already been 'decoded' in
-               the block header.
-       */
--      samplesRemaining = (msadpcm->samplesPerBlock - 2) *
--              msadpcm->track->f.channelCount;
-+      samplesRemaining = msadpcm->samplesPerBlock - 2;
- 
-       while (samplesRemaining > 0)
-       {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/libaudiofile/pkg/PLIST,v
retrieving revision 1.10
diff -u -r1.10 PLIST
--- pkg/PLIST   12 Jan 2009 16:15:03 -0000      1.10
+++ pkg/PLIST   12 Jan 2012 08:34:48 -0000
@@ -9,6 +9,29 @@
 lib/libaudiofile.la
 lib/pkgconfig/
 lib/pkgconfig/audiofile.pc
-share/aclocal/
-share/aclocal/audiofile.m4
+@man man/man1/sfconvert.1
+@man man/man1/sfinfo.1
+@man man/man3/afCloseFile.3
+@man man/man3/afGetDataOffset.3
+@man man/man3/afGetFrameCount.3
+@man man/man3/afGetFrameSize.3
+@man man/man3/afGetTrackBytes.3
+@man man/man3/afNewFileSetup.3
+@man man/man3/afOpenFile.3
+@man man/man3/afQuery.3
+@man man/man3/afQueryDouble.3
+@man man/man3/afQueryLong.3
+@man man/man3/afQueryPointer.3
+@man man/man3/afReadFrames.3
+@man man/man3/afReadMisc.3
+@man man/man3/afSeekFrame.3
+@man man/man3/afSeekMisc.3
+@man man/man3/afSetErrorHandler.3
+@man man/man3/afSetVirtualByteOrder.3
+@man man/man3/afSetVirtualChannels.3
+@man man/man3/afSetVirtualPCMMapping.3
+@man man/man3/afSetVirtualSampleFormat.3
+@man man/man3/afTellFrame.3
+@man man/man3/afWriteFrames.3
+@man man/man3/afWriteMisc.3
 %%SHARED%%

Reply via email to