Bio-DB-HTS
view release on metacpan or search on metacpan
sub find_hts {
my ($self) = @_;
# If either of these are set, we expect to find the htslib files there:
# (They're explicitly set by the user, so we shouldn't fall back to
# finding another copy somewhere else.)
if (my $dir = $self->args('htslib')) {
return 1 if $self->find_hts_in_build_dir($dir);
return 1 if $self->find_hts_in_install_dir($dir);
$self->die_hts_not_found(
"--htslib '$dir' command line parameter does not contain expected files\n"
);
}
elsif ($dir = $ENV{'HTSLIB_DIR'}) {
return 1 if $self->find_hts_in_build_dir($dir);
return 1 if $self->find_hts_in_install_dir($dir);
$self->die_hts_not_found(
"HTSLIB_DIR=$ENV{HTSLIB_DIR} environment variable does not contain expected files\n"
);
}
# Search through remaining possible (but not fatal) locations:
my $found = 0;
foreach my $dir (
$self->prefix,
from_Alien(),
scalar `pkg-config --variable=libdir htslib 2>/dev/null`,
qw{ /usr /usr/local /usr/share /opt/local },
) {
if ($dir and $self->find_hts_in_install_dir($dir)) {
$found = 1;
last;
}
}
return 1 if $found;
$self->die_hts_not_found();
}
sub set_include_and_compiler_flags {
my ($self) = @_;
my $hts_include = $self->config_data('hts_include');
my $hts_lib = $self->config_data('hts_lib');
my $static = $self->args('static');
$self->include_dirs([$hts_include]);
if($static){
if (hts_dev_files_exist($hts_lib, $hts_include)) {
$self->config_data('hts_lib' => $hts_lib);
$self->config_data('hts_include' => $hts_include);
return 1;
}
else {
return 0;
}
}
sub die_hts_not_found {
my ($self, $msg) = @_;
$msg ||= '';
die $msg, <<END;
This module requires HTSlib (http://htslib.org/)
Install it if you have not done so already.
This script will attempt to locate HTSlib by looking for htslib/hts.h
and libhts.a / libhts.so in:
new_stackinfo||5.005000|
new_version||5.009000|
new_warnings_bitfield|||
next_symbol|||
nextargv|||
nextchar|||
ninstr|||
no_bareword_allowed|||
no_fh_allowed|||
no_op|||
not_a_number|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
offer_nice_chunk|||
oopsAV|||
oopsHV|||
op_clear|||
op_const_sv|||
op_dump||5.006000|
op_free|||
#define DPPP_CAT2(x,y) CAT2(x,y)
#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
/* Replace: 1 */
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
/* Replace PERL_PATCHLEVEL with PERL_VERSION */
/* Replace: 0 */
# endif
#endif
( run in 1.052 second using v1.01-cache-2.11-cpan-0a987023a57 )