diff --git a/audacious-2.1-pluginprio.patch b/audacious-2.1-pluginprio.patch new file mode 100644 index 0000000..603b230 --- /dev/null +++ b/audacious-2.1-pluginprio.patch @@ -0,0 +1,101 @@ +diff -Nur audacious-2.1-orig/src/audacious/pluginenum.c audacious-2.1/src/audacious/pluginenum.c +--- audacious-2.1-orig/src/audacious/pluginenum.c 2009-07-07 00:39:12.000000000 +0200 ++++ audacious-2.1/src/audacious/pluginenum.c 2009-08-24 10:53:57.000000000 +0200 +@@ -913,56 +913,68 @@ + g_free(cfg.enabled_dplugins); + cfg.enabled_dplugins = NULL; + +- if (!cfg.outputplugin) { +- for (prio = 10; prio >= 0; prio--) { +- for (node = op_data.output_list; node; node = g_list_next(node)) { ++ if (!cfg.outputplugin) ++ { ++ for (prio = 10; prio >= 0; prio--) ++ { ++ for (node = op_data.output_list; node; node = g_list_next(node)) ++ { + op = OUTPUT_PLUGIN(node->data); + + if (op->probe_priority != prio) + continue; + +- if (op->init) +- { +- OutputPluginInitStatus ret = op->init(); +- if (ret == OUTPUT_PLUGIN_INIT_NO_DEVICES) +- { +- g_message("Plugin %s reports no devices. Attempting to avert disaster, trying others.\n", +- g_path_get_basename(op->filename)); +- } +- else if (ret == OUTPUT_PLUGIN_INIT_FAIL) +- { +- g_message("Plugin %s was unable to initialise. Attemping to avert disaster, trying others.\n", +- g_path_get_basename(op->filename)); +- } +- else if (ret == OUTPUT_PLUGIN_INIT_FOUND_DEVICES) +- { ++ if (op->init) ++ { ++ OutputPluginInitStatus ret = op->init(); ++ gchar *base_filename = g_path_get_basename(op->filename); ++ switch (ret) { ++ case OUTPUT_PLUGIN_INIT_NO_DEVICES: ++ g_message("Plugin %s reports no devices. Attempting to avert disaster, trying others.", ++ base_filename); ++ break; ++ case OUTPUT_PLUGIN_INIT_FAIL: ++ g_message("Plugin %s was unable to initialise. Attemping to avert disaster, trying others.", ++ base_filename); ++ break; ++ case OUTPUT_PLUGIN_INIT_FOUND_DEVICES: ++ g_message("Plugin %s found devices.", base_filename); + if (!op_data.current_output_plugin) + op_data.current_output_plugin = op; +- } +- else if (!op_data.current_output_plugin) +- { +- g_message("Plugin %s did not report status, and no plugin has worked yet. Do you still need to convert it? Selecting for now...\n", +- g_path_get_basename(op->filename)); +- ++ break; ++ default: ++ g_message("Plugin %s did not report status, and no plugin has worked yet. " ++ "Do you still need to convert it? Selecting for now...", ++ base_filename); + if (!op_data.current_output_plugin) + op_data.current_output_plugin = op; ++ break; + } +- } ++ g_free(base_filename); ++ } + } + } + } + else + { +- for (node = op_data.output_list; node; node = g_list_next(node)) { ++ for (node = op_data.output_list; node; node = g_list_next(node)) ++ { ++ gchar *plugin_base_filename; ++ gchar *op_base_filename; + op = OUTPUT_PLUGIN(node->data); + +- if (op->init) { +- plugin_set_current((Plugin *)op); ++ if (op->init) ++ { ++ plugin_set_current((Plugin *) op); + op->init(); + } + +- if (!g_ascii_strcasecmp(g_path_get_basename(cfg.outputplugin), g_path_get_basename(op->filename))) ++ plugin_base_filename = g_path_get_basename(cfg.outputplugin); ++ op_base_filename = g_path_get_basename(op->filename); ++ if (!g_ascii_strcasecmp(plugin_base_filename, op_base_filename)) + op_data.current_output_plugin = op; ++ g_free(plugin_base_filename); ++ g_free(op_base_filename); + } + } + diff --git a/audacious.spec b/audacious.spec index d54d0f0..1bc0b46 100644 --- a/audacious.spec +++ b/audacious.spec @@ -5,7 +5,7 @@ Name: audacious Version: 2.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 Summary: GTK2 based media player similar to XMMS @@ -14,6 +14,9 @@ Group: Applications/Multimedia Source0: http://distfiles.atheme.org/audacious-%{version}.tgz +# will be obsolete in > 2.1 +Patch0: audacious-2.1-pluginprio.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gettext @@ -67,7 +70,7 @@ Files needed when building software for the Audacious media player. %prep %setup -q -n %{name}-%{version} - +%patch0 -p1 -b .pluginprio sed -i '\,^.SILENT:,d' buildsys.mk.in %build @@ -149,6 +152,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Aug 24 2009 Michael Schwendt - 2.1-3 +- Default to PulseAudio output plugin: Fix pluginenum.c indentation + to make output plugin default/priority init work. Actually, when I + noticed this bug, I went a step further and copied a rewrite from + upstream devel scm. + * Fri Jul 24 2009 Fedora Release Engineering - 2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild