diff options
author | rh <rh@pkgsrc.org> | 2001-05-06 18:23:51 +0000 |
---|---|---|
committer | rh <rh@pkgsrc.org> | 2001-05-06 18:23:51 +0000 |
commit | 71476c2de71070626dec29625208ee1d2e15808d (patch) | |
tree | d4ca46454fa5b62bf2ca34f74eec174e4baf72b8 /audio/xmms | |
parent | e3dbc855720cf239c087508e7ea6bc83e4380974 (diff) | |
download | pkgsrc-71476c2de71070626dec29625208ee1d2e15808d.tar.gz |
Fix a few pthreads problems and make this package actually work. Closes PR
pkg/11091 by Gabriel Rosenkoett <gr@eclipsed.net>
Diffstat (limited to 'audio/xmms')
-rw-r--r-- | audio/xmms/Makefile | 15 | ||||
-rw-r--r-- | audio/xmms/distinfo | 8 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ae | 12 | ||||
-rw-r--r-- | audio/xmms/patches/patch-af | 23 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ah | 13 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ai | 44 |
6 files changed, 99 insertions, 16 deletions
diff --git a/audio/xmms/Makefile b/audio/xmms/Makefile index 7f7cd97debe..17f2e12761c 100644 --- a/audio/xmms/Makefile +++ b/audio/xmms/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.14 2001/02/16 13:30:54 wiz Exp $ +# $NetBSD: Makefile,v 1.15 2001/05/06 18:23:51 rh Exp $ # FreeBSD: ports/audio/xmms/Makefile,v 1.9 2000/02/11 01:46:12 cpiazza Exp DISTNAME= xmms-1.0.1 +PKGNAME= ${DISTNAME}nb1 CATEGORIES= audio MASTER_SITES= ftp://ftp.xmms.org/xmms/1.0/ \ ftp://ftp.uk.xmms.org/xmms/1.0/ \ @@ -19,16 +20,16 @@ DEPENDS+= gtk+>=1.2.7:../../x11/gtk DEPENDS+= libmikmod>=3.1.7:../libmikmod DEPENDS+= libxml>=1.8.5:../../textproc/libxml -BROKEN= Compiles, but does not work; probably threads problem. See pkg/11091. - USE_LIBTOOL= yes USE_X11= yes USE_MESA= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --without-gnome -CPPFLAGS= -I${LOCALBASE}/include -CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ - XML_CONFIG="${LOCALBASE}/bin/xml-config" + +CPPFLAGS+= -I${LOCALBASE}/include +CPPFLAGS+= -D_POSIX_THREAD_SYSCALL_SOFT=1 +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" +CONFIGURE_ENV+= XML_CONFIG="${LOCALBASE}/bin/xml-config" +CONFIGURE_ARGS+=--without-gnome LTCONFIG_OVERRIDE=${WRKSRC}/ltconfig .include "../../mk/bsd.prefs.mk" diff --git a/audio/xmms/distinfo b/audio/xmms/distinfo index 34d4f626616..fd3f5983c2a 100644 --- a/audio/xmms/distinfo +++ b/audio/xmms/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2001/04/18 12:14:41 agc Exp $ +$NetBSD: distinfo,v 1.3 2001/05/06 18:23:51 rh Exp $ SHA1 (xmms-1.0.1.tar.gz) = d1f57f849d77cabcaaa76bac49c71ed50a511649 Size (xmms-1.0.1.tar.gz) = 715574 bytes @@ -6,9 +6,11 @@ SHA1 (patch-aa) = 328ca958fe0e4db2e4399f258e9c87e2c0b44252 SHA1 (patch-ab) = de97f29193ba3932cce6cfe8f64cb704a58edcb8 SHA1 (patch-ac) = 97b57d828734e04edb5d57ff7862589545d30e39 SHA1 (patch-ad) = fbe5031b1b023966e326434595313086da7f42fe +SHA1 (patch-ae) = 1e486f43bfe8dbafbbea3db3781ec08196184ee2 +SHA1 (patch-af) = 2f2af576e1b1aeda7104494e1c5f708ec0f9d751 SHA1 (patch-ag) = 03099003e3a929901d1658339397f270b80a0c2d -SHA1 (patch-ah) = 2cb6b1dde1e8762ea23aaafb366922f0c44eaf73 -SHA1 (patch-ai) = 16ac90947f445869b1ec164a769e2f085b844aee +SHA1 (patch-ah) = 88e78e9ed3c41027c6f0ceb17225e399fd8c01b6 +SHA1 (patch-ai) = 423119c82666a9ce19248d931c8893e614f1e3e1 SHA1 (patch-aj) = 95e965c5033dea5d2b0be2a22058f19504da0031 SHA1 (patch-ak) = 53605fe5a6aea44f8b4e2f46d203be9371216608 SHA1 (patch-al) = dcf021f40f15fb01c9063e00ae900bb70874935d diff --git a/audio/xmms/patches/patch-ae b/audio/xmms/patches/patch-ae new file mode 100644 index 00000000000..31eb8444105 --- /dev/null +++ b/audio/xmms/patches/patch-ae @@ -0,0 +1,12 @@ +$NetBSD: patch-ae,v 1.5 2001/05/06 18:23:52 rh Exp $ + +--- libxmms/xmmsctrl.c.orig Sun May 6 19:29:48 2001 ++++ libxmms/xmmsctrl.c +@@ -18,6 +18,7 @@ + + #include <glib.h> + #include <sys/types.h> ++#include <pthread.h> + #include <sys/stat.h> + #include <sys/socket.h> + #include <sys/un.h> diff --git a/audio/xmms/patches/patch-af b/audio/xmms/patches/patch-af new file mode 100644 index 00000000000..c4751845c0b --- /dev/null +++ b/audio/xmms/patches/patch-af @@ -0,0 +1,23 @@ +$NetBSD: patch-af,v 1.3 2001/05/06 18:23:52 rh Exp $ + +--- Output/OSS/audio.c.orig Sun May 6 19:45:56 2001 ++++ Output/OSS/audio.c +@@ -574,10 +574,16 @@ + unpause = FALSE; + remove_prebuffer = FALSE; + ++#ifdef __NetBSD__ ++#define DSPNAME "/dev/sound" ++#else ++#define DSPNAME "/dev/dsp" ++#endif ++ + if (oss_cfg.audio_device > 0) +- device_name = g_strdup_printf("/dev/dsp%d", oss_cfg.audio_device); ++ device_name = g_strdup_printf(DSPNAME "%d", oss_cfg.audio_device); + else +- device_name = g_strdup("/dev/dsp"); ++ device_name = g_strdup(DSPNAME); + fd = open(device_name, O_WRONLY); + if (fd == -1) + { diff --git a/audio/xmms/patches/patch-ah b/audio/xmms/patches/patch-ah index f89ecab5b8c..d10cc8b7e8e 100644 --- a/audio/xmms/patches/patch-ah +++ b/audio/xmms/patches/patch-ah @@ -1,7 +1,7 @@ -$NetBSD: patch-ah,v 1.1 2000/03/07 23:03:13 tron Exp $ +$NetBSD: patch-ah,v 1.2 2001/05/06 18:23:52 rh Exp $ --- libxmms/util.c.orig Mon Nov 15 17:50:37 1999 -+++ libxmms/util.c Tue Mar 7 23:53:13 2000 ++++ libxmms/util.c @@ -56,7 +56,7 @@ gboolean xmms_check_realtime_priority(void) @@ -11,3 +11,12 @@ $NetBSD: patch-ah,v 1.1 2000/03/07 23:03:13 tron Exp $ #ifdef __FreeBSD__ /* * Check if priority scheduling is enabled in the kernel +@@ -94,5 +94,8 @@ + usec -= tv.tv_sec * 1000; + req.tv_usec = usec; + select(0,NULL,NULL,NULL,&tv); ++#endif ++#ifdef __NetBSD__ ++ pthread_yield_np(); + #endif + } diff --git a/audio/xmms/patches/patch-ai b/audio/xmms/patches/patch-ai index a1e1ce16587..289b21fcb1b 100644 --- a/audio/xmms/patches/patch-ai +++ b/audio/xmms/patches/patch-ai @@ -1,8 +1,32 @@ -$NetBSD: patch-ai,v 1.1 2000/03/12 20:36:27 tron Exp $ +$NetBSD: patch-ai,v 1.2 2001/05/06 18:23:52 rh Exp $ --- xmms/main.c.orig Mon Jan 31 19:35:16 2000 -+++ xmms/main.c Sun Mar 12 14:58:05 2000 -@@ -2945,7 +2945,7 @@ ++++ xmms/main.c +@@ -34,6 +34,23 @@ + #include "libxmms/util.h" + #include "libxmms/dga.h" + ++#ifdef __NetBSD__ ++#include <gtk/gtk.h> ++#include <pthread.h> ++ ++/* ++ * NetBSD uses non-preemptive pth, so we yield the processor periodically ++ */ ++ ++gint ++pth_nbschedule (gpointer data) ++{ ++ pthread_yield_np(); ++ ++ return TRUE; ++} ++#endif ++ + GtkWidget *mainwin, *mainwin_filesel = NULL, *mainwin_url_window = NULL; + GtkWidget *mainwin_jtt = NULL, *mainwin_jtf = NULL; + GtkItemFactory *mainwin_options_menu, *mainwin_songname_menu, *mainwin_vis_menu; +@@ -2945,7 +2962,7 @@ gchar *filename; gint i; gboolean have_display = FALSE; @@ -11,7 +35,7 @@ $NetBSD: patch-ai,v 1.1 2000/03/12 20:36:27 tron Exp $ struct sched_param sparam; #endif -@@ -2988,7 +2988,7 @@ +@@ -2988,7 +3005,7 @@ if (geteuid() == 0) { @@ -20,3 +44,15 @@ $NetBSD: patch-ai,v 1.1 2000/03/12 20:36:27 tron Exp $ if (cfg.use_realtime) { sparam.sched_priority = sched_get_priority_max(SCHED_RR); +@@ -3106,6 +3123,11 @@ + playlist_start_get_info_thread(); + + sm_init(argc, argv); ++ ++#ifdef __NetBSD__ ++ gtk_timeout_add (200, pth_nbschedule, NULL); ++#endif ++ + gtk_main(); + + return 0; |