diff --git a/xmp-plugin-audacious-api45.patch b/xmp-plugin-audacious-api45.patch new file mode 100644 index 0000000..22f823d --- /dev/null +++ b/xmp-plugin-audacious-api45.patch @@ -0,0 +1,35 @@ +diff -Nurb --strip-trailing-cr xmp-plugin-audacious-ff914873bbf8bcdd552c78accfdb456c1cd76d5c-orig/audacious3.c xmp-plugin-audacious-ff914873bbf8bcdd552c78accfdb456c1cd76d5c-aud45/audacious3.c +--- xmp-plugin-audacious-ff914873bbf8bcdd552c78accfdb456c1cd76d5c-orig/audacious3.c 2013-11-27 16:47:03.000000000 +0100 ++++ xmp-plugin-audacious-ff914873bbf8bcdd552c78accfdb456c1cd76d5c-aud45/audacious3.c 2014-03-01 00:14:44.758087493 +0100 +@@ -251,9 +251,15 @@ + + tuple = tuple_new_from_filename(filename); + g_free(filename); ++#if _AUD_PLUGIN_VERSION >= 45 ++ tuple_set_str(tuple, FIELD_TITLE, mi.mod->name); ++ tuple_set_str(tuple, FIELD_CODEC, mi.mod->type); ++ tuple_set_int(tuple, FIELD_LENGTH, fi.total_time); ++#else + tuple_set_str(tuple, FIELD_TITLE, NULL, mi.mod->name); + tuple_set_str(tuple, FIELD_CODEC, NULL, mi.mod->type); + tuple_set_int(tuple, FIELD_LENGTH, NULL, fi.total_time); ++#endif + + xmp_release_module(ctx); + xmp_free_context(ctx); +@@ -364,9 +370,15 @@ + + tuple = tuple_new_from_filename(filename); + g_free(filename); ++#if _AUD_PLUGIN_VERSION >= 45 ++ tuple_set_str(tuple, FIELD_TITLE, plugin_cfg.mod_info.mod->name); ++ tuple_set_str(tuple, FIELD_CODEC, plugin_cfg.mod_info.mod->type); ++ tuple_set_int(tuple, FIELD_LENGTH, fi.total_time); ++#else + tuple_set_str(tuple, FIELD_TITLE, NULL, plugin_cfg.mod_info.mod->name); + tuple_set_str(tuple, FIELD_CODEC, NULL, plugin_cfg.mod_info.mod->type); + tuple_set_int(tuple, FIELD_LENGTH, NULL, fi.total_time); ++#endif + #if _AUD_PLUGIN_VERSION < 45 + ipb->set_tuple(ipb, tuple); + diff --git a/xmp-plugin-audacious.spec b/xmp-plugin-audacious.spec index 5bc682d..8541e48 100644 --- a/xmp-plugin-audacious.spec +++ b/xmp-plugin-audacious.spec @@ -3,18 +3,19 @@ %define audacious_input_plugin_dir %(pkg-config --variable=input_plugin_dir audacious) -%global aud_plugin_api %(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\\+' %{_includedir}/audacious/plugin.h 2>/dev/null | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\\([0-9]\\+\\).*!\\1!') +%global aud_plugin_api %(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\\+' %{_includedir}/audacious/api.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)%{?_isa} = %{aud_plugin_api} %endif Name: xmp-plugin-audacious Version: 4.0.0 -Release: 0.5.20131127git%{shortcommit}%{?dist} +Release: 0.6.20131127git%{shortcommit}%{?dist} Summary: Multi-format module playback plugin for Audacious using libxmp Group: Applications/Multimedia Source0: https://github.com/cmatsuoka/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz Patch0: %{name}-rpm.patch +Patch1: xmp-plugin-audacious-api45.patch License: GPLv2+ URL: http://xmp.sourceforge.net/ BuildRequires: audacious-devel @@ -45,6 +46,7 @@ This package contains the xmp plugin for the Audacious media player. %setup -qn %{name}-%{commit} %patch0 -p1 -b .r +%patch1 -p1 -b .old-api %build make OPTFLAGS="%{optflags}" V=1 %{?_smp_mflags} @@ -57,6 +59,10 @@ make install DESTDIR=%{buildroot} %{audacious_input_plugin_dir}/* %changelog +* Fri Feb 28 2014 Michael Schwendt - 4.0.0-0.6.20131127gitff01498 +- Patch for Audacious 3.5-devel API. +- Update aud_plugin_api global to examine api.h header. + * Tue Feb 25 2014 Dominik Mierzejewski - 4.0.0-0.5.20131127gitff91487 - updated to ff91487