0> In article <[EMAIL PROTECTED]>,
0> Sven Neumann <URL:mailto:[EMAIL PROTECTED]> ("Sven") wrote:

Sven> On Thu, 2006-08-10 at 14:36 +0100, Toby Speight wrote:

>> I'm playing around with my plug-in build system at the moment,
>> tidying up the automake/autoconf stuff as I go (and as I learn
>> about autotools - I'm a newbie there).  One thing I do is find the
>> Gimp plug-in directory like so:
>> /--------
>> | GIMP_LIBDIR=`$PKG_CONFIG --define-variable=prefix='DESTDIR' \
>> |    --variable=gimplibdir gimp-2.0`
>> \--------
>> On discovering Gimp's own autoconf macro file, I discover that it
>> does almost what I need:
>> /--------
>> |     GIMP_DATA_DIR=`$PKG_CONFIG $pkg_name --variable=gimpdatadir`
>> |     GIMP_PLUGIN_DIR=`$PKG_CONFIG $pkg_name --variable=gimplibdir`
>> \--------
>> The difference being that I have passed in the DESTDIR directory
>> supplied by Automake and used to target the installation.  Without
>> this, "make distcheck" fails because it tries to write to the real
>> plug-ins directory rather than the supplied staging directory.

Sven> Yes, that has always been a problem for plug-ins.  The plug-in
Sven> needs to be installed to the GIMP plug-in directory which may be
Sven> somewhere completely different than what's configured as the
Sven> plug-in's prefix.  I haven't seen a workaround for this yet.  If
Sven> your change works well, we should probably adopt it.

It Works For Me (TM).  My main concern is whether this would cause
problems for anyone using Autoconf (and the Gimp's macro) but not
Automake.  I suspect that most plug-ins that use any auto* tools are
probably based on Mitch's template, and so using Automake.

(time passes...)

Luckily, I didn't send this immediately: it's occurred to me that
there's a case for making available the real location (from which to
find existing plug-ins) as well as that into which the resultant
plug-in will be installed.  This will be necessary if a plug-in
depends on another, or if (say) an auto-test wants to use script-fu to
direct the test suite.

The way that this affects me is during feedback-directed optimisation,
where we want to run the plug-in in a minimal environment.  We do this by
setting GIMP2_DIRECTORY and GIMP2_PLUGINDIR to our carefully-controlled
directories; script-fu and any other dependencies are linked (or copied)
into our plug-in directory before running against the training data.

I'm still experimenting with this, so I could be way off-target here,
Gimp-developer mailing list

Reply via email to