[xmp] Rewrite the Audacious plugin for Audacious 2.5. Verbose build log with V=1 make. Update the audaciou
Michael Schwendt
mschwendt at fedoraproject.org
Mon Mar 28 19:37:49 UTC 2011
commit 3e5651583165cfa5b8f39ff0d206def8de6f71c4
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Mon Mar 28 21:37:41 2011 +0200
Rewrite the Audacious plugin for Audacious 2.5.
Verbose build log with V=1 make.
Update the audacious(plugin-api) stuff in the spec file for Audacious 2.5.
xmp-3.3.0-aud25.patch | 704 +++++++++++++++++++++++++++++++++++++++++++++++++
xmp.spec | 21 +-
2 files changed, 718 insertions(+), 7 deletions(-)
---
diff --git a/xmp-3.3.0-aud25.patch b/xmp-3.3.0-aud25.patch
new file mode 100644
index 0000000..52e21fb
--- /dev/null
+++ b/xmp-3.3.0-aud25.patch
@@ -0,0 +1,704 @@
+diff -Nur xmp-3.3.0-orig/src/plugin/audacious.c xmp-3.3.0/src/plugin/audacious.c
+--- xmp-3.3.0-orig/src/plugin/audacious.c 2010-12-02 01:52:51.000000000 +0100
++++ xmp-3.3.0/src/plugin/audacious.c 2011-03-28 21:30:25.000000000 +0200
+@@ -4,11 +4,13 @@
+ * Based on J. Nick Koston's MikMod plugin for XMMS
+ */
+
++/* Audacious 2.5 port/rewrite for Fedora by Michael Schwendt
++ */
++
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <limits.h>
+-#include <pthread.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <ctype.h>
+@@ -16,67 +18,23 @@
+ #include <audacious/configdb.h>
+ #include <audacious/plugin.h>
+
+-#if __AUDACIOUS_PLUGIN_API__ < 16
+-#include <audacious/util.h>
+-#else
+ #include <gtk/gtk.h>
+-#define aud_tuple_new_from_filename tuple_new_from_filename
+-#define aud_tuple_associate_string tuple_associate_string
+-#define aud_tuple_associate_int tuple_associate_int
+-#endif
+
+ #include "xmp.h"
+ #include "common.h"
+ #include "driver.h"
+
+-#if __AUDACIOUS_PLUGIN_API__ >= 12
+-#define CONST12 const
+-#else
+-#define CONST12
+-#endif
+-
+-static void init (void);
+-static int is_our_file (CONST12 char *);
+-static void play_file (InputPlayback *);
+-static void stop (InputPlayback *);
+-static void mod_pause (InputPlayback *, short);
+-static void seek (InputPlayback *, int);
+-static int get_time (InputPlayback *);
+-static void *play_loop (void *);
+-static void aboutbox (void);
+-#if __AUDACIOUS_PLUGIN_API__ >= 8
+-static int is_our_file_from_vfs(CONST12 char *, VFSFile *);
+-#endif
+-#if __AUDACIOUS_PLUGIN_API__ < 12
+-static void get_song_info (char *, char **, int *);
+-#endif
+-static void configure (void);
+-static void config_ok (GtkWidget *, gpointer);
+-static void mseek (InputPlayback *, gulong);
+-static void cleanup (void);
+-
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+-static Tuple *get_song_tuple (CONST12 char *);
+-#endif
+-
+-static GThread *decode_thread;
+-static GStaticMutex load_mutex = G_STATIC_MUTEX_INIT;
++static GMutex *seek_mutex;
++static GCond *seek_cond;
++static gint jumpToTime = -1;
++static gboolean stop_flag = FALSE;
+
++static xmp_context ctx;
+
+ #define FREQ_SAMPLE_44 0
+ #define FREQ_SAMPLE_22 1
+ #define FREQ_SAMPLE_11 2
+
+-static struct {
+- InputPlayback *ipb;
+-#if __AUDACIOUS_PLUGIN_API__ < 16
+- AFormat fmt;
+-#else
+- int fmt;
+-#endif
+- int nch;
+-} play_data;
+-
+ typedef struct {
+ gint mixing_freq;
+ gint force8bit;
+@@ -92,9 +50,7 @@
+ struct xmp_module_info mod_info;
+ } XMPConfig;
+
+-
+ XMPConfig xmp_cfg;
+-static gboolean xmp_plugin_audio_error = FALSE;
+
+ static GtkWidget *Res_16;
+ static GtkWidget *Res_8;
+@@ -113,63 +69,16 @@
+ static GtkWidget *xmp_conf_window = NULL;
+ static GtkWidget *about_window = NULL;
+
+-int skip = 0;
+-static short audio_open = FALSE;
+-
+-/* Filtering files by suffix is really stupid. */
+-static const gchar *fmts[] = {
+- "xm", "mod", "m15", "it", "s2m", "s3m", "stm", "stx", "med", "dmf",
+- "mtm", "ice", "imf", "ptm", "mdl", "ult", "liq", "psm", "amf",
+- "rtm", "pt3", "tcb", "dt", "gtk", "dtt", "mgt", "digi", "dbm",
+- "emod", "okt", "sfx", "far", "umx", "stim", "mtp", "ims", "669",
+- "fnk", "funk", "amd", "rad", "hsc", "alm", "kris", "ksm", "unic",
+- "zen", "crb", "tdd", "gmc", "gdm", "mdz", "xmz", "s3z", "j2b", NULL
+-};
+-
+-
+-InputPlugin xmp_ip = {
+- .description = "XMP Plugin " VERSION,
+- .init = init,
+- .about = aboutbox,
+- .configure = configure,
+- .is_our_file = is_our_file,
+- .play_file = play_file,
+- .stop = stop,
+- .pause = mod_pause,
+- .seek = seek,
+- .get_time = get_time,
+-#if __AUDACIOUS_PLUGIN_API__ >= 8
+- .is_our_file_from_vfs = is_our_file_from_vfs,
+-#endif
+-#if __AUDACIOUS_PLUGIN_API__ < 12
+- .get_song_info = get_song_info,
+-#endif
+- .cleanup = cleanup,
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+- .get_song_tuple = get_song_tuple,
+- .mseek = mseek,
+- .vfs_extensions = fmts,
+-#endif
+-};
+-
+-
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+-
+-InputPlugin *xmp_iplist[] = { &xmp_ip, NULL };
+-
+-DECLARE_PLUGIN(xmp, NULL, NULL, xmp_iplist, NULL, NULL, NULL, NULL, NULL);
+-
+-#endif
+-
+ extern struct xmp_drv_info drv_smix;
+
+
+-static void strip_vfs(char *s)
+-{
++static void strip_vfs(char *s) {
+ int len;
+ char *c;
+
+- g_static_mutex_lock(&load_mutex);
++ if (!s) {
++ return;
++ }
+ _D("%s", s);
+ if (!memcmp(s, "file://", 7)) {
+ len = strlen(s);
+@@ -187,11 +96,10 @@
+ memmove(c, c + 2, len - 1);
+ }
+ }
+- g_static_mutex_unlock(&load_mutex);
+ }
+
+-static void aboutbox()
+-{
++
++static void aboutbox() {
+ GtkWidget *vbox1;
+ GtkWidget *label1;
+ GtkWidget *about_exit;
+@@ -276,30 +184,32 @@
+ }
+
+
+-static xmp_context ctx;
+-
+-
+-static void stop(InputPlayback *ipb)
+-{
+- if (!ipb->playing)
+- return;
+-
++static void stop(InputPlayback *playback) {
+ _D("*** stop!");
+- xmp_stop_module(ctx);
+-
+- ipb->playing = 0;
+- g_thread_join(decode_thread);
+- ipb->output->close_audio();
+- audio_open = FALSE;
++ g_mutex_lock(seek_mutex);
++ if (!stop_flag) {
++ xmp_stop_module(ctx);
++ stop_flag = TRUE;
++ playback->output->abort_write();
++ g_cond_signal(seek_cond);
++ }
++ g_mutex_unlock(seek_mutex);
+ }
+
+-static void seek(InputPlayback *ipb, int time)
+-{
+- mseek(ipb, time * 1000);
++
++static void mseek(InputPlayback *playback, gint msec) {
++ g_mutex_lock(seek_mutex);
++ if (!stop_flag) {
++ jumpToTime = msec;
++ playback->output->abort_write();
++ g_cond_signal(seek_cond);
++ g_cond_wait(seek_cond, seek_mutex);
++ }
++ g_mutex_unlock(seek_mutex);
+ }
+
+-static void mseek(InputPlayback *ipb, unsigned long time)
+-{
++
++static void seek_ctx(gint time) {
+ int i, t;
+ struct xmp_player_context *p = &((struct xmp_context *)ctx)->p;
+
+@@ -315,59 +225,32 @@
+ if (i > 0)
+ i--;
+ a = xmp_ord_set(ctx, i);
+-#if __AUDACIOUS_PLUGIN_API__ < 13
+- ipb->output->flush(p->m.xxo_info[i].time);
+-#else
+- ipb->output->flush(p->m.xxo_info[i].time / 1000);
+-#endif
+ break;
+ }
+ }
+ }
+
+-static void mod_pause(InputPlayback *ipb, short p)
+-{
+- ipb->output->pause(p);
+-}
+-
+-
+-static int get_time(InputPlayback *ipb)
+-{
+- if (xmp_plugin_audio_error)
+- return -2;
+- if (!ipb->playing)
+- return -1;
+
+-#if __AUDACIOUS_PLUGIN_API__ < 13
+- return ipb->output->output_time();
+-#else
+- return ipb->output->written_time();
+-#endif
++static void mod_pause(InputPlayback *playback, gboolean p) {
++ g_mutex_lock(seek_mutex);
++ if (!stop_flag) {
++ playback->output->pause(p);
++ }
++ g_mutex_unlock(seek_mutex);
+ }
+
+
+-#if __AUDACIOUS_PLUGIN_API__ < 2
+-
+-InputPlugin *get_iplugin_info()
+-{
+- return &xmp_ip;
+-}
+-
+-#endif
+-
+-
+-static void init(void)
+-{
+-#if __AUDACIOUS_PLUGIN_API__ < 16
+- ConfigDb *cfg;
+-#else
++static gboolean init(void) {
+ mcs_handle_t *cfg;
+-#endif
+
+ _D("Plugin init");
+ xmp_drv_register(&drv_smix);
+ ctx = xmp_create_context();
+
++ jumpToTime = -1;
++ seek_mutex = g_mutex_new();
++ seek_cond = g_cond_new();
++
+ xmp_cfg.mixing_freq = 0;
+ xmp_cfg.convert8bit = 0;
+ xmp_cfg.fixloops = 0;
+@@ -395,150 +278,93 @@
+ }
+
+ xmp_init(ctx, 0, NULL);
++ return TRUE;
+ }
+
+
+-static void cleanup()
+-{
++static void cleanup() {
++ g_cond_free(seek_cond);
++ g_mutex_free(seek_mutex);
+ xmp_free_context(ctx);
+ }
+
+
+-static int is_our_file(CONST12 char *filename)
+-{
+- _D("filename = %s", filename);
+- strip_vfs((char *)filename); /* Sorry, no VFS support */
+-
+- if (xmp_test_module(ctx, (char *)filename, NULL) == 0)
+- return 1;
+-
+- return 0;
+-}
+-
+-#if __AUDACIOUS_PLUGIN_API__ >= 8
+-
+-static int is_our_file_from_vfs(CONST12 char* filename, VFSFile *vfsfile)
+-{
+- _D("filename = %s", filename);
+- strip_vfs((char *)filename); /* Sorry, no VFS support */
+-
+- if (xmp_test_module(ctx, (char *)filename, NULL) == 0)
+- return 1;
+-
+- return 0;
+-}
+-
+-#endif
+-
+-#if __AUDACIOUS_PLUGIN_API__ < 12
+-
+-static void get_song_info(char *filename, char **title, int *length)
+-{
+- xmp_context ctx2;
+- int lret;
+- struct xmp_module_info mi;
+- struct xmp_options *opt;
++static int is_our_file_from_vfs(const char* _filename, VFSFile *vfsfile) {
++ gchar *filename = g_strdup(_filename);
++ gboolean ret;
+
+ _D("filename = %s", filename);
+ strip_vfs(filename); /* Sorry, no VFS support */
+
+- /* Create new context to load a file and get the length */
+-
+- ctx2 = xmp_create_context();
+- opt = xmp_get_options(ctx2);
+- opt->skipsmp = 1; /* don't load samples */
+-
+- g_static_mutex_lock(&load_mutex);
+- lret = xmp_load_module(ctx2, filename);
+- g_static_mutex_unlock(&load_mutex);
+-
+- if (lret < 0) {
+- xmp_free_context(ctx2);
+- return;
+- }
+-
+- *length = lret;
+- xmp_get_module_info(ctx2, &mi);
+- *title = g_strdup(mi.name);
++ ret = (xmp_test_module(ctx, filename, NULL) == 0);
+
+- xmp_release_module(ctx2);
+- xmp_free_context(ctx2);
++ g_free(filename);
++ return ret;
+ }
+
+-#endif
+-
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+
+-static Tuple *get_song_tuple(CONST12 char *filename)
+-{
+- Tuple *tuple;
+- xmp_context ctx2;
+- int lret;
++Tuple *probe_for_tuple(const gchar *_filename, VFSFile *fd) {
++ gchar *filename = g_strdup(_filename);
++ xmp_context ctx;
++ int len;
++ Tuple *tuple;
+ struct xmp_module_info mi;
+ struct xmp_options *opt;
+
+ _D("filename = %s", filename);
+- strip_vfs((char *)filename); /* Sorry, no VFS support */
+-
+- tuple = aud_tuple_new_from_filename(filename);
+-
+- /* Create new context to load a file and get the length */
++ strip_vfs(filename); /* Sorry, no VFS support */
+
+- ctx2 = xmp_create_context();
+- opt = xmp_get_options(ctx2);
++ ctx = xmp_create_context();
++ opt = xmp_get_options(ctx);
+ opt->skipsmp = 1; /* don't load samples */
++ len = xmp_load_module(ctx, filename);
++ g_free(filename);
++ if (len < 0) {
++ xmp_free_context(ctx);
++ return NULL;
++ }
++
++ xmp_get_module_info(ctx, &mi);
++
++ tuple = tuple_new_from_filename(filename);
++ tuple_associate_string(tuple, FIELD_TITLE, NULL, mi.name);
++ tuple_associate_string(tuple, FIELD_CODEC, NULL, mi.type);
++ tuple_associate_int(tuple, FIELD_LENGTH, NULL, len);
+
+- g_static_mutex_lock(&load_mutex);
+- lret = xmp_load_module(ctx2, (char *)filename);
+- g_static_mutex_unlock(&load_mutex);
+-
+- if (lret < 0) {
+- xmp_free_context(ctx2);
+- return NULL;
+- }
+-
+- xmp_get_module_info(ctx2, &mi);
+-
+- aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, mi.name);
+- aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, mi.type);
+- aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, lret);
+-
+- xmp_release_module(ctx2);
+- xmp_free_context(ctx2);
+-
+- return tuple;
++ xmp_release_module(ctx);
++ xmp_free_context(ctx);
++ return tuple;
+ }
+
+-#endif
+
+-
+-static void play_file(InputPlayback *ipb)
+-{
+- char *filename = ipb->filename;
++static gboolean play(InputPlayback *ipb, const gchar *_filename, VFSFile *file, gint start_time, gint stop_time, gboolean pause) {
+ int channelcnt = 1;
+ FILE *f;
+ struct xmp_options *opt;
+- int lret;
++ int lret, fmt, nch;
++ void *data;
++ int size;
++ gchar *filename = g_strdup(_filename);
++ Tuple *tuple;
+
+ _D("play: %s\n", filename);
++ if (file == NULL) {
++ return FALSE;
++ }
+ opt = xmp_get_options(ctx);
+
+- /* Sorry, no VFS support */
+- strip_vfs(filename);
++ strip_vfs(filename); /* Sorry, no VFS support */
+
+ _D("play_file: %s", filename);
+
+- stop(ipb); /* sanity check */
++ jumpToTime = (start_time > 0) ? start_time : -1;
++ stop_flag = FALSE;
+
+ if ((f = fopen(filename,"rb")) == 0) {
+- ipb->playing = 0;
+- return;
++ goto PLAY_ERROR_1;
+ }
+ fclose(f);
+
+- xmp_plugin_audio_error = FALSE;
+- ipb->playing = 1;
+-
+ opt->resol = 8;
+ opt->verbosity = 0;
+ opt->drv_id = "smix";
+@@ -577,102 +403,85 @@
+
+ opt->mix = xmp_cfg.pan_amplitude;
+
+- play_data.ipb = ipb;
+- play_data.fmt = opt->resol == 16 ? FMT_S16_NE : FMT_U8;
+- play_data.nch = opt->outfmt & XMP_FMT_MONO ? 1 : 2;
++ fmt = opt->resol == 16 ? FMT_S16_NE : FMT_U8;
++ nch = opt->outfmt & XMP_FMT_MONO ? 1 : 2;
+
+- if (audio_open)
+- ipb->output->close_audio();
+-
+- if (!ipb->output->open_audio(play_data.fmt, opt->freq, play_data.nch)) {
+- ipb->error = TRUE;
+- xmp_plugin_audio_error = TRUE;
+- return;
++ if (!ipb->output->open_audio(fmt, opt->freq, nch)) {
++ goto PLAY_ERROR_1;
+ }
+-
+- audio_open = TRUE;
+
+ xmp_open_audio(ctx);
+
+ _D("*** loading: %s", filename);
+
+- g_static_mutex_lock(&load_mutex);
+ lret = xmp_load_module(ctx, filename);
+- g_static_mutex_unlock(&load_mutex);
++ g_free(filename);
+
+ if (lret < 0) {
+-#if __AUDACIOUS_PLUGIN_API__ < 13
+- xmp_ip.set_info_text("Error loading mod");
+-#endif
+- ipb->playing = 0;
+- return;
++ xmp_close_audio(ctx);
++ goto PLAY_ERROR_1;
+ }
+
+ xmp_cfg.time = lret;
+ xmp_get_module_info(ctx, &xmp_cfg.mod_info);
+
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+-#if __AUDACIOUS_PLUGIN_API__ >= 12
+- ipb->set_params(ipb, xmp_cfg.mod_info.name, lret,
+- xmp_cfg.mod_info.chn * 1000, opt->freq, channelcnt);
+-#else
+- ipb->set_params(ipb, xmp_cfg.mod_info.name, lret, 0,
+- opt->freq, channelcnt);
+-#endif
+- ipb->playing = 1;
+- ipb->eof = 0;
+- ipb->error = FALSE;
++ tuple = tuple_new_from_filename(filename);
++ tuple_associate_string(tuple, FIELD_TITLE, NULL, xmp_cfg.mod_info.name);
++ tuple_associate_string(tuple, FIELD_CODEC, NULL, xmp_cfg.mod_info.type);
++ tuple_associate_int(tuple, FIELD_LENGTH, NULL, lret);
++ ipb->set_tuple( ipb, tuple );
+
+- decode_thread = g_thread_self();
++ ipb->set_params(ipb, xmp_cfg.mod_info.chn * 1000, opt->freq, channelcnt);
+ ipb->set_pb_ready(ipb);
+- play_loop(ipb);
+-#else
+- xmp_ip.set_info(xmp_cfg.mod_info.name, lret, 0, opt->freq, channelcnt);
+- decode_thread = g_thread_create(play_loop, ipb, TRUE, NULL);
+-#endif
+-}
+-
+-
+-static gpointer play_loop(gpointer arg)
+-{
+- InputPlayback *ipb = arg;
+- void *data;
+- int size;
+
++ stop_flag = FALSE;
+ xmp_player_start(ctx);
+- while (xmp_player_frame(ctx) == 0) {
+- xmp_get_buffer(ctx, &data, &size);
+
+-#if __AUDACIOUS_PLUGIN_API__ >= 2
+- play_data.ipb->pass_audio(play_data.ipb, play_data.fmt,
+- play_data.nch, size, data, &play_data.ipb->playing);
+-
+-#else
+- xmp_ip.add_vis_pcm(xmp_ip.output->written_time(),
+- xmp_cfg.force8bit ? FMT_U8 : FMT_S16_NE,
+- xmp_cfg.force_mono ? 1 : 2, size, data);
+-
+- while (xmp_ip.output->buffer_free() < size && play_data.ipb->playing)
+- usleep(10000);
+-
+- if (play_data.ipb->playing)
+- xmp_ip.output->write_audio(data, size);
+-#endif
+- }
++ while ( !stop_flag ) {
++ if (stop_time >= 0 && ipb->output->written_time () >= stop_time) {
++ goto DRAIN;
++ }
++ g_mutex_lock(seek_mutex);
++ if ( jumpToTime != -1 ) {
++ seek_ctx(jumpToTime);
++ ipb->output->flush(jumpToTime);
++ jumpToTime = -1;
++ g_cond_signal(seek_cond);
++ }
++ g_mutex_unlock(seek_mutex);
+
++ xmp_get_buffer(ctx, &data, &size);
++ if ( !stop_flag && jumpToTime<0 ) {
++ ipb->output->write_audio(data,size);
++ }
++ if ( (xmp_player_frame(ctx) != 0) && jumpToTime<0 ) {
++ stop_flag = TRUE;
++ DRAIN:
++ while ( !stop_flag && ipb->output->buffer_playing() ) {
++ g_usleep(20000);
++ }
++ break;
++ }
++ }
++ g_mutex_lock(seek_mutex);
++ stop_flag = TRUE;
++ g_cond_signal(seek_cond); /* wake up any waiting request */
++ g_mutex_unlock(seek_mutex);
+
++ ipb->output->close_audio();
+ xmp_player_end(ctx);
+-
+ xmp_release_module(ctx);
+ xmp_close_audio(ctx);
++ return TRUE;
+
+- ipb->eof = 1;
+- ipb->playing = 0;
+-
+- return NULL;
++ PLAY_ERROR_1:
++ g_free(filename);
++ return FALSE;
+ }
+
+
++static void config_ok(GtkWidget *widget, gpointer data);
++
+ static void configure()
+ {
+ GtkWidget *notebook1;
+@@ -898,13 +707,8 @@
+ }
+
+
+-static void config_ok(GtkWidget *widget, gpointer data)
+-{
+-#if __AUDACIOUS_PLUGIN_API__ < 16
+- ConfigDb *cfg;
+-#else
++static void config_ok(GtkWidget *widget, gpointer data) {
+ mcs_handle_t *cfg;
+-#endif
+ struct xmp_options *opt;
+
+ opt = xmp_get_options(ctx);
+@@ -954,3 +758,31 @@
+ gtk_widget_destroy(xmp_conf_window);
+ }
+
++/* Filtering files by suffix is really stupid. */
++const gchar* const fmts[] = {
++ "xm", "mod", "m15", "it", "s2m", "s3m", "stm", "stx", "med", "dmf",
++ "mtm", "ice", "imf", "ptm", "mdl", "ult", "liq", "psm", "amf",
++ "rtm", "pt3", "tcb", "dt", "gtk", "dtt", "mgt", "digi", "dbm",
++ "emod", "okt", "sfx", "far", "umx", "stim", "mtp", "ims", "669",
++ "fnk", "funk", "amd", "rad", "hsc", "alm", "kris", "ksm", "unic",
++ "zen", "crb", "tdd", "gmc", "gdm", "mdz", "xmz", "s3z", "j2b", NULL
++};
++
++InputPlugin xmp_ip = {
++ .description = "XMP Plugin " VERSION,
++ .init = init,
++ .about = aboutbox,
++ .configure = configure,
++ .play = play,
++ .stop = stop,
++ .pause = mod_pause,
++ .probe_for_tuple = probe_for_tuple,
++ .is_our_file_from_vfs = is_our_file_from_vfs,
++ .cleanup = cleanup,
++ .mseek = mseek,
++ .vfs_extensions = fmts,
++};
++
++InputPlugin *xmp_iplist[] = { &xmp_ip, NULL };
++
++DECLARE_PLUGIN(xmp, NULL, NULL, xmp_iplist, NULL, NULL, NULL, NULL, NULL);
diff --git a/xmp.spec b/xmp.spec
index e36c6f6..67d4bbd 100644
--- a/xmp.spec
+++ b/xmp.spec
@@ -1,14 +1,14 @@
%define audacious_input_plugin_dir %(pkg-config --variable=input_plugin_dir audacious)
%define xmms_input_plugin_dir %(xmms-config --input-plugin-dir)
-%global aud_plugin_api %(grep '[ ]*#define[ ]*__AUDACIOUS_PLUGIN_API__' %{_includedir}/audacious/plugin.h 2>/dev/null | sed 's!.*__AUDACIOUS_PLUGIN_API__[ ]*\\([0-9]\\+\\).*!\\1!')
+%global aud_plugin_api %(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\\+' %{_includedir}/audacious/plugin.h 2>/dev/null | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\\([0-9]\\+\\).*!\\1!')
%if 0%{aud_plugin_api} > 0
%global aud_plugin_dep Requires: audacious(plugin-api) = %{aud_plugin_api}
%endif
Name: xmp
Version: 3.3.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: A multi-format module player
Group: Applications/Multimedia
#Source: http://downloads.sourceforge.net/sourceforge/xmp/xmp-%{version}.tar.gz
@@ -16,8 +16,9 @@ Group: Applications/Multimedia
Source: %{name}-%{version}-free.tar.gz
# run this to get the above tarball
Source1: mktarball.sh
-Patch0: 0001-Don-t-crash-Audacious-if-module-is-invalid.patch
-Patch1: 0002-Fix-Audacious-plugin-seek-position.patch
+#Patch0: 0001-Don-t-crash-Audacious-if-module-is-invalid.patch
+#Patch1: 0002-Fix-Audacious-plugin-seek-position.patch
+Patch2: xmp-3.3.0-aud25.patch
License: GPLv2+
URL: http://xmp.sourceforge.net/
Buildrequires: alsa-lib-devel
@@ -70,8 +71,9 @@ This package contains the xmp plugin for XMMS.
%endif
%setup -q
-%patch0 -p1
-%patch1 -p1
+#patch0 -p1
+#patch1 -p1
+%patch2 -p1 -b audacious-2.5
pushd docs
for file in ChangeLog CREDITS ; do
iconv -f iso8859-1 -t utf8 -o $file.utf $file && touch -r $file $file.utf && mv $file.utf $file
@@ -83,7 +85,7 @@ done
--enable-pulseaudio \
--enable-xmms-plugin
-%{__make} %{?_smp_mflags}
+%{__make} V=1 %{?_smp_mflags}
%install
rm -rf %{buildroot}
@@ -108,6 +110,11 @@ rm -rf %{buildroot}
%{xmms_input_plugin_dir}/*
%changelog
+* Sun Mar 27 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 3.3.0-7
+- Rewrite the Audacious plugin for Audacious 2.5.
+- Verbose build log with V=1 make.
+- Update the audacious(plugin-api) stuff in the spec file for Audacious 2.5.
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list