Here is an update to a snapshot of liba52 which was intended to be 0.7.5. The upstream project is essentially dead but I think the fixes and improvements since 0.7.4 are worth getting in.
Tested with a handful of DVDs on amd64 with Xine-lib and Ogle. All dependent ports build Ok. Index: Makefile =================================================================== RCS file: /home/cvs/ports/audio/liba52/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- Makefile 29 Mar 2012 13:38:13 -0000 1.17 +++ Makefile 15 May 2012 20:32:52 -0000 @@ -1,30 +1,32 @@ -#$OpenBSD: Makefile,v 1.17 2012/03/29 13:38:13 sthen Exp $ +# $OpenBSD: Makefile,v 1.17 2012/03/29 13:38:13 sthen Exp $ +COMMENT = free library for decoding ATSC A/52 streams, aka AC-3 + +DISTFILES = a52dec-snapshot.tar.gz +DISTNAME = a52dec-0.7.5-cvs +PKGNAME = liba52-0.7.5 CATEGORIES = audio +MASTER_SITES = http://comstyle.com/source/ + +SHARED_LIBS = a52 1.0 -COMMENT = AC-3 decoding library -DISTNAME = a52dec-0.7.4 -PKGNAME = liba52-0.7.4 -REVISION = 2 -MASTER_SITES = http://liba52.sourceforge.net/files/ HOMEPAGE = http://liba52.sourceforge.net/ -SHARED_LIBS += a52 0.0 # .0.0 MAINTAINER = Marc Espie <[email protected]> -CONFIGURE_STYLE = gnu -CONFIGURE_ARGS += ${CONFIGURE_SHARED} -MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/autotools -SEPARATE_BUILD = Yes -USE_LIBTOOL = Yes -USE_GROFF = Yes - -# GPL +# GPLv2+ PERMIT_DISTFILES_CDROM = Yes -PERMIT_DISTFILES_FTP = Yes -PERMIT_PACKAGE_CDROM = Yes -PERMIT_PACKAGE_FTP = Yes - -WANTLIB = c m ossaudio +PERMIT_DISTFILES_FTP = Yes +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes + +WANTLIB = c m ossaudio + +USE_LIBTOOL = Yes +SEPARATE_BUILD = Yes +CONFIGURE_STYLE = autoconf +AUTOCONF_VERSION = 2.59 +CONFIGURE_ARGS += ${CONFIGURE_SHARED} +MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/autotools .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /home/cvs/ports/audio/liba52/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 5 Apr 2007 15:37:43 -0000 1.5 +++ distinfo 3 Jul 2011 13:47:35 -0000 @@ -1,5 +1,5 @@ -MD5 (a52dec-0.7.4.tar.gz) = yqn1vEQjLciu6nc/6la+gA== -RMD160 (a52dec-0.7.4.tar.gz) = W2OzTFhA5xgrczytQekWqNSHXrE= -SHA1 (a52dec-0.7.4.tar.gz) = ebM72NidrXQ2+FuRVK01ZnqjcyE= -SHA256 (a52dec-0.7.4.tar.gz) = oh1ySrOzkzMwGUNTaH34LEdbXfuZdRPu9MJd5shl7DM= -SIZE (a52dec-0.7.4.tar.gz) = 241507 +MD5 (a52dec-snapshot.tar.gz) = FynHUH92sNTMBFQJJsXQ1w== +RMD160 (a52dec-snapshot.tar.gz) = d3yeskVYwXuHgAdyCjlzGpYKHHM= +SHA1 (a52dec-snapshot.tar.gz) = LmSHj9xbzXnia4AgnnpEOyAT6cE= +SHA256 (a52dec-snapshot.tar.gz) = kETGWygUNg+s8B1Ndn17M8oXRlQLNa3158bZDkeFb/4= +SIZE (a52dec-snapshot.tar.gz) = 389367 Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- patches/patch-configure 7 Feb 2006 07:43:11 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-configure,v 1.1 2006/02/07 07:43:11 steven Exp $ ---- configure.orig Sun Jul 28 05:50:42 2002 -+++ configure Tue Feb 7 01:03:57 2006 -@@ -2751,9 +2751,8 @@ if test x"$GCC" = x"yes"; then - - - -- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"` -+ OPT_CFLAGS="$CFLAGS" - -- OPT_CFLAGS="$OPT_CFLAGS -O3" - echo "$as_me:$LINENO: checking if $CC supports $OPT_CFLAGS flags" >&5 - echo $ECHO_N "checking if $CC supports $OPT_CFLAGS flags... $ECHO_C" >&6 - SAVE_CFLAGS="$CFLAGS" Index: patches/patch-configure_in =================================================================== RCS file: patches/patch-configure_in diff -N patches/patch-configure_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure_in 15 May 2012 06:34:23 -0000 @@ -0,0 +1,40 @@ +$OpenBSD$ +--- configure.in.orig Tue May 15 02:33:28 2012 ++++ configure.in Tue May 15 02:34:15 2012 +@@ -30,13 +30,6 @@ if test x"$GCC" = x"yes"; then + TRY_CFLAGS="$OPT_CFLAGS -Wall" + AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) + +- dnl -O3 +- changequote(<<,>>) +- TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"` +- changequote([,]) +- TRY_CFLAGS="$TRY_CFLAGS -O3" +- AC_TRY_CFLAGS([$TRY_CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"; CFLAGS=""]) +- + AC_ARG_ENABLE([debug], + [ --enable-debug debug mode configuration]) + if test x"$enable_debug" = x"yes"; then +@@ -50,22 +43,6 @@ if test x"$GCC" = x"yes"; then + dnl -fno-common + TRY_CFLAGS="$OPT_CFLAGS -fno-common" + AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) +- +- dnl arch-specific flags +- case "$host" in +- i?86-* | k?-*) +- case "$host" in +- i386-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i386";; +- i486-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i486";; +- i586-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentium";; +- i686-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentiumpro";; +- k6-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=k6";; +- esac +- AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; +- sparc-* | sparc64-*) +- TRY_CFLAGS="$OPT_CFLAGS -mtune=ultrasparc" +- AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; +- esac + elif test x"$CC" = x"tendracc"; then + dnl TenDRA portability checking compiler + TENDRA=yes Index: patches/patch-liba52_bitstream_c =================================================================== RCS file: /home/cvs/ports/audio/liba52/patches/patch-liba52_bitstream_c,v retrieving revision 1.3 diff -u -p -r1.3 patch-liba52_bitstream_c --- patches/patch-liba52_bitstream_c 22 Aug 2002 12:19:17 -0000 1.3 +++ patches/patch-liba52_bitstream_c 15 May 2012 06:23:22 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-liba52_bitstream_c,v 1.3 2002/08/22 12:19:17 espie Exp $ ---- liba52/bitstream.c.orig Sun Jul 28 03:52:06 2002 -+++ liba52/bitstream.c Thu Aug 22 13:51:10 2002 +--- liba52/bitstream.c.orig Sat May 31 20:28:55 2003 ++++ liba52/bitstream.c Tue May 15 02:19:52 2012 @@ -23,6 +23,7 @@ #include "config.h" @@ -20,4 +20,4 @@ $OpenBSD: patch-liba52_bitstream_c,v 1.3 + align = (ptrdiff_t)buf & 3; state->buffer_start = (uint32_t *) (buf - align); state->bits_left = 0; - bitstream_get (state, align * 8); + state->current_word = 0; Index: patches/patch-libao_audio_out_oss_c =================================================================== RCS file: /home/cvs/ports/audio/liba52/patches/patch-libao_audio_out_oss_c,v retrieving revision 1.3 diff -u -p -r1.3 patch-libao_audio_out_oss_c --- patches/patch-libao_audio_out_oss_c 22 Aug 2002 12:19:17 -0000 1.3 +++ patches/patch-libao_audio_out_oss_c 15 May 2012 06:25:09 -0000 @@ -1,15 +1,12 @@ $OpenBSD: patch-libao_audio_out_oss_c,v 1.3 2002/08/22 12:19:17 espie Exp $ ---- libao/audio_out_oss.c.orig Sun Apr 28 12:23:02 2002 -+++ libao/audio_out_oss.c Thu Aug 22 13:49:19 2002 -@@ -153,9 +153,9 @@ static ao_instance_t * oss_open (int fla - instance->set_params = 1; - instance->flags = flags; +--- libao/audio_out_oss.c.orig Sun Nov 30 19:24:58 2003 ++++ libao/audio_out_oss.c Tue May 15 02:24:59 2012 +@@ -48,7 +48,7 @@ + #include <sys/soundcard.h> + #endif -- instance->fd = open ("/dev/dsp", O_WRONLY); -+ instance->fd = open ("/dev/audio", O_WRONLY); - if (instance->fd < 0) { -- fprintf (stderr, "Can not open /dev/dsp\n"); -+ fprintf (stderr, "Can not open /dev/audio\n"); - free (instance); - return NULL; - } +-#if defined(__NetBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #define OSS_DEVICE "/dev/audio" + #else + #define OSS_DEVICE "/dev/dsp" Index: pkg/DESCR =================================================================== RCS file: /home/cvs/ports/audio/liba52/pkg/DESCR,v retrieving revision 1.2 diff -u -p -r1.2 DESCR --- pkg/DESCR 16 Aug 2003 16:52:09 -0000 1.2 +++ pkg/DESCR 15 May 2012 06:15:45 -0000 @@ -1 +1,3 @@ -AC-3 decoding library, to use with DVDs. +It is a free library for decoding ATSC A/52 streams, aka AC-3. The +A/52 standard is used in a variety of applications, e.g., digital +television and DVD. Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/audio/liba52/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 5 Aug 2004 03:28:12 -0000 1.4 +++ pkg/PLIST 15 May 2012 06:28:55 -0000 @@ -1,6 +1,7 @@ @comment $OpenBSD: PLIST,v 1.4 2004/08/05 03:28:12 espie Exp $ -bin/a52dec -bin/extract_a52 +%%SHARED%% +@bin bin/a52dec +@bin bin/extract_a52 include/a52dec/ include/a52dec/a52.h include/a52dec/attributes.h @@ -8,6 +9,7 @@ include/a52dec/audio_out.h include/a52dec/mm_accel.h lib/liba52.a lib/liba52.la +lib/pkgconfig/ +lib/pkgconfig/liba52.pc @man man/man1/a52dec.1 @man man/man1/extract_a52.1 -%%SHARED%% -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
