diff options
author | skrll <skrll> | 2003-07-07 20:51:53 +0000 |
---|---|---|
committer | skrll <skrll> | 2003-07-07 20:51:53 +0000 |
commit | 935e32b6d1635a8e8abd574e673cbcbe50b33a37 (patch) | |
tree | ca316207382d0ba594a486e1d85aa2af2678442e /audio | |
parent | de2c824ded432a341dfb6a310dee6a28c395381c (diff) | |
download | pkgsrc-935e32b6d1635a8e8abd574e673cbcbe50b33a37.tar.gz |
Fix (at least) artsd on -current.
The s/mcop_mt/mcop/ hack that worked with pth doesn't work in -current.
Make libmcop_mt build with pre-current and pth by providing sem_* calls
based on a mutex and a condition variable.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/arts/Makefile | 4 | ||||
-rw-r--r-- | audio/arts/PLIST | 6 | ||||
-rw-r--r-- | audio/arts/buildlink2.mk | 5 | ||||
-rw-r--r-- | audio/arts/distinfo | 8 | ||||
-rw-r--r-- | audio/arts/patches/patch-aa | 13 | ||||
-rw-r--r-- | audio/arts/patches/patch-ad | 13 | ||||
-rw-r--r-- | audio/arts/patches/patch-ae | 22 | ||||
-rw-r--r-- | audio/arts/patches/patch-ag | 11 | ||||
-rw-r--r-- | audio/arts/patches/patch-ah | 168 |
9 files changed, 182 insertions, 68 deletions
diff --git a/audio/arts/Makefile b/audio/arts/Makefile index b6cc9f04464..89ae72497b5 100644 --- a/audio/arts/Makefile +++ b/audio/arts/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.16 2003/05/30 12:49:09 markd Exp $ +# $NetBSD: Makefile,v 1.17 2003/07/07 20:51:53 skrll Exp $ DISTNAME= arts-1.1.2 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= audio COMMENT= Analog Real-Time Synthesizer diff --git a/audio/arts/PLIST b/audio/arts/PLIST index b079bc2dd5d..5ebd31cad4d 100644 --- a/audio/arts/PLIST +++ b/audio/arts/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2003/03/11 13:33:44 markd Exp $ +@comment $NetBSD: PLIST,v 1.4 2003/07/07 20:51:53 skrll Exp $ bin/artsc-config bin/artscat bin/artsd @@ -134,6 +134,10 @@ lib/libmcop.la lib/libmcop.so lib/libmcop.so.1 lib/libmcop.so.1.0 +lib/libmcop_mt.la +lib/libmcop_mt.so +lib/libmcop_mt.so.1 +lib/libmcop_mt.so.1.0 lib/libqtmcop.la lib/libqtmcop.so lib/libqtmcop.so.1 diff --git a/audio/arts/buildlink2.mk b/audio/arts/buildlink2.mk index f594d9acaee..713208aa8f4 100644 --- a/audio/arts/buildlink2.mk +++ b/audio/arts/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.9 2003/05/30 12:49:10 markd Exp $ +# $NetBSD: buildlink2.mk,v 1.10 2003/07/07 20:51:54 skrll Exp $ # # This Makefile fragment is included by packages that use arts. @@ -6,7 +6,7 @@ ARTS_BUILDLINK2_MK= # defined BUILDLINK_PACKAGES+= arts -BUILDLINK_DEPENDS.arts?= arts>=1.1.2 +BUILDLINK_DEPENDS.arts?= arts>=1.1.2nb2 BUILDLINK_PKGSRCDIR.arts?= ../../audio/arts EVAL_PREFIX+= BUILDLINK_PREFIX.arts=arts @@ -26,6 +26,7 @@ BUILDLINK_FILES.arts+= lib/libartswavplayobject.* BUILDLINK_FILES.arts+= lib/libkmedia2.* BUILDLINK_FILES.arts+= lib/libkmedia2_idl.* BUILDLINK_FILES.arts+= lib/libmcop.* +BUILDLINK_FILES.arts+= lib/libmcop_mt.* BUILDLINK_FILES.arts+= lib/libqtmcop.* BUILDLINK_FILES.arts+= lib/libsoundserver_idl.* BUILDLINK_FILES.arts+= lib/libx11globalcomm.* diff --git a/audio/arts/distinfo b/audio/arts/distinfo index c9f150a057f..b5802803e5c 100644 --- a/audio/arts/distinfo +++ b/audio/arts/distinfo @@ -1,11 +1,9 @@ -$NetBSD: distinfo,v 1.10 2003/05/22 03:05:38 markd Exp $ +$NetBSD: distinfo,v 1.11 2003/07/07 20:51:54 skrll Exp $ SHA1 (arts-1.1.2.tar.bz2) = e3c7f9bb16de12d272f552e16614ff98b31ce039 Size (arts-1.1.2.tar.bz2) = 985602 bytes -SHA1 (patch-aa) = 55a91d3a0e3be942c741e77c2a6b8833208d691e SHA1 (patch-ab) = 06265879020edf24ff51403565fd422c3b7a17e5 SHA1 (patch-ac) = 73cc8b5398d4191dfbf817d4b2e03917ab2ba6f6 -SHA1 (patch-ad) = e57d73093d3623a5fd73399427517235ce8d1204 -SHA1 (patch-ae) = abca632bdf5ec1c0415d14ded25720f1cc94d051 SHA1 (patch-af) = 9a130ccd7f56656bb55e2c5edf223c38c69be591 -SHA1 (patch-ag) = 3e16b105d1cfdcb4c219ec43346818aadbe3aa1b +SHA1 (patch-ag) = 30177e80960a2877fb69cb5ffaadc4aa0d0783fc +SHA1 (patch-ah) = 4cf4d9a435f02c5ed909ea8d59bbaa84e125cf33 diff --git a/audio/arts/patches/patch-aa b/audio/arts/patches/patch-aa deleted file mode 100644 index eedc32ab82f..00000000000 --- a/audio/arts/patches/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2003/03/11 13:33:46 markd Exp $ - ---- Makefile.in.orig Sat Jan 4 06:07:18 2003 -+++ Makefile.in -@@ -297,7 +297,7 @@ - x_libraries = @x_libraries@ - - AUTOMAKE_OPTIONS = foreign 1.5 --COMPILE_FIRST = libltdl mcop mcopidl flow mcop_mt soundserver artsc examples tests doc -+COMPILE_FIRST = libltdl mcop mcopidl flow soundserver artsc examples tests doc - EXTRA_DIST = admin - - #DIST_SUBDIRS = mcop mcop_mt mcopidl flow soundserver artsc examples tests doc diff --git a/audio/arts/patches/patch-ad b/audio/arts/patches/patch-ad deleted file mode 100644 index cc906a65cae..00000000000 --- a/audio/arts/patches/patch-ad +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ad,v 1.3 2003/03/11 13:33:46 markd Exp $ - ---- soundserver/Makefile.am.orig Sun Sep 22 23:28:12 2002 -+++ soundserver/Makefile.am -@@ -52,7 +52,7 @@ - bin_PROGRAMS = artsd artsplay artscat artswrapper artsshell artsrec - - artsd_LDADD = libsoundserver_idl.la $(FLOWLIBS) \ -- $(top_builddir)/mcop_mt/libmcop_mt.la $(USE_THREADS) -+ $(top_builddir)/mcop/libmcop.la $(USE_THREADS) - artsd_SOURCES = soundserverv2_impl.cc soundserver_impl.cc simplesoundserver_impl.cc artsd.cc cpuusage.cc samplestorage_impl.cc - artsd_COMPILE_FIRST = soundserver.h artsversion.h - diff --git a/audio/arts/patches/patch-ae b/audio/arts/patches/patch-ae deleted file mode 100644 index 3c9a5bca436..00000000000 --- a/audio/arts/patches/patch-ae +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ae,v 1.3 2003/03/11 13:33:46 markd Exp $ - ---- soundserver/Makefile.in.orig Sat Jan 4 06:07:18 2003 -+++ soundserver/Makefile.in -@@ -337,7 +337,7 @@ - bin_PROGRAMS = artsd artsplay artscat artswrapper artsshell artsrec - - artsd_LDADD = libsoundserver_idl.la $(FLOWLIBS) \ -- $(top_builddir)/mcop_mt/libmcop_mt.la $(USE_THREADS) -+ $(top_builddir)/mcop/libmcop.la $(USE_THREADS) - - artsd_SOURCES = soundserverv2_impl.cc soundserver_impl.cc simplesoundserver_impl.cc artsd.cc cpuusage.cc samplestorage_impl.cc - artsd_COMPILE_FIRST = soundserver.h artsversion.h -@@ -443,7 +443,7 @@ - @KDE_USE_FINAL_TRUE@artsd_OBJECTS = $(artsd_final_OBJECTS) - artsd_DEPENDENCIES = libsoundserver_idl.la \ - $(top_builddir)/flow/libartsflow.la \ -- $(top_builddir)/mcop_mt/libmcop_mt.la -+ $(top_builddir)/mcop/libmcop.la - artsd_LDFLAGS = - am_artsplay_OBJECTS = artsplay.$(OBJEXT) - #>- artsplay_OBJECTS = $(am_artsplay_OBJECTS) diff --git a/audio/arts/patches/patch-ag b/audio/arts/patches/patch-ag index b4f115e48cc..4876bd3e2de 100644 --- a/audio/arts/patches/patch-ag +++ b/audio/arts/patches/patch-ag @@ -1,4 +1,4 @@ -$NetBSD: patch-ag,v 1.2 2003/03/11 13:33:46 markd Exp $ +$NetBSD: patch-ag,v 1.3 2003/07/07 20:51:55 skrll Exp $ --- configure.orig Sat Jan 4 06:07:20 2003 +++ configure @@ -11,12 +11,3 @@ $NetBSD: patch-ag,v 1.2 2003/03/11 13:33:46 markd Exp $ fi -@@ -31509,7 +31509,7 @@ - - - --DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" -+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin mcop_mt" - - if test ! -s $srcdir/subdirs; then - TOPSUBDIRS="" diff --git a/audio/arts/patches/patch-ah b/audio/arts/patches/patch-ah new file mode 100644 index 00000000000..ce039f758c4 --- /dev/null +++ b/audio/arts/patches/patch-ah @@ -0,0 +1,168 @@ +$NetBSD: patch-ah,v 1.1 2003/07/07 20:51:55 skrll Exp $ + +--- mcop_mt/threads_posix.cc.orig 2002-03-25 22:13:17.000000000 +0000 ++++ mcop_mt/threads_posix.cc +@@ -34,7 +34,150 @@ + #endif + + #include <pthread.h> ++#include <unistd.h> ++#ifdef _POSIX_SEMAPHORES + #include <semaphore.h> ++#else ++ ++#include <errno.h> ++ ++struct sem_t { ++ pthread_mutex_t lock; ++ pthread_cond_t gtzero; ++ unsigned int count; ++ unsigned int nwaiters; ++}; ++ ++static int sem_init(sem_t *, int, unsigned int); ++static int sem_destroy(sem_t *); ++static int sem_wait(sem_t *); ++static int sem_trywait(sem_t *); ++static int sem_post(sem_t *); ++static int sem_getvalue(sem_t *, int *); ++ ++static int ++sem_init(sem_t *sem, int pshared, unsigned int value) ++{ ++ ++ /* ++ * Range check the arguments. ++ */ ++ if (pshared != 0) { ++ errno = EPERM; ++ return -1; ++ } ++ ++ if (value > INT_MAX) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* ++ * Initialize the semaphore. ++ */ ++ if (pthread_mutex_init(&sem->lock, NULL) != 0) { ++ errno = ENOMEM; ++ return -1; ++ } ++ ++ if (pthread_cond_init(&sem->gtzero, NULL) != 0) { ++ pthread_mutex_destroy(&sem->lock); ++ errno = ENOMEM; ++ return -1; ++ } ++ ++ sem->count = value; ++ sem->nwaiters = 0; ++ ++ return 0; ++} ++ ++static int ++sem_destroy(sem_t *sem) ++{ ++ ++ /* Make sure there are no waiters. */ ++ pthread_mutex_lock(&sem->lock); ++ if (sem->nwaiters > 0) { ++ pthread_mutex_unlock(&sem->lock); ++ errno = EBUSY; ++ return -1; ++ } ++ pthread_mutex_unlock(&sem->lock); ++ ++ pthread_mutex_destroy(&sem->lock); ++ pthread_cond_destroy(&sem->gtzero); ++ ++ return 0; ++} ++ ++static int ++sem_wait(sem_t *sem) ++{ ++ pthread_testcancel(); ++ ++ pthread_mutex_lock(&sem->lock); ++ ++ while (sem->count == 0) { ++ sem->nwaiters++; ++ pthread_cond_wait(&sem->gtzero, &sem->lock); ++ } ++ sem->count--; ++ ++ pthread_mutex_unlock(&sem->lock); ++ ++ pthread_testcancel(); ++ return 0; ++} ++ ++static int ++sem_trywait(sem_t *sem) ++{ ++ int retval; ++ ++ pthread_mutex_lock(&sem->lock); ++ ++ if (sem->count > 0) { ++ sem->count--; ++ retval = 0; ++ } else { ++ errno = EAGAIN; ++ retval = -1; ++ } ++ ++ pthread_mutex_unlock(&sem->lock); ++ ++ return retval; ++} ++ ++static int ++sem_post(sem_t *sem) ++{ ++ pthread_mutex_lock(&sem->lock); ++ ++ sem->count++; ++ if (sem->nwaiters > 0) { ++ pthread_cond_broadcast(&sem->gtzero); ++ } ++ ++ pthread_mutex_unlock(&sem->lock); ++ ++ return 0; ++} ++ ++static int ++sem_getvalue(sem_t *sem, int *sval) ++{ ++ ++ pthread_mutex_lock(&sem->lock); ++ *sval = sem->count; ++ pthread_mutex_unlock(&sem->lock); ++ ++ return 0; ++} ++#endif ++ ++ + #include <debug.h> + #include <string.h> + +@@ -187,10 +330,12 @@ public: + Thread_impl(Thread *thread) : thread(thread) { + } + void setPriority(int priority) { ++#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING + struct sched_param sp; + sp.sched_priority = priority; + if (pthread_setschedparam(pthread, SCHED_FIFO, &sp)) + arts_debug("Thread::setPriority: sched_setscheduler failed"); ++#endif + } + static pthread_key_t privateDataKey; + static void *threadStartInternal(void *impl) |