Ensembl / Bio-DB-HTS

Git repo for Bio::DB::HTS module on CPAN, providing Perl links into HTSlib
Apache License 2.0
24 stars 16 forks source link

Build.PL: Improve pkgconfig integration #74

Closed mkszuba closed 5 years ago

mkszuba commented 6 years ago

The old way of using pkgconfig in Build.PL has got a few shortcomings:

This commit adds an alternative implementation of pkgconfig-based detection of htslib which retrieves both includedir and libdir, uses --cflags and --libs instead of accessing variables directly, and which avoids custom implementation of the handling of pkg-config output by using an existing Perl module designed for that purpose. It also extends set_include_and_compiler_flags() to handle the scenario of $hts_include and $hts_lib being empty, which is the case when --cflags/--libs are used and htslib has been installed to a standard prefix such as /usr.

In order to retain backward compatibility, for the time being the new implementation is only invoked after all earlier attempts of locating htslib - including the old way of invoking pkg-config - have failed. Will leave it to the maintainers to decide whether to move this implementation up in the queue and/or retire any old detection modes.

Note that this adds an optional build-time dependency on ExtUtils::PkgConfig.

mkszuba commented 5 years ago

Rebased against current master.

zmughal commented 1 year ago

This has been merged, but the change is not present on CPAN. Could a new version be released?