[Pkg-wmaker-commits] [wmauda] 06/17: Import Debian changes 0.3-5
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Fri Jul 7 01:08:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmauda.
commit 501da6aa4500e6137142c131f687785765b9deb0
Author: Julien BLACHE <jblache at debian.org>
Date: Thu Nov 15 09:20:14 2007 +0100
Import Debian changes 0.3-5
wmauda (0.3-5) unstable; urgency=low
* debian/control:
+ Build-Depends: dpatch.
+ Bump audacious-dev build-dep.
+ Promote audacious from Recommends to Depends, versionned on >= 1.4.0-1.
* debian/rules:
+ Use dpatch.
* debian/patches/10_Makefile_default_CFLAGS.dpatch:
+ From previous Debian diff.
* debian/patches/11_fix_pixmap_depth.dpatch:
+ From previous Debian diff.
* debian/patches/12_port_to_audacious_1.4.dpatch:
+ Added; Port wmauda to the new DBus remote control interface in
Audacious 1.4 (closes: #450439).
---
Makefile | 2 +-
debian/changelog | 18 ++
debian/control | 5 +-
debian/patches/00list | 3 +
debian/patches/10_Makefile_default_CFLAGS.dpatch | 17 ++
debian/patches/11_fix_pixmap_depth.dpatch | 21 ++
debian/patches/12_port_to_audacious_1.4.dpatch | 305 +++++++++++++++++++++++
debian/rules | 9 +-
wmauda.c | 3 +-
9 files changed, 375 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 29eeb97..69c4fc1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC ?= gcc
-CFLAGS ?= -g -O2 -pipe
+CFLAGS ?= -g -pipe
PREFIX ?= /usr/local
diff --git a/debian/changelog b/debian/changelog
index 6dc5d52..172ddca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+wmauda (0.3-5) unstable; urgency=low
+
+ * debian/control:
+ + Build-Depends: dpatch.
+ + Bump audacious-dev build-dep.
+ + Promote audacious from Recommends to Depends, versionned on >= 1.4.0-1.
+ * debian/rules:
+ + Use dpatch.
+ * debian/patches/10_Makefile_default_CFLAGS.dpatch:
+ + From previous Debian diff.
+ * debian/patches/11_fix_pixmap_depth.dpatch:
+ + From previous Debian diff.
+ * debian/patches/12_port_to_audacious_1.4.dpatch:
+ + Added; Port wmauda to the new DBus remote control interface in
+ Audacious 1.4 (closes: #450439).
+
+ -- Julien BLACHE <jblache at debian.org> Thu, 15 Nov 2007 09:20:14 +0100
+
wmauda (0.3-4) unstable; urgency=low
* wmauda.c:
diff --git a/debian/control b/debian/control
index 0102196..2f0b2e5 100644
--- a/debian/control
+++ b/debian/control
@@ -2,13 +2,12 @@ Source: wmauda
Section: sound
Priority: extra
Maintainer: Julien BLACHE <jblache at debian.org>
-Build-Depends: debhelper (>= 5), audacious-dev
+Build-Depends: debhelper (>= 5), dpatch, audacious-dev (>= 1.4.0-1)
Standards-Version: 3.7.2
Package: wmauda
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Recommends: audacious
+Depends: ${shlibs:Depends}, ${misc:Depends}, audacious (>= 1.4.0-1)
Description: remote-control dockapp for Audacious
wmauda is a dockapp for WindowMaker and other window managers that support
dockable applets. It acts as a remote control for the Audacious media player.
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..01abf7b
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,3 @@
+10_Makefile_default_CFLAGS
+11_fix_pixmap_depth
+12_port_to_audacious_1.4
diff --git a/debian/patches/10_Makefile_default_CFLAGS.dpatch b/debian/patches/10_Makefile_default_CFLAGS.dpatch
new file mode 100644
index 0000000..64a423b
--- /dev/null
+++ b/debian/patches/10_Makefile_default_CFLAGS.dpatch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_Makefile_default_CFLAGS.dpatch by <jblache at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adjust default CFLAGS
+
+ at DPATCH@
+diff -urNad wmauda-0.3~/Makefile wmauda-0.3/Makefile
+--- wmauda-0.3~/Makefile 2007-11-13 11:45:44.000000000 +0100
++++ wmauda-0.3/Makefile 2007-11-13 11:54:56.671568203 +0100
+@@ -1,5 +1,5 @@
+ CC ?= gcc
+-CFLAGS ?= -g -pipe
++CFLAGS ?= -g -O2 -Wall -pipe
+
+ PREFIX ?= /usr/local
+
diff --git a/debian/patches/11_fix_pixmap_depth.dpatch b/debian/patches/11_fix_pixmap_depth.dpatch
new file mode 100644
index 0000000..94b7ba9
--- /dev/null
+++ b/debian/patches/11_fix_pixmap_depth.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_fix_pixmap_depth.dpatch by <jblache at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix launch_pixmap creation; use drawable depth instead of specifying an
+## DP: erroneous depth.
+
+ at DPATCH@
+diff -urNad wmauda-0.3~/wmauda.c wmauda-0.3/wmauda.c
+--- wmauda-0.3~/wmauda.c 2007-11-13 11:45:44.000000000 +0100
++++ wmauda-0.3/wmauda.c 2007-11-13 11:47:49.757405676 +0100
+@@ -703,8 +703,7 @@
+ gdk_window_clear(icon_win->window);
+ dock_gc = gdk_gc_new(icon_win->window);
+
+- launch_pixmap = gdk_pixmap_new(icon_win->window, 64, 64,
+- gdk_visual_get_best_depth());
++ launch_pixmap = gdk_pixmap_new(icon_win->window, 64, 64, -1);
+
+ launch_mask = gdk_pixmap_new(icon_win->window, 64, 64, 1);
+ mask_gc = gdk_gc_new(launch_mask);
diff --git a/debian/patches/12_port_to_audacious_1.4.dpatch b/debian/patches/12_port_to_audacious_1.4.dpatch
new file mode 100644
index 0000000..5531076
--- /dev/null
+++ b/debian/patches/12_port_to_audacious_1.4.dpatch
@@ -0,0 +1,305 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_port_to_audacious_1.4.dpatch by <jblache at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Port to Audacious 1.4 and the DBus remote control interface.
+
+ at DPATCH@
+diff -urNad wmauda-0.3~/Makefile wmauda-0.3/Makefile
+--- wmauda-0.3~/Makefile 2007-11-13 12:06:22.996335098 +0100
++++ wmauda-0.3/Makefile 2007-11-13 12:06:28.729802587 +0100
+@@ -7,7 +7,7 @@
+ PIXMAP_DIR := $(PREFIX)/share/pixmaps
+ MANPAGE_DIR := $(PREFIX)/share/man/man1
+
+-CFLAGS += $(shell pkg-config audacious --cflags)
++CFLAGS += $(shell pkg-config audacious --cflags) -I/usr/include/dbus-1.0
+ LIBS := $(shell pkg-config audacious --libs)
+
+ OBJS = wmauda.o
+diff -urNad wmauda-0.3~/wmauda.1 wmauda-0.3/wmauda.1
+--- wmauda-0.3~/wmauda.1 2007-11-13 12:06:22.262403200 +0100
++++ wmauda-0.3/wmauda.1 2007-11-13 12:06:23.320307534 +0100
+@@ -17,9 +17,6 @@
+ .B \-h, \-\-help
+ Show summary of options.
+ .TP
+-.B \-s, \-\-session
+-Select Audacious session (Default: 0).
+-.TP
+ .B \-c, \-\-command
+ Command to start audacious (Default: audacious).
+ .TP
+diff -urNad wmauda-0.3~/wmauda.c wmauda-0.3/wmauda.c
+--- wmauda-0.3~/wmauda.c 2007-11-13 12:06:23.038331222 +0100
++++ wmauda-0.3/wmauda.c 2007-11-13 12:06:23.322309074 +0100
+@@ -28,7 +28,8 @@
+
+ #include "config.h"
+
+-#include "audacious/beepctrl.h"
++#include "audacious/audctrl.h"
++#include "audacious/dbus.h"
+ #include "dock-master.xpm"
+
+ #include <getopt.h>
+@@ -126,7 +127,7 @@
+ GdkGC *dock_gc;
+ GtkTooltips *tooltips = NULL;
+
+-int xmms_session = 0;
++DBusGProxy *dproxy = NULL;
+ char *xmms_cmd = "audacious";
+ gboolean xmms_running = FALSE;
+
+@@ -141,32 +142,32 @@
+
+ void action_play(void)
+ {
+- xmms_remote_play(xmms_session);
++ audacious_remote_play(dproxy);
+ }
+
+ void action_pause(void)
+ {
+- xmms_remote_pause(xmms_session);
++ audacious_remote_pause(dproxy);
+ }
+
+ void action_eject(void)
+ {
+- xmms_remote_eject(xmms_session);
++ audacious_remote_eject(dproxy);
+ }
+
+ void action_prev(void)
+ {
+- xmms_remote_playlist_prev(xmms_session);
++ audacious_remote_playlist_prev(dproxy);
+ }
+
+ void action_next(void)
+ {
+- xmms_remote_playlist_next(xmms_session);
++ audacious_remote_playlist_next(dproxy);
+ }
+
+ void action_stop(void)
+ {
+- xmms_remote_stop(xmms_session);
++ audacious_remote_stop(dproxy);
+ }
+
+ gboolean inside_region(int mx, int my, int x, int y, int w, int h)
+@@ -249,11 +250,11 @@
+ void real_draw_scrolltext(GdkWindow * w)
+ {
+ /* get titlestring */
+- gint pl_pos = xmms_remote_get_playlist_pos(xmms_session);
++ gint pl_pos = audacious_remote_get_playlist_pos(dproxy);
+
+ if (pl_pos != -1)
+ {
+- char *title = xmms_remote_get_playlist_title(xmms_session, pl_pos);
++ char *title = audacious_remote_get_playlist_title(dproxy, pl_pos);
+ if (title)
+ {
+ /* render text */
+@@ -338,17 +339,17 @@
+ {
+ if (event->button == 2)
+ {
+- if(xmms_remote_is_pl_win(xmms_session))
+- xmms_remote_pl_win_toggle(xmms_session, 0);
++ if(audacious_remote_is_pl_win(dproxy))
++ audacious_remote_pl_win_toggle(dproxy, 0);
+ else
+- xmms_remote_pl_win_toggle(xmms_session, 1);
++ audacious_remote_pl_win_toggle(dproxy, 1);
+ }
+ else if (event->button == 3)
+ {
+- if(xmms_remote_is_main_win(xmms_session))
+- xmms_remote_main_win_toggle(xmms_session, 0);
++ if(audacious_remote_is_main_win(dproxy))
++ audacious_remote_main_win_toggle(dproxy, 0);
+ else
+- xmms_remote_main_win_toggle(xmms_session, 1);
++ audacious_remote_main_win_toggle(dproxy, 1);
+ }
+ else if (event->button == 4 || event->button == 5)
+ {
+@@ -360,7 +361,7 @@
+ volslider_pos = 0;
+ if (volslider_pos > VOLSLIDER_HEIGHT)
+ volslider_pos = VOLSLIDER_HEIGHT;
+- xmms_remote_set_main_volume(xmms_session, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
++ audacious_remote_set_main_volume(dproxy, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
+ draw_volslider();
+ }
+ }
+@@ -382,7 +383,7 @@
+ if (inside_region(event->x, event->y, VOLSLIDER_X, VOLSLIDER_Y, VOLSLIDER_WIDTH, VOLSLIDER_HEIGHT))
+ {
+ volslider_pos = VOLSLIDER_HEIGHT - (event->y - VOLSLIDER_Y);
+- xmms_remote_set_main_volume(xmms_session, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
++ audacious_remote_set_main_volume(dproxy, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
+ draw_volslider();
+ volslider_dragging = TRUE;
+ }
+@@ -439,8 +440,8 @@
+ volslider_dragging = FALSE;
+ if (seekslider_dragging)
+ {
+- len = xmms_remote_get_playlist_time(xmms_session, xmms_remote_get_playlist_pos(xmms_session));
+- xmms_remote_jump_to_time(xmms_session, (seekslider_pos * len) / SEEKSLIDER_MAX);
++ len = audacious_remote_get_playlist_time(dproxy, audacious_remote_get_playlist_pos(dproxy));
++ audacious_remote_jump_to_time(dproxy, (seekslider_pos * len) / SEEKSLIDER_MAX);
+ seekslider_dragging = FALSE;
+ }
+
+@@ -475,7 +476,7 @@
+ volslider_pos = 0;
+ if (volslider_pos > VOLSLIDER_HEIGHT)
+ volslider_pos = VOLSLIDER_HEIGHT;
+- xmms_remote_set_main_volume(xmms_session, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
++ audacious_remote_set_main_volume(dproxy, (volslider_pos * 100) / VOLSLIDER_HEIGHT);
+ draw_volslider();
+ }
+ if (seekslider_dragging)
+@@ -505,7 +506,7 @@
+ if (!tooltips)
+ return;
+
+- new_pos = xmms_remote_get_playlist_pos(xmms_session);
++ new_pos = audacious_remote_get_playlist_pos(dproxy);
+
+ if (new_pos == 0)
+ {
+@@ -513,7 +514,7 @@
+ * Need to do some extra checking, as we get 0 also on
+ * a empty playlist
+ */
+- char *current = xmms_remote_get_playlist_file(xmms_session, 0);
++ char *current = audacious_remote_get_playlist_file(dproxy, 0);
+ if (!filename && current)
+ {
+ filename = current;
+@@ -537,7 +538,7 @@
+ {
+ char *tip = NULL;
+ char *title =
+- xmms_remote_get_playlist_title(xmms_session, new_pos);
++ audacious_remote_get_playlist_title(dproxy, new_pos);
+ if (title)
+ {
+ tip = g_strdup_printf("%d. %s", new_pos+1, title);
+@@ -554,7 +555,7 @@
+ int new_pos, pos;
+ gboolean playing, running;
+
+- running = xmms_remote_is_running(xmms_session);
++ running = audacious_remote_is_running(dproxy);
+
+ if (running)
+ {
+@@ -567,7 +568,7 @@
+ if (!volslider_dragging)
+ {
+ int vl, vr;
+- xmms_remote_get_volume(xmms_session, &vl, &vr);
++ audacious_remote_get_volume(dproxy, &vl, &vr);
+
+ new_pos = ((vl > vr ? vl : vr) * 40) / 100;
+
+@@ -586,7 +587,7 @@
+ update_tooltip();
+ draw_scrolltext();
+
+- playing = xmms_remote_is_playing(xmms_session);
++ playing = audacious_remote_is_playing(dproxy);
+ if (!playing && seekslider_visible)
+ {
+ seekslider_visible = FALSE;
+@@ -596,8 +597,8 @@
+ }
+ else if (playing)
+ {
+- int len, p = xmms_remote_get_playlist_pos(xmms_session);
+- len = xmms_remote_get_playlist_time(xmms_session, p);
++ int len, p = audacious_remote_get_playlist_pos(dproxy);
++ len = audacious_remote_get_playlist_time(dproxy, p);
+ if (len == -1)
+ {
+ seekslider_visible = FALSE;
+@@ -608,7 +609,7 @@
+ else if (!seekslider_dragging)
+ {
+ seekslider_visible = TRUE;
+- pos = xmms_remote_get_output_time(xmms_session);
++ pos = audacious_remote_get_output_time(dproxy);
+ if (len != 0)
+ new_pos = (pos * SEEKSLIDER_MAX) / len;
+ else
+@@ -647,9 +648,9 @@
+ if (selection_data->data)
+ {
+ char *url = selection_data->data;
+- xmms_remote_playlist_clear(xmms_session);
+- xmms_remote_playlist_add_url_string(xmms_session, url);
+- xmms_remote_play(xmms_session);
++ audacious_remote_playlist_clear(dproxy);
++ audacious_remote_playlist_add_url_string(dproxy, url);
++ audacious_remote_play(dproxy);
+ }
+ }
+
+@@ -787,15 +788,17 @@
+ cmd);
+ }
+
++static DBusGConnection *connection = NULL;
++
+ int main(int argc, char **argv)
+ {
+ int c, dummy;
++ GError *error = NULL;
+
+ static struct option lopt[] =
+ {
+ {"help", no_argument, 0, 'h'},
+ {"geometry", required_argument, 0, 'g'},
+- {"session", required_argument, 0, 's'},
+ {"command", required_argument, 0, 'c'},
+ {"icon", required_argument, 0, 'i'},
+ {"single", no_argument, 0, 'n'},
+@@ -808,6 +811,19 @@
+
+ gtk_init(&argc, &argv);
+
++ connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
++
++ if (connection == NULL)
++ {
++ fprintf(stderr, "Could not create a DBus connection, aborting\n");
++
++ exit(1);
++ }
++
++ dproxy = dbus_g_proxy_new_for_name(connection, AUDACIOUS_DBUS_SERVICE,
++ AUDACIOUS_DBUS_PATH,
++ AUDACIOUS_DBUS_INTERFACE);
++
+ while ((c = getopt_long(argc, argv, "hg:s:c:i:ntv", lopt, NULL)) != -1)
+ {
+ switch (c)
+@@ -821,9 +837,6 @@
+ &dummy, &dummy);
+ has_geometry = TRUE;
+ break;
+- case 's':
+- xmms_session = atoi(optarg);
+- break;
+ case 'c':
+ xmms_cmd = g_strdup(optarg);
+ break;
diff --git a/debian/rules b/debian/rules
index 83b6661..c87670b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,8 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+# Include dpatch rules
+include /usr/share/dpatch/dpatch.make
CFLAGS = -Wall -g
@@ -28,7 +30,7 @@ configure-stamp:
build: build-stamp
-build-stamp: configure-stamp
+build-stamp: patch-stamp configure-stamp
dh_testdir
# Add here commands to compile the package.
@@ -36,7 +38,8 @@ build-stamp: configure-stamp
touch $@
-clean:
+clean: real-clean unpatch
+real-clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
@@ -81,4 +84,4 @@ binary-arch: build install
dh_builddeb
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch real-clean
diff --git a/wmauda.c b/wmauda.c
index ab2a725..e4e37a4 100644
--- a/wmauda.c
+++ b/wmauda.c
@@ -703,7 +703,8 @@ void init(void)
gdk_window_clear(icon_win->window);
dock_gc = gdk_gc_new(icon_win->window);
- launch_pixmap = gdk_pixmap_new(icon_win->window, 64, 64, -1);
+ launch_pixmap = gdk_pixmap_new(icon_win->window, 64, 64,
+ gdk_visual_get_best_depth());
launch_mask = gdk_pixmap_new(icon_win->window, 64, 64, 1);
mask_gc = gdk_gc_new(launch_mask);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmauda.git
More information about the Pkg-wmaker-commits
mailing list