summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorbjs <bjs@pkgsrc.org>2008-03-17 02:31:10 +0000
committerbjs <bjs@pkgsrc.org>2008-03-17 02:31:10 +0000
commit2923ff7640d4e6e3b7272e1e366960ac253a4f51 (patch)
treec5041fa865110f369cc8b2f3797ed3b9f797df17 /audio
parentc60ff5c39de7a754d8b0eda945b9e57fec352377 (diff)
downloadpkgsrc-2923ff7640d4e6e3b7272e1e366960ac253a4f51.tar.gz
NetBSD _should_ use the barrier thread if available.
Note: This may screw up the OSS driver, but if you're using NetBSD, I recommend using the native sun audio driver. ;) Some type fixes. Autoconf glue and functions to use netbsd atomic ops. Conversion to pollts() for better accuracy. Bump rev.
Diffstat (limited to 'audio')
-rw-r--r--audio/jack-devel/Makefile10
-rw-r--r--audio/jack-devel/PLIST6
-rw-r--r--audio/jack-devel/distinfo10
-rw-r--r--audio/jack-devel/patches/patch-aa17
-rw-r--r--audio/jack-devel/patches/patch-ab26
-rw-r--r--audio/jack-devel/patches/patch-ai25
-rw-r--r--audio/jack-devel/patches/patch-aj22
-rw-r--r--audio/jack-devel/patches/patch-ap22
8 files changed, 111 insertions, 27 deletions
diff --git a/audio/jack-devel/Makefile b/audio/jack-devel/Makefile
index ef83f01f2a4..4ab70ef3d69 100644
--- a/audio/jack-devel/Makefile
+++ b/audio/jack-devel/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+# $NetBSD: Makefile,v 1.2 2008/03/17 02:31:10 bjs Exp $
#
DISTNAME= jack-0.109.10
PKGNAME= ${DISTNAME:C/jack/&-devel/}
+PKGREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tar.bz2
@@ -55,6 +56,7 @@ PKGCONFIG_OVERRIDE+= jack.pc.in
PTHREAD_OPTS+= require native
CFLAGS.NetBSD+= -DJACKD_WATCHDOG_TIMEOUT=900
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
JACKD_PROCFS_PATH?= /proc
@@ -64,6 +66,12 @@ SUBST_MESSAGE.jacksrc= Peforming substitutions in JACK sources.
SUBST_STAGE.jacksrc= pre-build
SUBST_VARS.jacksrc= PREFIX JACKD_PROCFS_PATH
+post-extract:
+ ${RUN} \
+ ${MKDIR} ${WRKSRC}/config/os/netbsd && \
+ ${CP} ${FILESDIR}/atomicity.h \
+ ${WRKSRC}/config/os/netbsd
+
.include "../../audio/libsamplerate/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
diff --git a/audio/jack-devel/PLIST b/audio/jack-devel/PLIST
index dafedebe728..7df1f3f5a51 100644
--- a/audio/jack-devel/PLIST
+++ b/audio/jack-devel/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/03/17 02:31:10 bjs Exp $
bin/jack_alias
bin/jack_bufsize
bin/jack_connect
@@ -31,8 +31,8 @@ lib/jack/inprocess.la
lib/jack/intime.la
lib/jack/jack_dummy.la
lib/jack/jack_net.la
-lib/jack/jack_oss.la
-lib/jack/jack_sun.la
+${OSS}lib/jack/jack_oss.la
+${SUN}lib/jack/jack_sun.la
lib/jack/netsource.la
lib/libjack.la
lib/libjackserver.la
diff --git a/audio/jack-devel/distinfo b/audio/jack-devel/distinfo
index 729109d5167..c773a17553c 100644
--- a/audio/jack-devel/distinfo
+++ b/audio/jack-devel/distinfo
@@ -1,18 +1,20 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+$NetBSD: distinfo,v 1.2 2008/03/17 02:31:10 bjs Exp $
SHA1 (jack-0.109.10.tar.bz2) = a82376dcb3610967eac82789dc543b64b9702e39
RMD160 (jack-0.109.10.tar.bz2) = 20efa1e19cbe74718c07b262de9e8af5f2f72e58
Size (jack-0.109.10.tar.bz2) = 577713 bytes
-SHA1 (patch-ab) = e7d7f7266afc5841ebf83ceb98fb7e4f0b821f05
+SHA1 (patch-aa) = 14e400acbfd3fdba20e137e032bccb0963c0517e
+SHA1 (patch-ab) = d2293459aaeddf96b3a429b2fb5280dc90abb3f7
SHA1 (patch-ac) = 7052322d44700b0bf81642a5e68ae53a3da62df1
SHA1 (patch-ad) = 9632ad3a03015688f02bc4b715d74e21ae293c8f
SHA1 (patch-ae) = a18c44b803e340d2b1317a539ffb2123490badc3
SHA1 (patch-af) = 6e7c16137434c601f09da982528f3f8c81bdd354
SHA1 (patch-ag) = e7a5e878cdd47355f8d6213163b8560939708f32
SHA1 (patch-ah) = b3445eea50978ff83b16fbe2cfe2f8d111fd67aa
-SHA1 (patch-ai) = aacea684a8d31cfb2e22087d425e5fd457ad215d
-SHA1 (patch-aj) = 46805c358c60a92d6d680a9ea847d32c15af1708
+SHA1 (patch-ai) = e01725f9cd38d05737ccc7ea6e43daa0acf03110
+SHA1 (patch-aj) = 243e7e0c1865c03c74f212bab0c7cab1201bf3c0
SHA1 (patch-ak) = 7d1eaa5cecc5f1c3b725ff768089dfd4a133ea45
SHA1 (patch-al) = fc7311171027b71cbd7572431f45d69ed81dcd92
SHA1 (patch-am) = c4d1d5562dace10971ef7fba37ddfcf07ad2fdb5
SHA1 (patch-an) = 90939c5e0a8a53bf701d93ba88a2900439866142
+SHA1 (patch-ap) = 8a963fdcbc8a986b2872b756684a70edc32ce5ce
diff --git a/audio/jack-devel/patches/patch-aa b/audio/jack-devel/patches/patch-aa
new file mode 100644
index 00000000000..8dccfd34a0f
--- /dev/null
+++ b/audio/jack-devel/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1 2008/03/17 02:31:10 bjs Exp $
+
+--- config/sysdeps/atomicity.h.orig 2006-05-15 13:12:44.000000000 -0400
++++ config/sysdeps/atomicity.h
+@@ -1,7 +1,11 @@
+ #ifndef _jack_sysdep_atomicity_h_
+ #define _jack_sysdep_atomicity_h_
+
+-#if defined(__i386__)
++#if defined(HAVE_NETBSD_ATOMIC_OPS)
++
++#include <config/os/netbsd/atomicity.h>
++
++#elif defined(__i386__)
+
+ #include <config/cpu/i386/atomicity.h>
+
diff --git a/audio/jack-devel/patches/patch-ab b/audio/jack-devel/patches/patch-ab
index d0ad6887db0..0da51cdcf50 100644
--- a/audio/jack-devel/patches/patch-ab
+++ b/audio/jack-devel/patches/patch-ab
@@ -1,17 +1,19 @@
-$NetBSD: patch-ab,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+$NetBSD: patch-ab,v 1.2 2008/03/17 02:31:10 bjs Exp $
--- configure.orig 2008-03-15 02:20:31.000000000 -0400
+++ configure
-@@ -19793,7 +19793,7 @@ case "${host_os}" in
- # barrier code, this may be fixed in 5.3, stay tuned.
- USE_BARRIER="no"
- ;;
-- openbsd*)
-+ openbsd*|netbsd*)
- # pthread_barrier* not implemented
- USE_BARRIER="no"
+@@ -19799,6 +19799,10 @@ case "${host_os}" in
# need small realtime stack
-@@ -23039,8 +23039,7 @@ fi
+ JACK_THREAD_STACK_TOUCH=10000
+ ;;
++ netbsd*)
++ # need small realtime stack
++ JACK_THREAD_STACK_TOUCH=10000
++ ;;
+ darwin*)
+ JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
+ JACK_CPP_VARARGS_BROKEN=1
+@@ -23039,8 +23043,7 @@ fi
JACK_CORE_CFLAGS="-I\$(top_srcdir)/config -I\$(top_srcdir) \
-I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g"
@@ -21,7 +23,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
JACK_CFLAGS="$JACK_CORE_CFLAGS $CFLAGS"
-@@ -23122,7 +23121,7 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -23122,7 +23125,7 @@ rm -f core conftest.err conftest.$ac_obj
fi
@@ -30,7 +32,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
-@@ -23294,14 +23293,14 @@ cat >>confdefs.h <<\_ACEOF
+@@ -23294,14 +23297,14 @@ cat >>confdefs.h <<\_ACEOF
#define x86 1
_ACEOF
diff --git a/audio/jack-devel/patches/patch-ai b/audio/jack-devel/patches/patch-ai
index 69aed2809fb..41010b3d778 100644
--- a/audio/jack-devel/patches/patch-ai
+++ b/audio/jack-devel/patches/patch-ai
@@ -1,4 +1,4 @@
-$NetBSD: patch-ai,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+$NetBSD: patch-ai,v 1.2 2008/03/17 02:31:10 bjs Exp $
--- jackd/engine.c.orig 2008-03-14 03:08:35.000000000 -0400
+++ jackd/engine.c
@@ -34,17 +34,34 @@ $NetBSD: patch-ai,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
- if (poll (pfd, 1, poll_timeout) < 0) {
- jack_error ("poll on subgraph processing failed (%s)",
-+ if (pollts (pfd, 1, &poll_timeout) < 0) {
++ if (pollts (pfd, 1, &poll_timeout, NULL) < 0) {
+ jack_error ("pollts on subgraph processing failed (%s)",
strerror (errno));
status = -1;
}
-@@ -1468,7 +1469,7 @@ jack_server_thread (void *arg)
+@@ -1424,6 +1425,7 @@ jack_server_thread (void *arg)
+ struct sockaddr_un client_addr;
+ socklen_t client_addrlen;
+ struct pollfd *pfd;
++ struct timespec poll_timeout = { 10, 0 };
+ int client_socket;
+ int done = 0;
+ int i;
+@@ -1441,7 +1443,7 @@ jack_server_thread (void *arg)
+ DEBUG ("start while");
+
+
+- if (poll (pfd, max, 10000) < 0) {
++ if (pollts (pfd, max, &poll_timeout, NULL) < 0) {
+ if (errno == EINTR) {
+ continue;
+ }
+@@ -1468,7 +1470,7 @@ jack_server_thread (void *arg)
(engine, pfd[i].fd)) {
jack_error ("could not handle external"
" client request");
-#ifdef JACK_USE_MACH_THREADS
-+#if defined(JACK_USE_MACH_THREADS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(JACK_USE_MACH_THREADS) || defined(__NetBSD__)
/* poll is implemented using
select (see the macosx/fakepoll
code). When the socket is closed
diff --git a/audio/jack-devel/patches/patch-aj b/audio/jack-devel/patches/patch-aj
index 5df88c14493..b0c965c469e 100644
--- a/audio/jack-devel/patches/patch-aj
+++ b/audio/jack-devel/patches/patch-aj
@@ -1,13 +1,29 @@
-$NetBSD: patch-aj,v 1.1.1.1 2008/03/16 09:26:46 bjs Exp $
+$NetBSD: patch-aj,v 1.2 2008/03/17 02:31:10 bjs Exp $
--- libjack/client.c.orig 2008-03-12 10:36:07.000000000 -0400
+++ libjack/client.c
-@@ -1896,14 +1896,14 @@ jack_activate (jack_client_t *client)
+@@ -1420,13 +1420,14 @@ static int
+ jack_client_core_wait (jack_client_t* client)
+ {
+ jack_client_control_t *control = client->control;
++ struct timespec poll_timeout = { 1, 0 };
+
+ DEBUG ("client polling on %s", client->pollmax == 2 ?
+ "event_fd and graph_wait_fd..." :
+ "event_fd only");
+
+ while (1) {
+- if (poll (client->pollfd, client->pollmax, 1000) < 0) {
++ if (pollts (client->pollfd, client->pollmax, &poll_timeout, NULL) < 0) {
+ if (errno == EINTR) {
+ continue;
+ }
+@@ -1896,14 +1897,14 @@ jack_activate (jack_client_t *client)
* pages are actually mapped (more important for mlockall(2)
* usage in jack_start_thread())
*/
-
-+#ifdef __gnu_linux__
++#if !defined(__NetBSD__)
char buf[JACK_THREAD_STACK_TOUCH];
int i;
diff --git a/audio/jack-devel/patches/patch-ap b/audio/jack-devel/patches/patch-ap
new file mode 100644
index 00000000000..3a03e689135
--- /dev/null
+++ b/audio/jack-devel/patches/patch-ap
@@ -0,0 +1,22 @@
+$NetBSD: patch-ap,v 1.1 2008/03/17 02:31:10 bjs Exp $
+
+--- jack/types.h.orig 2008-03-12 10:36:07.000000000 -0400
++++ jack/types.h
+@@ -23,7 +23,7 @@
+
+ #include <inttypes.h>
+
+-typedef int32_t jack_shmsize_t;
++typedef size_t jack_shmsize_t;
+
+ /**
+ * Type used to represent sample frame counts.
+@@ -33,7 +33,7 @@ typedef uint32_t jack_nframes_t;
+ /**
+ * Maximum value that can be stored in jack_nframes_t
+ */
+-#define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but
++#define JACK_MAX_FRAMES UINT32_MAX /* This should be UINT32_MAX, but
+ C++ has a problem with that. */
+
+ /**