PerlAlien / Alien-Build

Build external dependencies for use in CPAN
16 stars 25 forks source link

Document somewhere about multiple use probe plugins #298

Closed plicease closed 2 years ago

plicease commented 2 years ago

@shawnlaffan asked about using probe plugins on IRC.

[6:49:59 am] <plicease> shawn: The PkgConfig plugins were re-worked at some point to allow multiple probes.
[6:51:04 am] <plicease> Alien::Libxml2 is an example of a very complicated alienfile that uses multiuple probes
[6:51:04 am] <plicease> https://metacpan.org/release/PLICEASE/Alien-Libxml2-0.17/source/alienfile
[6:51:55 am] <plicease> In theory all of the core probe plugins should support  multuiple use with other probes, so if you find otherwise I would consider it a bug.
[6:53:56 am] <plicease> You want at least AB 2.36 because bugs were fixed then
[6:54:04 am] <plicease> https://metacpan.org/dist/Alien-Build/changes#L48

This should probably be documented somewhere, maybe in the FAQ even though it isn't that frequent.

shawnlaffan commented 2 years ago

Thanks. Will have a look.

shawnlaffan commented 2 years ago

FWIW, I have updated the alienfiles for Alien::proj and Alien::geos::af to use multiple probes, and it all works.

As for documentation, perhaps in the alienfile POD would be good. Maybe all that is needed is something like "Multiple probes and probe plugins can be given. These will be used in sequence, stopping at the first that detects a system installation. Alien::Build will use a share install if no system installation is detected by the probes."

plicease commented 2 years ago

Thanks I think your wording is perfect. I've also added a note to PluginAuthor.pod. #327