Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 87532 Details for
Bug 134382
Ebuild for audacious-infopipe
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
xmms-infopipe-for-audacious.patch
xmms-infopipe-for-audacious.patch (text/plain), 7.05 KB, created by
Bill Woodford
on 2006-05-25 22:48:02 UTC
(
hide
)
Description:
xmms-infopipe-for-audacious.patch
Filename:
MIME Type:
Creator:
Bill Woodford
Created:
2006-05-25 22:48:02 UTC
Size:
7.05 KB
patch
obsolete
>diff -u -r xmms-infopipe-1.3.orig/applications/xmms-info.php xmms-infopipe-1.3/applications/xmms-info.php >--- xmms-infopipe-1.3.orig/applications/xmms-info.php 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/applications/xmms-info.php 2006-05-26 01:01:00.000000000 -0400 >@@ -11,7 +11,7 @@ > > $info = fopen ("/tmp/xmms-info", "r"); > >- $input = fread ($info, 261); >+ $input = fread ($info, 2048); > $parse = split ("\n", $input); > > fclose ($info); >Only in xmms-infopipe-1.3: autogen.sh >diff -u -r xmms-infopipe-1.3.orig/configure.in xmms-infopipe-1.3/configure.in >--- xmms-infopipe-1.3.orig/configure.in 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/configure.in 2006-05-26 01:04:00.000000000 -0400 >@@ -1,12 +1,3 @@ >-divert(-1) >- >-The configurescriptbuilding kewl fewl for xmms-webinfo plugin... >-Copyright (c) Weyfour WWWWolf Dec 9 2000 >- >-$Id: configure.in,v 1.5 2002/02/20 15:06:37 wwwwolf Exp $ >- >- >-divert > > AC_INIT(src/infopipe.c) > AM_INIT_AUTOMAKE(xmms-infopipe, 1.3) >@@ -25,22 +16,9 @@ > > dnl *** checks for libraries > >-AM_PATH_GLIB(1.2.0, >- [LIBS="$LIBS $GLIB_LIBS" >- CFLAGS="$CFLAGS $GLIB_CFLAGS"], >- AC_MSG_ERROR(You need glib 1.2 or later to build this plug-in.)) >- >-dnl *** This mostly in anticipation of next release, but it *may* be needed >-dnl now, too... >-AM_PATH_GTK(1.2.0, >- [LIBS="$LIBS $GTK_LIBS" >- CFLAGS="$CFLAGS $GTK_CFLAGS"], >- AC_MSG_ERROR(You need GTK+ 1.2 or later to build this plug-in.)) >- >-AM_PATH_XMMS(1.0.0, >- [LIBS="$LIBS $XMMS_LIBS" >- CFLAGS="$CFLAGS $XMMS_CFLAGS"], >- AC_MSG_ERROR(You need XMMS version >= 1.0.0, naturally.)) >+PKG_CHECK_MODULES(MYLIBS, audacious >= 0.0.1 glib-2.0 >= 2.4, >+ [LIBS="$LIBS $MYLIBS_LIBS" CFLAGS="$CFLAGS $MYLIBS_CFLAGS"], >+ AC_MSG_ERROR(You need Audacious dev files, as well as GLib dev files.)) > > dnl *** checks for header files > >diff -u -r xmms-infopipe-1.3.orig/src/infopipe.c xmms-infopipe-1.3/src/infopipe.c >--- xmms-infopipe-1.3.orig/src/infopipe.c 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/infopipe.c 2006-05-26 01:12:55.000000000 -0400 >@@ -26,9 +26,9 @@ > #include <sys/stat.h> > #include <sys/types.h> > #include <sys/time.h> >-#include <xmms/plugin.h> >-#include <xmms/util.h> >-#include <xmms/xmmsctrl.h> >+#include <audacious/plugin.h> >+#include <audacious/util.h> >+#include <audacious/beepctrl.h> > > #include "infopipe.h" > #include "../config.h" >@@ -228,16 +228,24 @@ > fd_set fds; > FILE *p; /* the pipe */ > int fd; /* File descriptor for pipe, and its flags. */ >+ struct timespec tv; > > for(;;) { >+ /* This is a thread, fill the structure early */ >+ tv.tv_sec = 0; >+ tv.tv_nsec = 100000000; /* 1/10th of a second */ >+ > /* Open the pipe as file descriptor. */ > /* (O_RDONLY seems to be enough in Linux, but FreeBSDites seemed to > demand O_RDWR.) */ >- fd = open(fifo_file, O_RDWR); >+ /* (Actually, we need to write to the pipe, not read it, so O_WRONLY) */ >+ fd = open(fifo_file, O_WRONLY); > > if(fd == -1) { > perror("xmms_infopipe: Pipe open failed"); > xmms_quit(); >+ /* exit the function, don't give the chance to fill with invalid data */ >+ return; > } > > /* Set the file handle to use non-blocking I/O */ >@@ -262,9 +270,8 @@ > /* Changed to 1 second after request... report if you have problems. > FIXME: Should use XMMS configfile facility & config dialog??? > */ >- sleep(1); /* Umm, or non-blockingness still doesn't work without this! >- Is there some nicer way of saying this, like "wait >- until no reader?" select()? */ >+ >+ nanosleep(&tv, NULL); > } > } > >diff -u -r xmms-infopipe-1.3.orig/src/infopipe_config.c xmms-infopipe-1.3/src/infopipe_config.c >--- xmms-infopipe-1.3.orig/src/infopipe_config.c 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/infopipe_config.c 2006-05-26 01:28:27.000000000 -0400 >@@ -21,7 +21,10 @@ > #include <glib.h> > #include <unistd.h> > #include <sys/types.h> >-#include <xmms/configfile.h> >+ >+/* Refer to audacious/configfile.h - I am not a real programmer! */ >+#define I_AM_A_THIRD_PARTY_DEVELOPER_WHO_NEEDS_TO_BE_KICKED_IN_THE_HEAD_BY_CHUCK_NORRIS >+#include <audacious/configfile.h> > > #include "infopipe_config.h" > #include "infopipe.h" >diff -u -r xmms-infopipe-1.3.orig/src/infopipe.h xmms-infopipe-1.3/src/infopipe.h >--- xmms-infopipe-1.3.orig/src/infopipe.h 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/infopipe.h 2006-05-26 01:02:23.000000000 -0400 >@@ -14,7 +14,7 @@ > #define INFOPIPE_PLUGIN_INFOPIPE_H > > #include <stdio.h> >-#include <xmms/plugin.h> >+#include <audacious/plugin.h> > > /* infopipe.c */ > GeneralPlugin *get_gplugin_info(void); >diff -u -r xmms-infopipe-1.3.orig/src/infopipe_senddata.c xmms-infopipe-1.3/src/infopipe_senddata.c >--- xmms-infopipe-1.3.orig/src/infopipe_senddata.c 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/infopipe_senddata.c 2006-05-26 01:23:27.000000000 -0400 >@@ -4,7 +4,8 @@ > > #include <stdio.h> > #include <glib.h> >-#include <xmms/util.h> >+#include <audacious/util.h> >+#include <audacious/beepctrl.h> > #include "infopipe.h" > #include "../config.h" > >@@ -14,7 +15,7 @@ > This will get the XMMS information and print them out to the pipe. > */ > void blast_info(FILE *pipe) { >- gchar *play_status; >+ gchar *play_status, *s1, *s2; > gint tunes = xmms_remote_get_playlist_length(SESSIONID); > gint current = xmms_remote_get_playlist_pos(SESSIONID); > >@@ -81,10 +82,14 @@ > fprintf(pipe, "Channels: %d\n",nch); > > /* The basicest of the basic information. Title string and file name. */ >- fprintf(pipe, "Title: %s\n", >- xmms_remote_get_playlist_title(SESSIONID,current)); >- fprintf(pipe, "File: %s\n", >- xmms_remote_get_playlist_file(SESSIONID,current)); >+ s1 = xmms_remote_get_playlist_title(SESSIONID,current); >+ s2 = xmms_remote_get_playlist_file(SESSIONID,current); >+ >+ fprintf(pipe, "Title: %s\n", s1); >+ fprintf(pipe, "File: %s\n", s2); >+ >+ g_free(s1); /* xmms_remote_get_playlist_* require we call g_free on the returned string */ >+ g_free(s2); /* xmms_remote_get_playlist_* require we call g_free on the returned string */ > > g_free(play_status); > } >diff -u -r xmms-infopipe-1.3.orig/src/infopipe_ui.c xmms-infopipe-1.3/src/infopipe_ui.c >--- xmms-infopipe-1.3.orig/src/infopipe_ui.c 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/infopipe_ui.c 2006-05-26 01:02:23.000000000 -0400 >@@ -14,8 +14,8 @@ > #include <string.h> > #include <gtk/gtk.h> > #include <glib.h> >-#include <xmms/plugin.h> >-#include <xmms/util.h> >+#include <audacious/plugin.h> >+#include <audacious/util.h> > > #include "../config.h" > #include "infopipe.h" >diff -u -r xmms-infopipe-1.3.orig/src/Makefile.am xmms-infopipe-1.3/src/Makefile.am >--- xmms-infopipe-1.3.orig/src/Makefile.am 2006-05-26 00:48:17.000000000 -0400 >+++ xmms-infopipe-1.3/src/Makefile.am 2006-05-26 01:33:01.000000000 -0400 >@@ -6,7 +6,7 @@ > INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) > > lib_LTLIBRARIES = libinfopipe.la >-libdir = $(XMMS_GENERAL_PLUGIN_DIR) >+libdir = `pkg-config audacious --variable general_plugin_dir` > > # Somehow, infopipe.h wasn't included... > EXTRA_DIST = infopipe.h infopipe_config.h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 134382
:
87531
|
87532
|
87533
|
87583
|
87584
|
87605
|
87607
|
87608