[audacious-plugin-fc] Update the audacious(plugin-api) stuff in the spec file, so the new _AUD_PLUGIN_VERSION_MIN is not t

Michael Schwendt mschwendt at fedoraproject.org
Wed Feb 23 20:20:16 UTC 2011


commit 3c287b24157b3ec3895cfc4259481a1529832760
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Wed Feb 23 21:20:20 2011 +0100

    Update the audacious(plugin-api) stuff in the spec file, so the new
    _AUD_PLUGIN_VERSION_MIN is not taken by mistake.
    Merge from 0.6-3.0.1:
    Patch and rebuild for Audacious 2.5-alpha1 generic plugin API bump.

 audacious-plugin-fc-0.6-plugin-api18.patch |  150 ++++++++++++++++++++++++++++
 audacious-plugin-fc.spec                   |   19 +++-
 2 files changed, 163 insertions(+), 6 deletions(-)
---
diff --git a/audacious-plugin-fc-0.6-plugin-api18.patch b/audacious-plugin-fc-0.6-plugin-api18.patch
new file mode 100644
index 0000000..67306f2
--- /dev/null
+++ b/audacious-plugin-fc-0.6-plugin-api18.patch
@@ -0,0 +1,150 @@
+diff -Nur audacious-plugin-fc-0.6-orig/src/main.c audacious-plugin-fc-0.6/src/main.c
+--- audacious-plugin-fc-0.6-orig/src/main.c	2010-07-23 09:51:35.000000000 +0200
++++ audacious-plugin-fc-0.6/src/main.c	2011-02-02 00:17:44.000000000 +0100
+@@ -22,8 +22,8 @@
+ #include <glib.h>
+ #include <fc14audiodecoder.h>
+ 
+-#if __AUDACIOUS_PLUGIN_API__ < 16
+-#error "At least Audacious 2.4 beta1 is required."
++#if _AUD_PLUGIN_VERSION < 18
++#error "At least Audacious 2.5 alpha1 is required."
+ #endif
+ 
+ #include "config.h"
+@@ -39,13 +39,16 @@
+ static GMutex *seek_mutex;
+ static GCond *seek_cond;
+ static gint jumpToTime = -1;
++static gboolean stop_flag = FALSE;
+ 
+-void ip_init(void) {
++gboolean ip_init(void) {
+     jumpToTime = -1;
+     seek_mutex = g_mutex_new();
+     seek_cond = g_cond_new();
+     
+     fc_ip_load_config();
++
++    return TRUE;
+ }
+ 
+ void ip_cleanup(void) {
+@@ -83,8 +86,8 @@
+         return FALSE;
+     }
+ 
+-    playback->playing = FALSE;
+     jumpToTime = (start_time > 0) ? start_time : -1;
++    stop_flag = FALSE;
+ 
+     if ( vfs_fseek(fd,0,SEEK_END)!=0 ) {
+         return FALSE;
+@@ -171,18 +174,17 @@
+     if ( haveSampleBuf && haveModule ) {
+         int msecSongLen = fc14dec_duration(decoder);
+ 
+-        Tuple *t = tuple_new_from_filename( playback->filename );
++        Tuple *t = tuple_new_from_filename( filename );
+         tuple_associate_int(t, FIELD_LENGTH, NULL, msecSongLen);
+         tuple_associate_string(t, FIELD_QUALITY, NULL, "sequenced");
+         playback->set_tuple( playback, t );
+ 
+         /* bitrate => 4*1000 will be displayed as "4 CHANNELS" */
+-        playback->set_params( playback, NULL, 0, 1000*4, myFormat.freq, myFormat.channels );
++        playback->set_params( playback, 1000*4, myFormat.freq, myFormat.channels );
+         
+-        playback->playing = TRUE;
+         playback->set_pb_ready(playback);
+ 
+-        while ( playback->playing ) {
++        while ( !stop_flag ) {
+             if (stop_time >= 0 && playback->output->written_time () >= stop_time) {
+                 goto DRAIN;
+             }
+@@ -196,23 +198,21 @@
+             g_mutex_unlock(seek_mutex);
+ 
+             fc14dec_buffer_fill(decoder,sampleBuf,sampleBufSize);
+-            if ( playback->playing && jumpToTime<0 ) {
++            if ( !stop_flag && jumpToTime<0 ) {
+                 playback->output->write_audio(sampleBuf,sampleBufSize);
+             }
+             if ( fc14dec_song_end(decoder) && jumpToTime<0 ) {
+-                playback->eof = TRUE;
+-                playback->playing = FALSE;
++                stop_flag = TRUE;
+  DRAIN:
+-                while (playback->output->buffer_playing() && playback->playing) {
++                while ( !stop_flag && playback->output->buffer_playing() ) {
+                     g_usleep(20000);
+                 }
+                 break;
+             }
+         }
+     }
+- CLEANUP:
+     g_mutex_lock(seek_mutex);
+-    playback->playing = FALSE;
++    stop_flag = TRUE;
+     g_cond_signal(seek_cond);  /* wake up any waiting request */
+     g_mutex_unlock(seek_mutex);
+ 
+@@ -224,25 +224,25 @@
+     
+ void ip_stop(InputPlayback *playback) {
+     g_mutex_lock(seek_mutex);
+-    if (playback->playing) {
+-        playback->playing = FALSE;
++    if (!stop_flag) {
++        stop_flag = TRUE;
+         playback->output->abort_write();
+         g_cond_signal(seek_cond);
+     }
+     g_mutex_unlock(seek_mutex);
+ }
+ 
+-void ip_pause(InputPlayback *playback, gshort p) {
++void ip_pause(InputPlayback *playback, gboolean p) {
+     g_mutex_lock(seek_mutex);
+-    if (playback->playing) {
++    if (!stop_flag) {
+         playback->output->pause(p);
+     }
+     g_mutex_unlock(seek_mutex);
+ }
+ 
+-void ip_mseek(InputPlayback *playback, gulong msec) {
++void ip_mseek(InputPlayback *playback, gint msec) {
+     g_mutex_lock(seek_mutex);
+-    if (playback->playing) {
++    if (!stop_flag) {
+         jumpToTime = msec;
+         playback->output->abort_write();
+         g_cond_signal(seek_cond);
+diff -Nur audacious-plugin-fc-0.6-orig/src/plugin.c audacious-plugin-fc-0.6/src/plugin.c
+--- audacious-plugin-fc-0.6-orig/src/plugin.c	2010-07-23 09:38:18.000000000 +0200
++++ audacious-plugin-fc-0.6/src/plugin.c	2011-02-02 00:14:04.257839525 +0100
+@@ -1,8 +1,8 @@
+ #include <audacious/plugin.h>
+ 
+-gchar *fc_fmts[] = { "fc", "fc13", "fc14", NULL };
++const gchar* const fc_fmts[] = { "fc", "fc13", "fc14", NULL };
+ 
+-void ip_init(void);
++gboolean ip_init(void);
+ void ip_cleanup(void);
+ void fc_ip_about(void);
+ void fc_ip_configure(void);
+@@ -10,9 +10,9 @@
+ gboolean ip_play(InputPlayback *playback, const gchar *filename, VFSFile *fd,
+                  gint start_time, gint stop_time, gboolean pause);
+ void ip_stop(InputPlayback *playback);
+-void ip_pause(InputPlayback *playback, gshort p);
++void ip_pause(InputPlayback *playback, gboolean p);
+ void ip_seek(InputPlayback *playback, gint secs);
+-void ip_mseek(InputPlayback *playback, gulong msec);
++void ip_mseek(InputPlayback *playback, gint msec);
+ Tuple *ip_probe_for_tuple(const gchar *filename, VFSFile *fd);
+ 
+ InputPlugin iplugin =
diff --git a/audacious-plugin-fc.spec b/audacious-plugin-fc.spec
index b2596ce..9ad0261 100644
--- a/audacious-plugin-fc.spec
+++ b/audacious-plugin-fc.spec
@@ -1,12 +1,11 @@
-# Minimum audacious/audacious-plugins version in inter-package dependencies.
-%global aud_ver 2.4.3
-
-%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
-
 %{?aud_plugin_dep}
+
+# Minimum audacious/audacious-plugins version in inter-package dependencies.
+%global aud_ver 2.5
 Requires: audacious >= %{aud_ver}
 
 %global plugindir %(pkg-config audacious --variable=input_plugin_dir 2>/dev/null)
@@ -14,11 +13,12 @@ Requires: audacious >= %{aud_ver}
 Summary: Future Composer input plugin for Audacious
 Name: audacious-plugin-fc
 Version: 0.6
-Release: 5%{?dist}
+Release: 6%{?dist}
 Provides: audacious-plugins-fc = %{version}-%{release}
 URL: http://xmms-fc.sourceforge.net/
 License: GPLv2+
 Source:	http://downloads.sourceforge.net/xmms-fc/audacious-plugin-fc-%{version}.tar.bz2
+Patch0: audacious-plugin-fc-0.6-plugin-api18.patch
 Group: Applications/Multimedia
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: audacious-devel >= %{aud_ver}
@@ -38,6 +38,7 @@ music files from AMIGA. Song-length detection and seek are implemented, too.
 %endif
 
 %setup -q
+%patch0 -p1 -b .plugin-api18
 
 
 %build
@@ -62,6 +63,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Feb 23 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-6
+- Update the audacious(plugin-api) stuff in the spec file, so the new
+  _AUD_PLUGIN_VERSION_MIN is not taken by mistake.
+- Merge from 0.6-3.0.1:
+- Patch and rebuild for Audacious 2.5-alpha1 generic plugin API bump.
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list