/
Build.PL
68 lines (56 loc) · 1.72 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
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/perl -w
use strict;
use warnings;
use Module::Build;
if( $^O ne 'darwin' ) {
print <<EOT; # for the user
==========================================================
This module only works under Mac OS X
==========================================================
EOT
die "OS unsupported"; # for CPAN testers
}
if( !-d 'PerlWrapper' ) {
die <<'EOT';
PerlWrapper sources not found, please run:
git clone git://github.com/mbarbon/mac-perl-wrapper.git PerlWrapper
to download them.
EOT
}
my $CODE = <<'EOT';
sub ACTION_code {
my( $self ) = @_;
$self->SUPER::ACTION_code;
my $pw_src = 'PerlWrapper';
my $pw_dst = 'blib/lib/Mac/QuickBundle/PerlWrapper';
for my $file ( qw(Source/PerlInterpreter.c Source/PerlInterpreter.h
Source/main.c Tools/update_dylib_references.pl
Resources/PerlWrapperApp.icns) ) {
$self->copy_if_modified( from => "$pw_src/$file",
to => "$pw_dst/$file" );
}
}
EOT
my $class = Module::Build->subclass
( class => 'My::Build',
code => $CODE,
);
my $build = $class->new
( module_name => 'Mac::QuickBundle',
license => 'perl',
requires =>
{ 'Config::IniFiles' => 0,
'Module::ScanDeps' => 0,
'File::Slurp' => 0,
'Module::Build' => 0.28,
},
build_requires =>
{ 'Capture::Tiny' => 0,
},
meta_merge =>
{ resources => { 'license' => 'http://dev.perl.org/licenses/',
'repository' => 'http://github.com/mbarbon/mac-quickbundle',
},
},
);
$build->create_build_script;