-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
64 lines (53 loc) · 1.64 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
55
56
57
58
59
60
61
62
63
64
use 5.005;
use ExtUtils::MakeMaker;
my $is_devel_host = defined $ENV{USER} && $ENV{USER} eq 'eserte' && ($^O =~ /bsd/i || $ENV{PERL_RELEASE_READY}) && -f "../../perl.release.mk";
my $eumm_recent_enough = $ExtUtils::MakeMaker::VERSION >= 6.54;
if (!$eumm_recent_enough) {
*MY::dist_core = sub {
<<'EOF';
dist :
$(NOECHO) $(ECHO) "Sorry, use a newer EUMM!"
EOF
};
}
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile
(
'NAME' => 'Tk::Getopt',
'VERSION_FROM' => 'Getopt.pm', # finds $VERSION
# in fact everything is optional, but usually everyone wants the
# gui features of Tk::Getopt
'PREREQ_PM' => { 'Tk' => 804,
'Tk::FontDialog' => 0,
'Data::Dumper' => 0,
'Test::More' => 0,
'File::Spec' => 0,
},
'LICENSE' => 'perl',
($] >= 5.005 ? ## Add these new keywords supported since 5.005
('ABSTRACT_FROM' => 'Getopt.pm',
'AUTHOR' => 'Slaven Rezic <[email protected]>',
'LICENSE' => 'perl',
) : ()
),
($eumm_recent_enough ?
(META_ADD => { resources => { repository =>
'git://github.com/eserte/tk-getopt.git'
},
}) : ()),
);
sub MY::postamble {
my $postamble = "";
$postamble .= '
demo :: pure_all
$(FULLPERL) -w -I$(SITELIBEXP)/Tk/demos/widget_lib -I$(SITEARCHEXP)/Tk/demos/widget_lib -I$(VENDORARCHEXP)/Tk/demos/widget_lib -Mblib demos/tk-getopt.pl
';
if ($is_devel_host) {
$postamble .= <<'EOF';
.include "../../perl.release.mk"
.include "../../perl.git.mk"
EOF
}
$postamble;
}