diff --git a/audacious-plugins-2.2-ladspa-restore.patch b/audacious-plugins-2.2-ladspa-restore.patch new file mode 100644 index 0000000..57db200 --- /dev/null +++ b/audacious-plugins-2.2-ladspa-restore.patch @@ -0,0 +1,74 @@ +diff -Nur audacious-plugins-2.2-orig/src/ladspa/ladspa.c audacious-plugins-2.2-ladspa/src/ladspa/ladspa.c +--- audacious-plugins-2.2-orig/src/ladspa/ladspa.c 2009-11-22 23:49:53.000000000 +0100 ++++ audacious-plugins-2.2-ladspa/src/ladspa/ladspa.c 2010-02-04 12:07:59.000000000 +0100 +@@ -145,7 +145,6 @@ + + static void restore(void) + { +-#if 0 + mcs_handle_t *db; + gint k, plugins = 0; + +@@ -157,16 +156,20 @@ + gint id; + int port, ports = 0; + plugin_instance *instance; +- gchar *bn, *section; ++ gchar *bn, *section, *file; + +- bn = g_path_get_basename(instance->filename); +- section = g_strdup_printf("ladspa_plugin:%s:%d", bn, k); +- g_free(bn); ++ section = g_strdup_printf("ladspa_plugin%ld", k); + + aud_cfg_db_get_int(db, section, "id", &id); + aud_cfg_db_get_int(db, section, "ports", &ports); +- +- instance = add_plugin(get_plugin_by_id(id)); ++ if (!aud_cfg_db_get_string(db, section, "file", &file)) { ++ g_free(section); ++ continue; ++ } ++ bn = g_path_get_basename(file); ++ g_free(file); ++ instance = add_plugin(get_plugin_by_id(bn,id)); ++ g_free(bn); + if (!instance) + continue; /* couldn't load this plugin */ + +@@ -180,7 +183,6 @@ + } + + aud_cfg_db_close(db); +-#endif + + state.initialised = TRUE; + } +@@ -222,8 +224,8 @@ + if (ladspa_path == NULL) + { + /* Fallback, look in obvious places */ +- find_plugins("/usr/lib/ladspa"); +- find_plugins("/usr/local/lib/ladspa"); ++ find_plugins("__RPM_LIBDIR__/ladspa"); ++ find_plugins("/usr/local/__RPM_LIB__/ladspa"); + } + else + { +@@ -306,7 +308,7 @@ + int port, ports = 0; + + bn = g_path_get_basename(instance->filename); +- section = g_strdup_printf("ladspa_plugin:%s:%ld", bn, instance->descriptor->UniqueID); ++ section = g_strdup_printf("ladspa_plugin%ld", plugins); + g_free(bn); + + aud_cfg_db_set_int(db, section, "id", instance->descriptor->UniqueID); +@@ -325,6 +327,7 @@ + aud_cfg_db_set_int(db, section, "ports", ports); + g_free(section); + ladspa_shutdown(instance); ++ plugins++; + } + G_UNLOCK(running_plugins); + diff --git a/audacious-plugins.spec b/audacious-plugins.spec index 661e4f1..90cc50d 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -5,7 +5,7 @@ Name: audacious-plugins Version: 2.2 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia URL: http://audacious-media-player.org/ @@ -47,6 +47,9 @@ Patch10: audacious-plugins-2.2-adplug-lds.patch # reported upstream (AUDPLUG-180), as a rewrite of the plugin # would be better Patch11: audacious-plugins-2.2-streambrowser-race.patch +# huh? AUDPLUG-161 / bz561635 +# plus: hardcoded libdir replacement +Patch12: audacious-plugins-2.2-ladspa-restore.patch BuildRequires: audacious-devel >= %{aud_ver} BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel @@ -188,6 +191,14 @@ in Vortex (.vtx) format. %patch9 -p1 -b .adplug-fclose %patch10 -p1 -b .lds-out-of-bounds %patch11 -p1 -b .streambrowser-race +%patch12 -p1 -b .ladspa-restore + +for i in src/ladspa/ladspa.c +do + sed -i -e 's!__RPM_LIBDIR__!%{_libdir}!g' $i + sed -i -e 's!__RPM_LIB__!%{_lib}!g' $i +done +grep -q -s __RPM_LIB * -R && exit 1 sed -i '\,^.SILENT:,d' buildsys.mk.in @@ -281,6 +292,10 @@ update-desktop-database &> /dev/null || : %changelog +* Thu Feb 4 2010 Michael Schwendt - 2.2-16 +- Restore and fix the restore() function in "ladspa" plugin (#561635). +- Substitute hardcoded ladspa search paths in source code. + * Wed Feb 3 2010 Michael Schwendt - 2.2-15 - Prevent race condition crash in streambrowser GUI (#561469).