1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
use strict;
use warnings;
use ExtUtils::MakeMaker;
use Config;
use PDL::Core::Dev;
##############################
# Try to use Alien::FFTW3 - but if it's not present
# fall back to pkg-config. This is so that
# a Debian package won't have to include Alien::FFTW3.
my $cflags;
my $libs;
$cflags = '';
$libs = '-lfftw3f -lfftw3';
my @package = (qw(fftw3.pd FFTW3 PDL::FFTW3), undef, 1);
my %descriptor = pdlpp_stdargs(\@package);
$descriptor{VERSION_FROM} = 'fftw3.pd';
# I support single and double precision FFTW calls, so both fftw and fftw3f
push @{$descriptor{LIBS} }, $libs;
$descriptor{INC} = '' unless defined $descriptor{INC};
$descriptor{INC} .= " $cflags";
$descriptor{PREREQ_PM} = {
'PDL' => '2.097', # fixed type-selecting
};
$descriptor{CONFIGURE_REQUIRES} = {
'PDL' => '2.097',
'IPC::Run' =>0,
# 'Alien::FFTW3' =>0,
};
$descriptor{BUILD_REQUIRES} = {'PDL::PP'=>0};
$descriptor{TEST_REQUIRES} = {'Test::More'=>'0.88'};
$descriptor{AUTHOR} = "Dima Kogan <dima\@secretsauce.net>, Craig DeForest <deforest\@boulder.swri.edu>";
$descriptor{ABSTRACT} = "PDL interface to the Fastest Fourier Transform in the West";
$descriptor{LICENSE} = "perl";
$descriptor{MIN_PERL_VERSION} = "5.016";
$descriptor{META_MERGE} = {
"meta-spec" => { version => 2 },
resources => {
bugtracker => { web => 'https://github.com/PDLPorters/pdl-fftw3/issues' },
repository => {
web => 'https://github.com/PDLPorters/pdl-fftw3',
url => 'git://github.com/PDLPorters/pdl-fftw3.git',
type => 'git',
},
x_IRC => 'irc://irc.perl.org/#pdl',
},
prereqs => {
develop => {
requires => {
'CPAN::Changes' => 0,
},
},
test => {
requires => {
'Test::More' => '0.98',
},
},
},
};
WriteMakefile( %descriptor );
sub MY::postamble {
return <<'FOO' . pdlpp_postamble(\@package);
install ::
@echo "Updating PDL documentation database...";
@$(PERL) -e "exit if $$ENV{DESTDIR}; use PDL::Doc; eval { PDL::Doc::add_module(q{PDL::FFTW3}); }; ";
FOO
}
|