-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBuild.PL
58 lines (52 loc) · 1.62 KB
/
Build.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
55
56
57
use strict;
use warnings;
use File::Spec;
use Module::Build;
my $file = File::Spec->catfile( "lib", "Astro", "PAL.pm" );
my $class = Module::Build->subclass(code => << 'EOF');
sub compile_c {
my $self = shift;
my %exclude = map {$_ => 1} qw[
erfasrc/src/t_erfa_c.c
erfasrc/src/t_erfa_c_extra.c
erfasrc/src/erfaversion.c
palsrc/palVers.c
palsrc/palTest.c
];
return () if exists $exclude{$_[0]};
return $self->SUPER::compile_c(@_);
}
EOF
my $build = $class->new
(
module_name => "Astro::PAL",
abstract_from => $file,
license => "gpl3",
author => [
'Tim Jenness <[email protected]>',
],
version_from => $file,
meta_merge => {
resources => {
repository => "git://github.com/timj/perl-Astro-PAL.git",
homepage => "http://github.com/timj/perl-Astro-PAL/tree/master",
},
},
script_files => [ qw/
stime
/],
requires => {
"Pod::Usage" => 0,
"Getopt::Long" => 0,
},
build_requires => {
"Test::More" => 0,
"Test::Number::Delta" => 1.00,
},
configure_requires => {
"Module::Build" => 0.3604, # c_source as array ref
},
c_source => ["src", File::Spec->catdir("erfasrc", "src"), "palsrc"],
extra_compiler_flags => "-DNOSTARUTIL=1",
);
$build->create_build_script;