On 8/2/10 7:19 PM, David Lowe wrote:
> I have an [admittedly minor] problem with my own package and lack the
> know how to find a solution.  Here's the story: the freeciv package
> is [at least for me] quite silent as built.  It is built with the
> appropriate configure flags to use sdl-mixer as a sound plugin, but
> .freeciv-client-rc-2.2 as installed by the .deb in ~ contains
> 'default_sound_plugin_name="none"' when it should contain
> 'default_sound_plugin_name="sdl"'.  This is not a show-stopper, as
> starting the client and setting the plugin to "sdl" works just fine.
> However, i don't think users should have to do this, and i see that
> in Ubuntu [for example] this works properly 'out of the box'.
>
> I've tried grepping the makefiles for "default_sound_plugin_name" and
> i don't find it.  Can somebody explain to me how i should be
> troubleshooting this?

An option like that is generally not kept in Makefiles.  If makefiles 
are involved, it's more likely as a defines that is then used by the c 
code.  This command "grep -r default_sound_plugin_name *" suggests that 
client/options.c is the file to modify.  I see 2 occurrences of 
default_sound_plugin_name there.  The first one (line 316) sets the 
default value for the -P option when freeciv is run via the command line 
(defaults to 0).  The second (line 475) is for the actual checkbox used 
in the Options dialog.  Presumably setting the first NULL to "sdl" 
(including the "") changes the setting.  I don't know which of the two 
locations would need to be changed.  It might be just one or both.

The following two lines modify each of the two instances.  Make a 
PatchScript field in the .info file, add them both, and then comment out 
(prefix with #) as needed until you get the right combination (don't 
forget to remove ~/.freeciv-client-rc-2.2 between runs to make sure you 
get a clean start).

perl -pi -e 's|default_sound_plugin_name\[512\] = 
"\\0"|default_sound_plugin_name\[512\] = "sdl"|' client/options.c

perl -pi -e 's|COC_SOUND, GUI_LAST, NULL|COC_SOUND, GUI_LAST, "sdl"|' 
client/options.c

Hanspeter

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to