pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/jack-devel NetBSD _should_ use the barrier threa...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c063e5b21e60
branches: trunk
changeset: 539923:c063e5b21e60
user: bjs <bjs%pkgsrc.org@localhost>
date: Mon Mar 17 02:31:10 2008 +0000
description:
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:
audio/jack-devel/Makefile | 10 +++++++++-
audio/jack-devel/PLIST | 6 +++---
audio/jack-devel/distinfo | 10 ++++++----
audio/jack-devel/patches/patch-aa | 17 +++++++++++++++++
audio/jack-devel/patches/patch-ab | 26 ++++++++++++++------------
audio/jack-devel/patches/patch-ai | 25 +++++++++++++++++++++----
audio/jack-devel/patches/patch-aj | 22 +++++++++++++++++++---
audio/jack-devel/patches/patch-ap | 22 ++++++++++++++++++++++
8 files changed, 111 insertions(+), 27 deletions(-)
diffs (264 lines):
diff -r c270c345c97e -r c063e5b21e60 audio/jack-devel/Makefile
--- a/audio/jack-devel/Makefile Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/Makefile Mon Mar 17 02:31:10 2008 +0000
@@ -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 @@
PTHREAD_OPTS+= require native
CFLAGS.NetBSD+= -DJACKD_WATCHDOG_TIMEOUT=900
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
JACKD_PROCFS_PATH?= /proc
@@ -64,6 +66,12 @@
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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/PLIST
--- a/audio/jack-devel/PLIST Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/PLIST Mon Mar 17 02:31:10 2008 +0000
@@ -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/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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/distinfo
--- a/audio/jack-devel/distinfo Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/distinfo Mon Mar 17 02:31:10 2008 +0000
@@ -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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/jack-devel/patches/patch-aa Mon Mar 17 02:31:10 2008 +0000
@@ -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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/patches/patch-ab
--- a/audio/jack-devel/patches/patch-ab Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/patches/patch-ab Mon Mar 17 02:31:10 2008 +0000
@@ -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"
+@@ -19799,6 +19799,10 @@ case "${host_os}" in
+ # need small realtime stack
+ JACK_THREAD_STACK_TOUCH=10000
;;
-- openbsd*)
-+ openbsd*|netbsd*)
- # pthread_barrier* not implemented
- USE_BARRIER="no"
- # need small realtime stack
-@@ -23039,8 +23039,7 @@ fi
++ 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 @@
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 @@
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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/patches/patch-ai
--- a/audio/jack-devel/patches/patch-ai Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/patches/patch-ai Mon Mar 17 02:31:10 2008 +0000
@@ -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 @@
- 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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/patches/patch-aj
--- a/audio/jack-devel/patches/patch-aj Sun Mar 16 23:33:57 2008 +0000
+++ b/audio/jack-devel/patches/patch-aj Mon Mar 17 02:31:10 2008 +0000
@@ -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 -r c270c345c97e -r c063e5b21e60 audio/jack-devel/patches/patch-ap
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/jack-devel/patches/patch-ap Mon Mar 17 02:31:10 2008 +0000
@@ -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. */
+
+ /**
Home |
Main Index |
Thread Index |
Old Index