pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/libmpg123 Import libmpg123-1.5.1. This package ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a2cb506d2e6
branches:  trunk
changeset: 546711:0a2cb506d2e6
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Sun Sep 07 00:56:15 2008 +0000

description:
Import libmpg123-1.5.1.  This package provides the mpg123 project's
core decoder library, which the new mpg123 package will depend on.
Other software packages are beginning to write plug-ins for this
library, and so installing it seperately is worthwhile.

NOTE: I have encountered segfaults when attempting to use the jack
module, which is threaded, with mpg123 unless I linked mpg123 with
libpthread.  This may or may not apply to the library, though my
intuition is that it does not, as obviously the executable is
what calls lt_dlopen().  Thus, for now the Makefile and b3.mk of the
executable will pull in dlopen.buildlink3.mk, setting
DLOPEN_REQUIRE_PTHREADS=yes as necessary (last time I checked on
NetBSD 4.99, it was).

diffstat:

 audio/libmpg123/DESCR            |   1 +
 audio/libmpg123/Makefile         |  50 ++++++++++++++++++++++++++++++++++++++++
 audio/libmpg123/Makefile.version |   4 +++
 audio/libmpg123/PLIST            |   3 ++
 audio/libmpg123/buildlink3.mk    |  19 +++++++++++++++
 audio/libmpg123/distinfo         |   9 +++++++
 audio/libmpg123/options.mk       |  38 ++++++++++++++++++++++++++++++
 audio/libmpg123/patches/patch-aa |  17 +++++++++++++
 audio/libmpg123/patches/patch-ab |  22 +++++++++++++++++
 audio/libmpg123/patches/patch-ac |  13 ++++++++++
 audio/libmpg123/patches/patch-ad |  33 ++++++++++++++++++++++++++
 11 files changed, 209 insertions(+), 0 deletions(-)

diffs (253 lines):

diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/DESCR     Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,1 @@
+This package provides the mpg123 project's core decoder library.
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/Makefile  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+#
+
+.include "../../audio/libmpg123/Makefile.version"
+
+DISTNAME=      mpg123-${MPG123_VERSION}
+CATEGORIES=    audio
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mpg123/}
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    bjs%NetBSD.org@localhost
+HOMEPAGE=      http://mpg123.sourceforge.net/
+COMMENT=       MPEG layer 1, 2, and 3 decoder library
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+GNU_CONFIGURE= yes
+USE_TOOLS+=    pkg-config
+USE_LIBTOOL=   yes
+
+PKGCONFIG_OVERRIDE+=   libmpg123.pc.in
+
+BUILD_DIRS=            src/libmpg123
+INSTALL_DIRS=          src/libmpg123
+
+CONFIGURE_ARGS+=       --enable-fifo=yes
+CONFIGURE_ARGS+=       --enable-modules=yes
+CONFIGURE_ARGS+=       --enable-network=yes
+CONFIGURE_ARGS+=       --enable-gapless=yes
+###
+### XXX Use pkgsrc-provided CFLAGS.
+###
+CONFIGURE_ARGS+=       --with-optimization=0
+CFLAGS+=               ${COPTS.mpg123:U${COPTS}}
+###
+### XXX This should be set to 'no' for platforms where it is required.
+###    It's easier doing this here than patching configure.
+MPG123_XFERMEM?=       yes
+.if !empty(MPG123_XFERMEM:tl:Myes)
+BUILDLINK_TRANSFORM+=  rm:-DNO_XFERMEM
+.endif
+
+LIBMPG123_PCDIR=       ${PREFIX}/lib/pkgconfig
+post-install:
+       ${INSTALL_DATA_DIR} ${DESTDIR}${LIBMPG123_PCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/libmpg123.pc ${DESTDIR}${LIBMPG123_PCDIR}
+
+.include "options.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/Makefile.version
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/Makefile.version  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,4 @@
+# $NetBSD: Makefile.version,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+#
+
+MPG123_VERSION=        1.5.1
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/PLIST     Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+include/mpg123.h
+lib/libmpg123.la
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/buildlink3.mk     Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
+MPG123_BUILDLINK3_MK:= ${MPG123_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+=    mpg123
+.endif
+
+BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Nmpg123}
+BUILDLINK_PACKAGES+=   mpg123
+BUILDLINK_ORDER:=      ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}mpg123
+
+.if ${MPG123_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.mpg123+= mpg123>=1.5.1
+BUILDLINK_PKGSRCDIR.mpg123?=   ../../audio/libmpg123
+.endif # MPG123_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:S/+$//}
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/distinfo  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+SHA1 (mpg123-1.5.1.tar.bz2) = 4e85388294c5c432bd899bb910694dd259e76679
+RMD160 (mpg123-1.5.1.tar.bz2) = aeaf5ab770eeb66826d81ba3d840492709b2c7a5
+Size (mpg123-1.5.1.tar.bz2) = 1033406 bytes
+SHA1 (patch-aa) = faf686e1b47bc53ef5155129da2fd0b81632c2f9
+SHA1 (patch-ab) = 7d1d36cf5ea4a3e3d0a43da351ac7e3c97c636bf
+SHA1 (patch-ac) = 751f52278354413e11f857c53e954e2fd56ba06b
+SHA1 (patch-ad) = 2b888b710499308216a90d48036c1d00327033e3
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/options.mk        Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,38 @@
+# $NetBSD: options.mk,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+#
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.libmp123
+PKG_SUPPORTED_OPTIONS= inet6 debug
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "i386"
+PKG_SUPPORTED_OPTIONS+=        simd
+.elif !empty(MACHINE_ARCH:Marm*)
+PKG_SUPPORTED_OPTIONS+=        mpg123-arm-fixed64
+.endif
+
+PKG_SUGGESTED_OPTIONS= ${PKG_SUPPORTED_OPTIONS}
+
+.include "../../mk/bsd.options.mk"
+
+SIMD_CONFIGURE_ARGS.powerpc=   altvec
+SIMD_CONFIGURE_ARGS.i386=      x86_dither
+
+.if empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --with-ipv6=no
+.endif
+
+.if !empty(PKG_OPTIONS:Msimd)
+CONFIGURE_ARGS+=       --with-cpu=${SIMD_CONFIGURE_ARGS.${MACHINE_ARCH}}
+.elif !empty(PKG_OPTIONS:Mmpg123-arm-fixed64)
+CONFIGURE_ARGS+=       --with-cpu=generic_nofpu
+.else
+CONFIGURE_ARGS+=       --with-cpu=generic_fpu
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+=       --enable-debug=yes
+.else
+CONFIGURE_ARGS+=       --enable-debug=no
+.endif
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/patches/patch-aa  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+--- src/output/esd.c.orig      2008-08-29 02:43:51.000000000 -0400
++++ src/output/esd.c
+@@ -18,6 +18,12 @@
+ #endif
+ #include "debug.h"
+ 
++#ifdef NETBSD
++#include <sys/ioctl.h>
++#include <sys/audioio.h>
++#endif
++
++
+ static unsigned esd_rate = 0, esd_format = 0, esd_channels = 0;
+ 
+ 
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/patches/patch-ab  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+--- src/output/oss.c.orig      2008-08-29 02:43:51.000000000 -0400
++++ src/output/oss.c
+@@ -167,7 +167,7 @@ static int open_oss(audio_output_t *ao)
+       if(!ao) return -1;
+       
+       if(!ao->device) {
+-              ao->device = "/dev/dsp";
++              ao->device = DEVOSSAUDIO;
+               usingdefdev = 1;
+       }
+       
+@@ -176,7 +176,7 @@ static int open_oss(audio_output_t *ao)
+       if(ao->fn < 0)
+       {
+               if(usingdefdev) {
+-                      ao->device = "/dev/sound/dsp";
++                      ao->device = DEVOSSSOUND;
+                       ao->fn = open(ao->device,O_WRONLY);
+                       if(ao->fn < 0) {
+                               if(!AOQUIET) error("Can't open default sound device!");
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/patches/patch-ac  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+--- src/term.c.orig    2008-08-29 02:43:56.000000000 -0400
++++ src/term.c
+@@ -196,7 +196,7 @@ static void term_handle_input(mpg123_han
+   while(n > 0) {
+     fd_set r;
+     struct timeval t;
+-    char val;
++    unsigned char val;
+ 
+     t.tv_sec=0;
+     t.tv_usec=(do_delay) ? 10*1000 : 0;
diff -r 1470b9057331 -r 0a2cb506d2e6 audio/libmpg123/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libmpg123/patches/patch-ad  Sun Sep 07 00:56:15 2008 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/09/07 00:56:15 bjs Exp $
+
+--- src/xfermem.c.orig 2008-08-29 02:43:56.000000000 -0400
++++ src/xfermem.c
+@@ -37,6 +37,13 @@ void xfermem_init (txfermem **xf, size_t
+ 
+ #ifdef HAVE_MMAP
+ #  ifdef MAP_ANON
++
++#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104030000)
++      if(madvise((void *)xf, (regsize - sizeof(txfermem)), 
++                  MADV_SEQUENTIAL) < 0)
++              fprintf(stderr,"madvise failed, continuing anyway...\n");
++#endif
++
+       if ((*xf = (txfermem *) mmap(0, regsize, PROT_READ | PROT_WRITE,
+                       MAP_ANON | MAP_SHARED, -1, 0)) == (txfermem *) -1) {
+               perror ("mmap()");
+@@ -92,7 +99,13 @@ void xfermem_done (txfermem *xf)
+       if(!xf)
+               return;
+ #ifdef HAVE_MMAP
+-      munmap ((caddr_t) xf, xf->size + xf->metasize + sizeof(txfermem));
++      munmap ((void *) xf, xf->size + xf->metasize + sizeof(txfermem));
++
++#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104030000)
++      if(madvise((void *)xf, (xf->size + xf->metasize), MADV_FREE) < 0)
++              fprintf(stderr,"madvise failed, continuing anyways..\n");
++#endif
++
+ #else
+       if (shmdt((void *) xf) == -1) {
+               perror ("shmdt()");



Home | Main Index | Thread Index | Old Index