On Fri, Jan 27, 2012 at 05:52:04PM +0100, Cyril LAVIER wrote:
> After some research a patch seems to be available for having XMP
> working with audacious 3.2.
> 
> It's available here : 
> http://pkgs.fedoraproject.org/gitweb/?p=xmp.git;a=blob_plain;f=xmp-3.4.0-audacious-3.1.patch;h=250ae80a04c53e0aeedc9a5483a637039754b7f5;hb=HEAD
> 
> This patch was made for the fedora project by Michael Schwendt
> 
> I'm pretty sure I won't have time to test it this weekend, so in
> case anybody wants to give it a try, go on :).
> 
> Maybe there will be adjustments to be made in the patch, as it was
> written for the 3.1 release (and modified for the 3.2beta).

This seems to at least build, yes.  Here's a version of the above
massaged into quilt form.  I also had to cope with the fact that
audacious is configured to use multiarch paths nowadays.

  * Add patch from Fedora to fix build with Audacious 3.2 (LP: #935492).
  * Cope with audacious being built for multiarch.

diff -Nru xmp-3.4.0/debian/control xmp-3.4.0/debian/control
--- xmp-3.4.0/debian/control    2011-12-04 07:42:08.000000000 +0000
+++ xmp-3.4.0/debian/control    2012-03-05 11:44:11.000000000 +0000
@@ -6,7 +6,7 @@
 Standards-Version: 3.9.2
 Build-Depends: debhelper (>= 8), libxext-dev, libx11-dev, libxt-dev,
  libasound2-dev (>= 1.0) [linux-any] | libasound-dev (>= 1.0) [linux-any],
- libaudio-dev (>= 1.9), libpulse-dev, audacious-dev (>= 2.3)
+ libaudio-dev (>= 1.9), libpulse-dev, audacious-dev (>= 3.2-2)
 Homepage: http://xmp.sourceforge.net/
 
 Package: xmp-common
diff -Nru xmp-3.4.0/debian/patches/audacious-3.1.patch 
xmp-3.4.0/debian/patches/audacious-3.1.patch
--- xmp-3.4.0/debian/patches/audacious-3.1.patch        1970-01-01 
01:00:00.000000000 +0100
+++ xmp-3.4.0/debian/patches/audacious-3.1.patch        2012-03-05 
11:36:32.000000000 +0000
@@ -0,0 +1,201 @@
+Description: Port to Audacious 3.1 Preferences API
+Author: Michael Schwendt <mschwe...@fedoraproject.org>
+Origin: vendor, 
http://pkgs.fedoraproject.org/gitweb/?p=xmp.git;a=commitdiff;h=78b0091d111aa3a57b0a28fff3fc73f449625437
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/935492
+Bug-Debian: http://bugs.debian.org/657592
+Forwarded: http://freecode.com/projects/xmp/tickets/cd2770b6cd4
+Last-Update: 2012-03-05
+
+Index: b/src/plugin/audacious3.c
+===================================================================
+--- a/src/plugin/audacious3.c
++++ b/src/plugin/audacious3.c
+@@ -16,12 +16,12 @@
+ #include <unistd.h>
+ #include <ctype.h>
+ 
+-#include <audacious/configdb.h>
++#include <glib.h>
++#include <gtk/gtk.h>
+ #include <audacious/plugin.h>
++#include <audacious/misc.h>
+ #include <audacious/preferences.h>
+ #include <libaudgui/libaudgui-gtk.h>
+-#include <gtk/gtk.h>
+-#include <glib.h>
+ 
+ #include "xmp.h"
+ #include "common.h"
+@@ -66,6 +66,19 @@
+ 
+ XMPConfig xmp_cfg;
+ 
++static const gchar* const plugin_defaults[] = {
++    "mixing_freq", "0",
++    "convert8bit", "0",
++    "fixloops", "0",
++    "modrange", "0",
++    "force8bit", "0",
++    "force_mono", "0",
++    "interpolation", "TRUE",
++    "filter", "TRUE",
++    "pan_amplitude", "80",
++    NULL
++};
++
+ extern struct xmp_drv_info drv_smix;
+ 
+ 
+@@ -158,8 +171,6 @@
+ 
+ static gboolean init(void)
+ {
+-      mcs_handle_t *cfg;
+-
+       _D("Plugin init");
+       xmp_drv_register(&drv_smix);
+       ctx = xmp_create_context();
+@@ -168,19 +179,10 @@
+       seek_mutex = g_mutex_new();
+       seek_cond = g_cond_new();
+ 
+-      xmp_cfg.mixing_freq = 0;
+-      xmp_cfg.convert8bit = 0;
+-      xmp_cfg.fixloops = 0;
+-      xmp_cfg.modrange = 0;
+-      xmp_cfg.force8bit = 0;
+-      xmp_cfg.force_mono = 0;
+-      xmp_cfg.interpolation = TRUE;
+-      xmp_cfg.filter = TRUE;
+-      xmp_cfg.pan_amplitude = 80;
++    aud_config_set_defaults("XMP",plugin_defaults);
+ 
+-#define CFGREADINT(x) aud_cfg_db_get_int (cfg, "XMP", #x, &xmp_cfg.x)
++#define CFGREADINT(x) xmp_cfg.x = aud_get_int ("XMP", #x)
+ 
+-      if ((cfg = aud_cfg_db_open())) {
+               CFGREADINT(mixing_freq);
+               CFGREADINT(force8bit);
+               CFGREADINT(convert8bit);
+@@ -191,9 +193,6 @@
+               CFGREADINT(filter);
+               CFGREADINT(pan_amplitude);
+ 
+-              aud_cfg_db_close(cfg);
+-      }
+-
+       configure_init();
+ 
+       xmp_init(ctx, 0, NULL);
+@@ -412,7 +411,6 @@
+ 
+ static void configure_apply()
+ {
+-      mcs_handle_t *cfg;
+       struct xmp_options *opt;
+ 
+       /* transfer Preferences UI config values back into XMPConfig */
+@@ -435,9 +433,7 @@
+       opt = xmp_get_options(ctx);
+       opt->mix = xmp_cfg.pan_amplitude;
+ 
+-      cfg = aud_cfg_db_open();
+-
+-#define CFGWRITEINT(x) aud_cfg_db_set_int (cfg, "XMP", #x, xmp_cfg.x)
++#define CFGWRITEINT(x) aud_set_int ("XMP", #x, xmp_cfg.x)
+ 
+       CFGWRITEINT(mixing_freq);
+       CFGWRITEINT(force8bit);
+@@ -448,8 +444,6 @@
+       CFGWRITEINT(interpolation);
+       CFGWRITEINT(filter);
+       CFGWRITEINT(pan_amplitude);
+-
+-      aud_cfg_db_close(cfg);
+ }
+ 
+ static void configure_init(void)
+@@ -532,22 +526,23 @@
+               NULL, NULL, FALSE, .cfg_type = VALUE_BOOLEAN},
+       { WIDGET_LABEL, "Pan amplitude (%)", NULL, NULL, NULL, FALSE },
+       { WIDGET_SPIN_BTN, "", &guicfg.panamp, NULL, NULL, FALSE,
+-              { .spin_btn = { 0.0, 100.0, 1.0, "" } },
+-              .cfg_type = VALUE_FLOAT},
++      .cfg_type = VALUE_FLOAT, NULL, NULL,
++      { .spin_btn = { 0.0, 100.0, 1.0, "" } }
++    },
+ };
+ 
+ static PreferencesWidget prefs_opts_tab[] = {
+-      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+               {.box = { prefs_opts, G_N_ELEMENTS(prefs_opts), FALSE, FALSE}}},
+ };
+ 
+ static PreferencesWidget prefs_qual_row1[] = {
+-      { WIDGET_BOX, "Resolution", NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, "Resolution", NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, 
NULL,
+               { .box = { prefs_precision, G_N_ELEMENTS(prefs_precision),
+                       FALSE, TRUE }
+               }
+       },
+-      { WIDGET_BOX, "Channels", NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, "Channels", NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, 
NULL,
+               { .box = { prefs_channels, G_N_ELEMENTS(prefs_channels),
+                       FALSE, TRUE }
+               }
+@@ -555,7 +550,7 @@
+ };
+ 
+ static PreferencesWidget prefs_qual_row2[] = {
+-      { WIDGET_BOX, "Sampling rate", NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, "Sampling rate", NULL, NULL, NULL, FALSE, VALUE_NULL, 
NULL, NULL,
+               { .box = { prefs_frequency, G_N_ELEMENTS(prefs_frequency),
+                       FALSE, TRUE }
+               }
+@@ -563,12 +558,12 @@
+ };
+ 
+ static PreferencesWidget prefs_qual_box1[] = {
+-      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+               { .box = { prefs_qual_row1, G_N_ELEMENTS(prefs_qual_row1),
+                       TRUE, TRUE }
+               }
+       },
+-      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+               { .box = { prefs_qual_row2, G_N_ELEMENTS(prefs_qual_row2),
+                       FALSE, TRUE }
+               }
+@@ -576,7 +571,7 @@
+ };
+ 
+ static PreferencesWidget prefs_qual_tab[] = {
+-      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE,
++      { WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+               { .box = { prefs_qual_box1, G_N_ELEMENTS(prefs_qual_box1),
+                       FALSE, TRUE }
+               }
+@@ -589,7 +584,7 @@
+ };
+ 
+ static PreferencesWidget prefs[] = {
+-      {WIDGET_NOTEBOOK, NULL, NULL, NULL, NULL, FALSE,
++      {WIDGET_NOTEBOOK, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+               { .notebook = { prefs_tabs, G_N_ELEMENTS(prefs_tabs) } },
+       },
+ };
+Index: b/src/plugin/Makefile
+===================================================================
+--- a/src/plugin/Makefile
++++ b/src/plugin/Makefile
+@@ -47,7 +47,7 @@
+       eval $$CMD
+ 
+ $(PLUGIN_PATH)/audacious3.lo: $(PLUGIN_PATH)/audacious3.c 
$(PLUGIN_PATH)/Makefile
+-      @CMD='$(CC) $(CFLAGS) -fPIC -D_REENTRANT $(XCFLAGS) `pkg-config 
--cflags audacious` -o $@ $(PLUGIN_PATH)/audacious3.c'; \
++      @CMD='$(CC) $(CFLAGS) -fPIC -D_REENTRANT $(XCFLAGS) `pkg-config 
--cflags audacious glib-2.0 gtk+-3.0` -o $@ $(PLUGIN_PATH)/audacious3.c'; \
+       if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo CC $@ ; fi; \
+       eval $$CMD
+ 
diff -Nru xmp-3.4.0/debian/patches/series xmp-3.4.0/debian/patches/series
--- xmp-3.4.0/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
+++ xmp-3.4.0/debian/patches/series     2012-03-05 11:32:40.000000000 +0000
@@ -0,0 +1 @@
+audacious-3.1.patch
diff -Nru xmp-3.4.0/debian/xmp-audacious.install 
xmp-3.4.0/debian/xmp-audacious.install
--- xmp-3.4.0/debian/xmp-audacious.install      2011-08-11 09:00:25.000000000 
+0100
+++ xmp-3.4.0/debian/xmp-audacious.install      2012-03-05 11:43:08.000000000 
+0000
@@ -1 +1 @@
-debian/tmp/usr/lib/audacious/Input/*
+debian/tmp/usr/lib/*/audacious/Input/*

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to