Hi Ed,
Here come my opinions:
1/ Do not call it Allien::<whatever> as your approach is definitely
different from what you can find in Alien::* namespace on CPAN. Even today
the Alien::* moduels are not uniform and you are not helping to make it better.
2/ My suggestion is something like: "ExtUtils::Depend::ExtLib::HDF4" or
maybe create one distribution like "ExtUtils-Depend-ExtLib" containing many
modules like:
ExtUtils::Depend::ExtLib::HDF4
ExtUtils::Depend::ExtLib::GSL
ExtUtils::Depend::ExtLib::PROJ
ExtUtils::Depend::ExtLib::GD
... (maybe libnames HDF4, GSL in lowercase)
3/ I think it would be better not to start with a new CPAN module but at
the beginning keep it in "inc" dir of PDL core as we should probably first
tune it up to satisfy PDL core needs and than go "public":
e.g.
PDL-2.008/inc/ExtUtils/Depend/ExtLib/HDF4.pm
PDL-2.008/inc/ExtUtils/Depend/ExtLib/GSL.pm
...
4/ What is IMO missing are a/ simple detection; b/ detection with "trylink"
(detect + try to compile and link some sample *.c code)
e.g. "???::HDF4->is_available()" optionally with trylink
functionality "???::HDF4->is_available(trylink=>1)"
5/ Your HDF4 lib detection seems to be extracted from current PDL code.
What I would like to see is detection based on pkg-config /
ExtUtils::PkgConfig / PkgConfig (I mean before we start guessing the right
directory with header and *.a files let's try to use pkg-config).
<kmx crying>
In strawberry perl (MS Windows) I really try to do what I can on strawberry
perl side to make external libraries detection as easy as possible: 1/ if
necessary I bundle config scripts like gsl-config.bat etc. 2/ strawberry
perl has working pkg-config; 3/ strawberry perl supports
ExtUtils::PkgConfig module; 4/ strawberry perl supports PkgConfig module -
despite that you still find something like this
https://metacpan.org/source/ZOWIE/Alien-FFTW3-0.03/Build.PL#L7
</kmx crying>
--
kmx
On 1.3.2015 10:53, Ed wrote:
Dear PDL devs,
Please see https://github.com/PDLPorters/pdl/pull/21
All comments welcome!
Best regards,
Ed
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel