[Midnightbsd-cvs] mports [17481] trunk/audio/alsa-lib: add python support to alsa-lib
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Sep 24 07:59:07 EDT 2014
Revision: 17481
http://svnweb.midnightbsd.org/mports/?rev=17481
Author: laffer1
Date: 2014-09-24 07:59:07 -0400 (Wed, 24 Sep 2014)
Log Message:
-----------
add python support to alsa-lib
Modified Paths:
--------------
trunk/audio/alsa-lib/Makefile
trunk/audio/alsa-lib/pkg-plist
Added Paths:
-----------
trunk/audio/alsa-lib/files/byteswap.h
trunk/audio/alsa-lib/files/malloc.h
trunk/audio/alsa-lib/files/patch-include__pcm.h
trunk/audio/alsa-lib/files/patch-src__async.c
trunk/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
trunk/audio/alsa-lib/files/patch-src__timer__timer_hw.c
Modified: trunk/audio/alsa-lib/Makefile
===================================================================
--- trunk/audio/alsa-lib/Makefile 2014-09-24 11:54:39 UTC (rev 17480)
+++ trunk/audio/alsa-lib/Makefile 2014-09-24 11:59:07 UTC (rev 17481)
@@ -2,7 +2,7 @@
PORTNAME= alsa-lib
PORTVERSION= 1.0.28
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= ALSA/lib \
GENTOO/distfiles
@@ -10,16 +10,25 @@
MAINTAINER= ports at MidnightBSD.org
COMMENT= ALSA compatibility library
-LICENSE= lgpl
+LICENSE= lgpl2.1
USES= tar:bzip2 libtool:keepla
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+=--disable-aload --disable-python \
- --with-pkgconfdir="${PREFIX}/libdata/pkgconfig"
+CONFIGURE_ARGS+= --with-pkgconfdir="${PREFIX}/libdata/pkgconfig"
+INSTALL_TARGET= install-strip
+CPPFLAGS+= -I${FILESDIR}
+OPTIONS_DEFINE= PYTHON
+OPTIONS_SUB= yes
+
+PYTHON_CONFIGURE_ENABLE=python
+PYTHON_USE= PYTHON=2
+
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \
+ -e 's/python-config/${PYTHON_CMD:T}-config/g' \
+ -e '/pythonlibs/s/--libs/--ldflags/' \
-e '/-D_GNU_SOURCE/d' \
-e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure
${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \
Added: trunk/audio/alsa-lib/files/byteswap.h
===================================================================
--- trunk/audio/alsa-lib/files/byteswap.h (rev 0)
+++ trunk/audio/alsa-lib/files/byteswap.h 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,13 @@
+#ifndef _BYTESWAP_H
+#define _BYTESWAP_H
+
+#ifdef __OpenBSD__
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+#else
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
+#endif
+#endif /* _BYTESWAP_H */
Property changes on: trunk/audio/alsa-lib/files/byteswap.h
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/audio/alsa-lib/files/malloc.h
===================================================================
--- trunk/audio/alsa-lib/files/malloc.h (rev 0)
+++ trunk/audio/alsa-lib/files/malloc.h 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,4 @@
+#ifndef _MALLOC_H
+#define _MALLOC_H
+#include <stdlib.h>
+#endif /* _MALLOC_H */
Property changes on: trunk/audio/alsa-lib/files/malloc.h
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/audio/alsa-lib/files/patch-include__pcm.h
===================================================================
--- trunk/audio/alsa-lib/files/patch-include__pcm.h (rev 0)
+++ trunk/audio/alsa-lib/files/patch-include__pcm.h 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,16 @@
+--- include/pcm.h~
++++ include/pcm.h
+@@ -29,6 +29,13 @@
+ #ifndef __ALSA_PCM_H
+ #define __ALSA_PCM_H
+
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
Property changes on: trunk/audio/alsa-lib/files/patch-include__pcm.h
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/audio/alsa-lib/files/patch-src__async.c
===================================================================
--- trunk/audio/alsa-lib/files/patch-src__async.c (rev 0)
+++ trunk/audio/alsa-lib/files/patch-src__async.c 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,28 @@
+$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
+
+--- src/async.c~
++++ src/async.c
+@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
+
+ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
+ {
++#if defined(__DragonFly__) || defined(__FreeBSD__)
++ /* XXX XXX XXX */
++ struct list_head *i;
++ list_for_each(i, &snd_async_handlers) {
++ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
++ if (h->callback)
++ h->callback(h);
++ }
++#else
+ int fd;
+ struct list_head *i;
+ //assert(siginfo->si_code == SI_SIGIO);
+@@ -60,6 +69,7 @@ static void snd_async_handler(int signo
+ if (h->fd == fd && h->callback)
+ h->callback(h);
+ }
++#endif
+ }
+
+ /**
Property changes on: trunk/audio/alsa-lib/files/patch-src__async.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
===================================================================
--- trunk/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c (rev 0)
+++ trunk/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,19 @@
+--- src/pcm/pcm_direct.c~
++++ src/pcm/pcm_direct.c
+@@ -44,12 +44,16 @@
+ *
+ */
+
++#if defined(__NetBSD__)
++typedef __semun semun;
++#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ union semun {
+ int val; /* Value for SETVAL */
+ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
+ unsigned short *array; /* Array for GETALL, SETALL */
+ struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
+ };
++#endif
+
+ /*
+ * FIXME:
Property changes on: trunk/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/audio/alsa-lib/files/patch-src__timer__timer_hw.c
===================================================================
--- trunk/audio/alsa-lib/files/patch-src__timer__timer_hw.c (rev 0)
+++ trunk/audio/alsa-lib/files/patch-src__timer__timer_hw.c 2014-09-24 11:59:07 UTC (rev 17481)
@@ -0,0 +1,15 @@
+--- src/timer/timer_hw.c~
++++ src/timer/timer_hw.c
+@@ -91,10 +91,12 @@ static int snd_timer_hw_async(snd_timer_
+ }
+ if (sig < 0)
+ return 0;
++#ifdef F_SETSIG
+ if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
+ SYSERR("F_SETSIG failed");
+ return -errno;
+ }
++#endif
+ if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
+ SYSERR("F_SETOWN failed");
+ return -errno;
Property changes on: trunk/audio/alsa-lib/files/patch-src__timer__timer_hw.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/audio/alsa-lib/pkg-plist
===================================================================
--- trunk/audio/alsa-lib/pkg-plist 2014-09-24 11:54:39 UTC (rev 17480)
+++ trunk/audio/alsa-lib/pkg-plist 2014-09-24 11:59:07 UTC (rev 17481)
@@ -40,6 +40,8 @@
lib/alsa-lib/smixer/smixer-ac97.so
lib/alsa-lib/smixer/smixer-hda.la
lib/alsa-lib/smixer/smixer-hda.so
+%%PYTHON%%lib/alsa-lib/smixer/smixer-python.la
+%%PYTHON%%lib/alsa-lib/smixer/smixer-python.so
lib/alsa-lib/smixer/smixer-sbase.la
lib/alsa-lib/smixer/smixer-sbase.so
lib/libasound.la
@@ -83,6 +85,7 @@
share/alsa/cards/ICH-MODEM.conf
share/alsa/cards/ICH.conf
share/alsa/cards/ICH4.conf
+share/alsa/cards/Loopback.conf
share/alsa/cards/Maestro3.conf
share/alsa/cards/NFORCE.conf
share/alsa/cards/PC-Speaker.conf
@@ -118,6 +121,7 @@
share/alsa/pcm/modem.conf
share/alsa/pcm/rear.conf
share/alsa/pcm/side.conf
+share/alsa/pcm/surround21.conf
share/alsa/pcm/surround40.conf
share/alsa/pcm/surround41.conf
share/alsa/pcm/surround50.conf
More information about the Midnightbsd-cvs
mailing list