On 24/02/2012 21:54, Marvin Humphrey wrote:
We can provide similar functionality from Lucy.pm. Here's how a build script
for a distro which extends Lucy might use it:
eval "use Lucy;";
if ($@) {
warn "Can't load Lucy;
exit(0);
}
my $include_dirs = Lucy->include_dirs;
my $inc = "";
$inc .= "-I$_ " for @$include_dirs;
At first, I imagine include_dirs() returning only a single directory.
However, in the future we may break out Clownfish, and perhaps include_dirs()
should return the include paths for recursive dependencies:
package Lucy;
use Clownfish;
sub include_dirs {
my $dirs = Clownfish->include_dirs;
push @$dirs, _lucy_include_dir();
return $dirs;
}
+1
For the actual header tree, how about a dedicated directory at the following
location?
catdir( $ARCH_DIR, 'auto', 'Lucy', '_include' );
Here are some other modules that I found that install header files:
http://packages.debian.org/sid/amd64/pdl/filelist
http://packages.debian.org/sid/amd64/libglib-perl/filelist
http://packages.debian.org/sid/amd64/perl-tk/filelist
They don't put the .h files below 'auto' which makes sense, because
afaics 'auto' should only contain files used by AutoLoader.
I like the idea of an '_include' directory, so I would propose:
catdir( $ARCH_DIR, 'Lucy', '_include' );
Nick