summaryrefslogtreecommitdiff
path: root/audio/xmms/patches
diff options
context:
space:
mode:
authorrh <rh@pkgsrc.org>2001-05-06 18:23:51 +0000
committerrh <rh@pkgsrc.org>2001-05-06 18:23:51 +0000
commit71476c2de71070626dec29625208ee1d2e15808d (patch)
treed4ca46454fa5b62bf2ca34f74eec174e4baf72b8 /audio/xmms/patches
parente3dbc855720cf239c087508e7ea6bc83e4380974 (diff)
downloadpkgsrc-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/patches')
-rw-r--r--audio/xmms/patches/patch-ae12
-rw-r--r--audio/xmms/patches/patch-af23
-rw-r--r--audio/xmms/patches/patch-ah13
-rw-r--r--audio/xmms/patches/patch-ai44
4 files changed, 86 insertions, 6 deletions
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;