[ecasound] datadir/pkgdatadir patch (was: Re: Ecasound 2.3.5 released)

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sat Mar 26 2005 - 20:03:51 EET

Hello list,

another old item I dug up from my mail archives. :)

On Sat, 13 Nov 2004, Junichi Uekawa wrote:

> The following is a patch that I've had pending for the last year or two and
> never got around to doing.
>
> The patch will allow use of --datadir= option to ./configure, so that
> ecasound uses that value instead of hard-coding PREFIX/share/ecasound.
> (Which I am using for the Debian package)

I took a bit different approach to solve this problem: define ECA_DATADIR
in config.h, and use that in eca-resource.cpp (use path:
$datadir/ecasound) to locate global ecasoundrc. Is this ok to you, or
should it be possible to have a different pkgdatadir than
$datadir/ecasound?

I just put the eca-resource.cpp and configure.in changes to CVS.

[Junichi's original patch]
> diff -ur ecasound2.2-2.3.5/libecasound.orig/Makefile.am ecasound2.2-2.3.5/libecasound/Makefile.am
> --- ecasound2.2-2.3.5/libecasound.orig/Makefile.am 2004-11-13 11:03:21.000000000 +0900
> +++ ecasound2.2-2.3.5/libecasound/Makefile.am 2004-11-13 11:32:12.000000000 +0900
> @@ -49,6 +49,9 @@
> -I$(top_srcdir)/kvutils \
> $(ECA_S_EXTRA_CPPFLAGS)
>
> +# Add this to CPPFLAGS
> +CPPFLAGS += "-DPKGDATADIR=\"${pkgdatadir}\""
> +
> # ----------------------------------------------------------------------
> # header files
> # ----------------------------------------------------------------------
> diff -ur ecasound2.2-2.3.5/libecasound.orig/eca-resources.cpp ecasound2.2-2.3.5/libecasound/eca-resources.cpp
> --- ecasound2.2-2.3.5/libecasound.orig/eca-resources.cpp 2004-11-13 11:03:21.000000000 +0900
> +++ ecasound2.2-2.3.5/libecasound/eca-resources.cpp 2004-11-13 11:13:46.000000000 +0900
> @@ -36,8 +36,7 @@
> ECA_RESOURCES::ECA_RESOURCES(void)
> : resources_found_rep(true)
> {
> - string ecasound_prefix (ECA_PREFIX);
> - string ecasound_resource_path = ecasound_prefix + "/share/ecasound";
> + string ecasound_resource_path (PKGDATADIR);
>
> globalrc_repp = new RESOURCE_FILE();
> globalrc_repp->resource_file(ecasound_resource_path + "/ecasoundrc");

-- 
  http://www.eca.cx
  Audio software for Linux!
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sat Mar 26 20:15:12 2005

This archive was generated by hypermail 2.1.8 : Sat Mar 26 2005 - 20:15:12 EET