forked from PDLPorters/PDL-NetCDF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
54 lines (50 loc) · 1.48 KB
/
Makefile.PL
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
use strict;
use warnings;
use PDL::Core::Dev; # Pick up development utilities
use ExtUtils::MakeMaker;
use Devel::CheckLib qw(check_lib);
check_lib(
header => 'netcdf.h', lib => 'netcdf',
) or die "Cannot find netcdf library. Please install NetCDF.";
# Check if compiled under gcc/Linux. In which case, define bool for the compiler
my $define_bool = '';
if ($^O =~ /linux/) {
$define_bool = '-Dbool=int';
print "Defining bool=int (linux seems to need this)\n";
}
my $package = [qw(netcdf.pd NetCDF PDL::NetCDF)];
my %hash = pdlpp_stdargs($package);
my %more_items = (
AUTHOR => 'Douglas Hunt ([email protected])',
PREREQ_PM => {
'PDL' => '2.043',
},
CONFIGURE_REQUIRES => {
'Devel::CheckLib' => '1.14',
'ExtUtils::MakeMaker' => '6.64', # TEST_REQUIRES
'PDL' => '2.043',
},
BUILD_REQUIRES => {
'Devel::CheckLib' => '1.14',
},
TEST_REQUIRES => {
'Test::More' => '0.88', # done_testing
},
META_MERGE => {
"meta-spec" => { version => 2 },
resources => {
bugtracker => {web=>'https://github.com/PDLPorters/PDL-NetCDF/issues'},
repository => {
url => 'git://github.com/PDLPorters/PDL-NetCDF.git',
type => 'git',
web => 'https://github.com/PDLPorters/PDL-NetCDF',
},
x_IRC => 'irc://irc.perl.org/#pdl',
},
},
);
%hash = (%hash, %more_items);
$hash{INC} .= " $define_bool" if $define_bool;
$hash{LIBS}[0] .= " -lnetcdf";
WriteMakefile(%hash);
sub MY::postamble { pdlpp_postamble($package); }