summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2008-01-30 12:09:52 +0000
committerTony Vroon <chainsaw@gentoo.org>2008-01-30 12:09:52 +0000
commitf5ff813ee36b588b71a4955012a0c3d0a6467be9 (patch)
tree7848f349379e658cc6c2d92e719ec7799525b1bf /net-irc/xchat-xsys
parentversion bump, add dependency on SQLite 2 versions (diff)
downloadgentoo-2-f5ff813ee36b588b71a4955012a0c3d0a6467be9.tar.gz
gentoo-2-f5ff813ee36b588b71a4955012a0c3d0a6467be9.tar.bz2
gentoo-2-f5ff813ee36b588b71a4955012a0c3d0a6467be9.zip
Make audacious functionality optional, as requested by Arvid Norlander <arvid.norlander@tele2.se>. Remove ebuilds that depend on obsolete Audacious version.
(Portage version: 2.1.4)
Diffstat (limited to 'net-irc/xchat-xsys')
-rw-r--r--net-irc/xchat-xsys/ChangeLog11
-rw-r--r--net-irc/xchat-xsys/files/2.2.0-no-audacious.patch244
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r13
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r23
-rw-r--r--net-irc/xchat-xsys/files/digest-xchat-xsys-2.2.0-r13
-rw-r--r--net-irc/xchat-xsys/xchat-xsys-2.1.0-r1.ebuild50
-rw-r--r--net-irc/xchat-xsys/xchat-xsys-2.2.0-r1.ebuild (renamed from net-irc/xchat-xsys/xchat-xsys-2.1.0-r2.ebuild)21
7 files changed, 265 insertions, 70 deletions
diff --git a/net-irc/xchat-xsys/ChangeLog b/net-irc/xchat-xsys/ChangeLog
index 062c181f3d20..7b5c526c964d 100644
--- a/net-irc/xchat-xsys/ChangeLog
+++ b/net-irc/xchat-xsys/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-irc/xchat-xsys
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/ChangeLog,v 1.63 2008/01/29 14:03:07 drac Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/ChangeLog,v 1.64 2008/01/30 12:09:52 chainsaw Exp $
+
+*xchat-xsys-2.2.0-r1 (30 Jan 2008)
+
+ 30 Jan 2008; Tony Vroon <chainsaw@gentoo.org>
+ +files/2.2.0-no-audacious.patch, -xchat-xsys-2.1.0-r1.ebuild,
+ -xchat-xsys-2.1.0-r2.ebuild, +xchat-xsys-2.2.0-r1.ebuild:
+ Make audacious functionality optional, as requested by Arvid Norlander
+ <arvid.norlander@tele2.se>. Remove ebuilds that depend on obsolete Audacious
+ version.
29 Jan 2008; Samuli Suominen <drac@gentoo.org> xchat-xsys-2.2.0.ebuild:
amd64 stable
diff --git a/net-irc/xchat-xsys/files/2.2.0-no-audacious.patch b/net-irc/xchat-xsys/files/2.2.0-no-audacious.patch
new file mode 100644
index 000000000000..749234e7aa67
--- /dev/null
+++ b/net-irc/xchat-xsys/files/2.2.0-no-audacious.patch
@@ -0,0 +1,244 @@
+diff -uNr xsys-2.2.0.ORIG/Makefile xsys-2.2.0/Makefile
+--- xsys-2.2.0.ORIG/Makefile 2008-01-30 11:53:56.000000000 +0000
++++ xsys-2.2.0/Makefile 2008-01-30 11:59:39.000000000 +0000
+@@ -10,7 +10,6 @@
+ VER_PATCH = 0
+ CC = gcc
+ CFLAGS += -O2 -Wall -fPIC
+-CFLAGS += $(shell pkg-config dbus-1 --cflags) $(shell pkg-config glib-2.0 --cflags)
+ CFLAGS += -DVER_MINOR=$(VER_MINOR) -DVER_MAJOR=$(VER_MAJOR) -DVER_PATCH=$(VER_PATCH) \
+ -DVER_STRING=\"$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)\" -DPCIIDS=\"$(PCIIDS)\" $(BUTTON)
+ LDFLAGS = $(CFLAGS) -shared
+@@ -20,7 +19,7 @@
+ ALL : $(LIBRARY)
+
+ $(LIBRARY) : $(OBJECTS)
+- $(CC) $(LDFLAGS) -o $(LIBRARY) $(OBJECTS) -lpci $(shell pkg-config dbus-1 --libs) $(shell pkg-config glib-2.0 --libs) -laudclient
++ $(CC) $(LDFLAGS) -o $(LIBRARY) $(OBJECTS) -lpci
+
+ xsys.o : xsys.c
+ parse.o : parse.c
+diff -uNr xsys-2.2.0.ORIG/parse.h xsys-2.2.0/parse.h
+--- xsys-2.2.0.ORIG/parse.h 2008-01-30 11:53:56.000000000 +0000
++++ xsys-2.2.0/parse.h 2008-01-30 11:58:03.000000000 +0000
+@@ -33,7 +33,6 @@
+ int xs_parse_video(char *vid_card);
+ int xs_parse_agpbridge(char *agp_bridge);
+ int xs_parse_ether(char *ethernet_card);
+-int xs_parse_xmms_info(char **title, unsigned int *songtime, unsigned int *playtime);
+ int xs_parse_distro(char *name);
+ int xs_parse_hwmon_chip(char *chip);
+ int xs_parse_hwmon_temp(char *temp, unsigned int *sensor);
+diff -uNr xsys-2.2.0.ORIG/xsys.c xsys-2.2.0/xsys.c
+--- xsys-2.2.0.ORIG/xsys.c 2008-01-30 11:53:56.000000000 +0000
++++ xsys-2.2.0/xsys.c 2008-01-30 12:00:36.000000000 +0000
+@@ -28,24 +28,17 @@
+ #include "parse.h"
+ #include "match.h"
+ #include "xsys.h"
+-#include <audacious/dbus.h>
+-#include <audacious/audctrl.h>
+
+ static xchat_plugin *ph;
+
+ static char format[bsize] = "%B%1%B[%2]";
+-static char playing[42] = "now_playing";
+ unsigned int percentages = 1;
+-static unsigned int action = 0;
+
+ static void load_config();
+ static void save_config();
+-static gboolean dbus_init(void);
+
+ static int format_cb (char *word[], char *word_eol[], void *userdata);
+-static int playing_cb (char *word[], char *word_eol[], void *userdata);
+ static int percentages_cb (char *word[], char *word_eol[], void *userdata);
+-static int action_cb (char *word[], char *word_eol[], void *userdata);
+ static int sysinfo_cb (char *word[], char *word_eol[], void *userdata);
+ static int xsys_cb (char *word[], char *word_eol[], void *userdata);
+ static int cpuinfo_cb (char *word[], char *word_eol[], void *userdata);
+@@ -62,22 +55,17 @@
+ #if 0
+ static int hwmon_cb (char *word[], char *word_eol[], void *userdata);
+ #endif
+-static int np_cb (char *word[], char *word_eol[], void *userdata);
+-static DBusGProxy *dbus_proxy = NULL;
+-static DBusGConnection *connection = NULL;
+
+ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name,
+ char **plugin_desc, char **plugin_version, char *arg)
+ {
+ ph = plugin_handle;
+ *plugin_name = "X-Sys_2";
+- *plugin_desc = "A sysinfo/audacious plugin";
++ *plugin_desc = "A sysinfo plugin";
+ *plugin_version = VER_STRING;
+
+ xchat_hook_command(ph, "XSYS2FORMAT",XCHAT_PRI_NORM, format_cb, NULL, NULL);
+- xchat_hook_command(ph, "PLAYING", XCHAT_PRI_NORM, playing_cb, NULL, NULL);
+ xchat_hook_command(ph, "PERCENTAGES",XCHAT_PRI_NORM, percentages_cb, NULL, NULL);
+- xchat_hook_command(ph, "NPACTION", XCHAT_PRI_NORM, action_cb, NULL, NULL);
+ xchat_hook_command(ph, "SYSINFO", XCHAT_PRI_NORM, sysinfo_cb, NULL, (void *) 0);
+ xchat_hook_command(ph, "ESYSINFO", XCHAT_PRI_NORM, sysinfo_cb, NULL, (void *) 1);
+ xchat_hook_command(ph, "XSYS", XCHAT_PRI_NORM, xsys_cb, NULL, (void *) 0);
+@@ -108,13 +96,6 @@
+ xchat_hook_command(ph, "HWMON", XCHAT_PRI_NORM, hwmon_cb, NULL, (void *) 0);
+ xchat_hook_command(ph, "EHWMON", XCHAT_PRI_NORM, hwmon_cb, NULL, (void *) 1);
+ #endif
+- if (dbus_init())
+- {
+- xchat_hook_command(ph, "NP", XCHAT_PRI_NORM, np_cb, NULL, (void *) 0);
+- xchat_hook_command(ph, "ENP", XCHAT_PRI_NORM, np_cb, NULL, (void *) 1);
+- xchat_printf(ph, "D-Bus MPRIS support initialized", VER_STRING);
+- }
+-
+ load_config();
+
+ xchat_printf(ph, "X-Sys %s Loaded Succesfully", VER_STRING);
+@@ -122,11 +103,6 @@
+ return 1;
+ }
+
+-static void xchat_plugin_deinit()
+-{
+- /* blahblahblah */
+-}
+-
+ static void save_config()
+ {
+ FILE *fp;
+@@ -139,9 +115,7 @@
+ return;
+ }
+ fprintf(fp, "format: %s\n", format);
+- fprintf(fp, "playing: %s\n", playing);
+ fprintf(fp, "percentages: %i\n", percentages);
+- fprintf(fp, "action: %i\n", action);
+ fclose(fp);
+ return;
+ }
+@@ -158,30 +132,11 @@
+ while(fgets(buffer, bsize, fp) != NULL)
+ {
+ find_match_char(buffer, "format", format);
+- find_match_char(buffer, "playing", playing);
+ find_match_int(buffer, "percentages", &percentages);
+- find_match_int(buffer, "action", &action);
+ }
+ fclose(fp);
+ }
+
+-static gboolean dbus_init(void)
+-{
+- GError *error = NULL;
+-
+- connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+- if (connection == NULL)
+- return FALSE;
+-
+- dbus_proxy = dbus_g_proxy_new_for_name(connection, AUDACIOUS_DBUS_SERVICE,
+- AUDACIOUS_DBUS_PATH,
+- AUDACIOUS_DBUS_INTERFACE);
+- if (dbus_proxy == NULL)
+- return FALSE;
+-
+- return TRUE;
+-}
+-
+ static int format_cb(char *word[], char *word_eol[], void *userdata)
+ {
+ if(*(word[2]) == '\0')
+@@ -194,18 +149,6 @@
+ return XCHAT_EAT_ALL;
+ }
+
+-static int playing_cb(char *word[], char *word_eol[], void *userdata)
+-{
+- if(*(word[2]) == '\0')
+- xchat_printf(ph, "Current playing string:\n%s", playing);
+- else
+- {
+- strncpy(playing, word_eol[2], 42);
+- save_config();
+- }
+- return XCHAT_EAT_ALL;
+-}
+-
+ static int percentages_cb(char *word[], char *word_eol[], void *userdata)
+ {
+ if(*(word[2]) == '\0')
+@@ -221,21 +164,6 @@
+ return XCHAT_EAT_ALL;
+ }
+
+-static int action_cb(char *word[], char *word_eol[], void *userdata)
+-{
+- if(*(word[2]) == '\0')
+- if (action != 0)
+- xchat_printf(ph, "Now playing action currently enabled");
+- else
+- xchat_printf(ph, "Now playing action currently disabled");
+- else
+- {
+- action = atoi(word[2]);
+- save_config();
+- }
+- return XCHAT_EAT_ALL;
+-}
+-
+ static int sysinfo_cb(char *word[], char *word_eol[], void *userdata)
+ {
+ char sysinfo[bsize], buffer[bsize], cpu_model[bsize], cpu_cache[bsize], cpu_vendor[bsize];
+@@ -683,52 +611,3 @@
+ return XCHAT_EAT_ALL;
+ }
+ #endif
+-
+-static int np_cb(char *word[], char *word_eol[], void *userdata)
+-{
+- char *buffer = NULL, title[bsize], length[42];
+- int pos, len, p = audacious_remote_get_playlist_pos(dbus_proxy);
+-
+- if (!audacious_remote_is_running(dbus_proxy))
+- {
+- xchat_printf(ph, "Audacious is not currently running");
+- return XCHAT_EAT_ALL;
+- }
+-
+- pos = audacious_remote_get_output_time(dbus_proxy);
+- len = audacious_remote_get_playlist_time(dbus_proxy, p);
+- buffer = decruft_filename(audacious_remote_get_playlist_title(dbus_proxy, p));
+-
+- strncpy(title, buffer, bsize);
+-
+- if (action != 0)
+- flat_format_output(playing, title, format);
+- else
+- format_output(playing, title, format);
+- strcat(title, "\017 ");
+-
+- if(len == -1)
+- snprintf(length, 42, "%d:%02d/stream",
+- ((pos/1000)-((pos/1000)%60))/60, (pos/1000)%60);
+- else
+- snprintf(length, 42, "%d:%02d/%d:%02d",
+- ((pos/1000)-((pos/1000)%60))/60, (pos/1000)%60,
+- ((len/1000)-((len/1000)%60))/60, (len/1000)%60);
+-
+- if (action != 0)
+- flat_format_output("length", length, format);
+- else
+- format_output("length", length, format);
+- strncat(title, length, bsize);
+-
+- if ((action != 0) && (long)userdata)
+- xchat_printf(ph, "You are %s", title);
+- else if (action != 0)
+- xchat_commandf(ph, "me is %s", title);
+- else if ((long)userdata)
+- xchat_printf(ph, "%s", title);
+- else
+- xchat_commandf(ph, "say %s", title);
+-
+- return XCHAT_EAT_ALL;
+-}
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r1 b/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r1
deleted file mode 100644
index a8764842ccab..000000000000
--- a/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r1
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 fd4d97152422341b5ce81469481d10a8 xsys-2.1.0.tar.bz2 16499
-RMD160 cca47892379b0022d306370a93e35b0a0c8dfbd8 xsys-2.1.0.tar.bz2 16499
-SHA256 d91b302bdf9583cc769c664d98a28f76d8d34d635a0446a14833ad4f5b6ef61d xsys-2.1.0.tar.bz2 16499
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r2 b/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r2
deleted file mode 100644
index a8764842ccab..000000000000
--- a/net-irc/xchat-xsys/files/digest-xchat-xsys-2.1.0-r2
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 fd4d97152422341b5ce81469481d10a8 xsys-2.1.0.tar.bz2 16499
-RMD160 cca47892379b0022d306370a93e35b0a0c8dfbd8 xsys-2.1.0.tar.bz2 16499
-SHA256 d91b302bdf9583cc769c664d98a28f76d8d34d635a0446a14833ad4f5b6ef61d xsys-2.1.0.tar.bz2 16499
diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-2.2.0-r1 b/net-irc/xchat-xsys/files/digest-xchat-xsys-2.2.0-r1
new file mode 100644
index 000000000000..ed8fce2f5111
--- /dev/null
+++ b/net-irc/xchat-xsys/files/digest-xchat-xsys-2.2.0-r1
@@ -0,0 +1,3 @@
+MD5 d57def00f96c7389ab593c009595f6f4 xsys-2.2.0.tar.bz2 17173
+RMD160 b5ead4b78fe8598489bcafc6b70a146265c1f2b6 xsys-2.2.0.tar.bz2 17173
+SHA256 eab1620021bc36f86fdbe67f264be8d4e631ea6a7dbad32be597e8f6bc82ebdd xsys-2.2.0.tar.bz2 17173
diff --git a/net-irc/xchat-xsys/xchat-xsys-2.1.0-r1.ebuild b/net-irc/xchat-xsys/xchat-xsys-2.1.0-r1.ebuild
deleted file mode 100644
index cc66374a5101..000000000000
--- a/net-irc/xchat-xsys/xchat-xsys-2.1.0-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/xchat-xsys-2.1.0-r1.ebuild,v 1.8 2007/10/16 10:17:16 chainsaw Exp $
-
-inherit toolchain-funcs eutils
-
-MY_P="${P/xchat-/}"
-S=${WORKDIR}/${MY_P}
-DESCRIPTION="Sysinfo plugin for X-Chat."
-SRC_URI="http://dev.gentoo.org/~chainsaw/xsys/download/${MY_P}.tar.bz2 mirror://gentoo/${MY_P}.tar.bz2"
-HOMEPAGE="http://dev.gentoo.org/~chainsaw/xsys/"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
-IUSE="audacious buttons"
-
-DEPEND="|| (
- >=net-irc/xchat-2.4.0
- >=net-irc/xchat-gnome-0.4
- )
- sys-apps/pciutils
- audacious? ( =media-sound/audacious-1.3* )"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- sed -i -e "s:-O2 -Wall:${CFLAGS} -Wall:" Makefile
- if use buttons; then
- sed -i -e "s:#BUTTON:BUTTON:" Makefile
- fi
- if use audacious; then
- sed -i -e "s:# FOR AUDACIOUS # ::g" Makefile
- fi
- epatch "${FILESDIR}"/${PV}-alpha-L2-cache.patch
-}
-
-src_compile() {
- emake -j1 CC="$(tc-getCC)" || die "Compile failed"
-}
-
-src_install() {
- exeinto /usr/$(get_libdir)/xchat/plugins
- doexe xsys-${PV}.so || die "doexe failed"
-
- exeinto /usr/$(get_libdir)/xchat-gnome/plugins
- doexe xsys-${PV}.so || die "doexe failed"
-
- dodoc ChangeLog README || die "dodoc failed"
-}
diff --git a/net-irc/xchat-xsys/xchat-xsys-2.1.0-r2.ebuild b/net-irc/xchat-xsys/xchat-xsys-2.2.0-r1.ebuild
index cc437c734d5d..b7c2e1444a9e 100644
--- a/net-irc/xchat-xsys/xchat-xsys-2.1.0-r2.ebuild
+++ b/net-irc/xchat-xsys/xchat-xsys-2.2.0-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/xchat-xsys-2.1.0-r2.ebuild,v 1.1 2007/10/16 10:17:16 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/xchat-xsys-2.2.0-r1.ebuild,v 1.1 2008/01/30 12:09:52 chainsaw Exp $
inherit toolchain-funcs eutils
@@ -9,31 +9,26 @@ S=${WORKDIR}/${MY_P}
DESCRIPTION="Sysinfo plugin for X-Chat."
SRC_URI="http://dev.gentoo.org/~chainsaw/xsys/download/${MY_P}.tar.bz2 mirror://gentoo/${MY_P}.tar.bz2"
HOMEPAGE="http://dev.gentoo.org/~chainsaw/xsys/"
+IUSE="audacious"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="audacious buttons"
DEPEND="|| (
>=net-irc/xchat-2.4.0
>=net-irc/xchat-gnome-0.4
)
+ dev-util/pkgconfig
sys-apps/pciutils
- audacious? ( =media-sound/audacious-1.3* )"
+ audacious? ( >=media-sound/audacious-1.4.0 )"
src_unpack() {
- unpack ${A}
+ unpack "${A}"
cd "${S}"
- sed -i -e "s:-O2 -Wall:${CFLAGS} -Wall:" Makefile
- if use buttons; then
- sed -i -e "s:#BUTTON:BUTTON:" Makefile
+ if ! useq audacious; then
+ epatch "${FILESDIR}/${PV}-no-audacious.patch"
fi
- if use audacious; then
- sed -i -e "s:# FOR AUDACIOUS # ::g" Makefile
- fi
- epatch "${FILESDIR}"/${PV}-alpha-L2-cache.patch
- epatch "${FILESDIR}"/${PV}-fix-meminfo-swapoff.patch
}
src_compile() {