Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 177 lines (141 sloc) 3.795 kb
c1dab557 »
1999-05-14 Added shebang and made executable.
1 #!/usr/bin/perl
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
2 # rocco // vim: ts=2 sw=2 expandtab
3
f0229831 »
1998-08-15 Initial revision
4
ac1c8bdb »
2002-05-15 Added sungo's makefile magic.
5 use strict;
f0229831 »
1998-08-15 Initial revision
6 use ExtUtils::MakeMaker;
f664da13 »
2002-09-22 add a warning about ithreads bug to Makefile.PL.
7 use Config;
e8091556 »
1999-03-17 dorked with indenting. whee!
8
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
9 # Switch to default behavior if STDIN isn't a tty.
10
11 unless (-t STDIN) {
12 warn(
13 "\n",
554756e1 »
2007-10-01 Clean up the prompts a little.
14 "=============================================\n\n",
15 "STDIN is not a terminal. Assuming --default.\n\n",
16 "=============================================\n\n",
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
17 );
18 push @ARGV, "--default";
19 }
20
21 # Remind the user she can use --default.
22
23 unless (grep /^--default$/, @ARGV) {
24 warn(
25 "\n",
554756e1 »
2007-10-01 Clean up the prompts a little.
26 "=============================================\n\n",
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
27 "Prompts may be bypassed by running:\n",
554756e1 »
2007-10-01 Clean up the prompts a little.
28 " $^X $0 --default\n\n",
29 "=============================================\n\n",
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
30 );
31 }
32
33 # Should we skip the network tests?
34
554756e1 »
2007-10-01 Clean up the prompts a little.
35 my $prompt = (
36 "Some of POE's tests require a functional network.\n" .
37 "You can skip these tests if you'd like.\n\n" .
227e2a2e »
2008-03-10 backing out -r2277:2278 sense of network tests restored
38 "Would you like to skip the network tests?"
554756e1 »
2007-10-01 Clean up the prompts a little.
39 );
e88fe82c »
2005-04-12 Part of ExtUtils::AutoInstall's automated install procedure involves
40
227e2a2e »
2008-03-10 backing out -r2277:2278 sense of network tests restored
41 my $ret = "n";
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
42 if (grep /^--default$/, @ARGV) {
554756e1 »
2007-10-01 Clean up the prompts a little.
43 print $prompt, " [$ret] $ret\n\n";
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
44 }
45 else {
227e2a2e »
2008-03-10 backing out -r2277:2278 sense of network tests restored
46 $ret = prompt($prompt, "n");
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
47 }
b4201e90 »
2004-09-02 add ability to opt out of network tests
48
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
49 my $marker = 'run_network_tests';
554756e1 »
2007-10-01 Clean up the prompts a little.
50 unlink $marker;
227e2a2e »
2008-03-10 backing out -r2277:2278 sense of network tests restored
51 unless ($ret =~ /^Y$/i) {
554756e1 »
2007-10-01 Clean up the prompts a little.
52 open(TOUCH,"+>$marker") and close TOUCH;
b4201e90 »
2004-09-02 add ability to opt out of network tests
53 }
54
b4490616 »
2006-02-07 Remove ExtUtils::AutoInstall from the installer to support
55 print "\n";
56
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
57 use lib qw(./mylib);
58 use PoeBuildInfo qw(
59 TEST_FILES
60 CLEAN_FILES
61 CORE_REQUIREMENTS
62 DIST_ABSTRACT
63 DIST_AUTHOR
64 RECOMMENDED_TIME_HIRES
65 );
f7967fc0 »
2004-11-26 Add some comments.
66
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
67 ### Touch files that will be generated at "make dist" time.
68 ### ExtUtils::MakeMaker and Module::Build will complain about them if
69 ### they aren't present now.
70
71 open(TOUCH, ">>CHANGES") and close TOUCH;
72 open(TOUCH, ">>META.yml") and close TOUCH;
73
74 ### Touch gen-tests.perl so it always triggers.
75
76 utime(time(), time(), "mylib/gen-tests.perl");
77
78 ### Some advisory dependency testing.
79
80 sub check_for_modules {
81 my ($dep_type, @modules) = @_;
82
83 my @failures;
84 while (@modules) {
85 my $module = shift @modules;
86 my $target = shift @modules;
87
88 my $version = eval "use $module (); return \$$module\::VERSION";
ac1c8bdb »
2002-05-15 Added sungo's makefile magic.
89
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
90 if ($@) {
91 push(
92 @failures,
93 "*** $module $target could not be loaded.\n"
94 );
95 }
96 elsif ($version < $target) {
97 push(
98 @failures,
99 "*** $module $target is $dep_type, " .
100 "but version $version is installed.\n"
101 );
102 }
103 }
104
105 if (@failures) {
106 warn(
107 "*** Some $dep_type features may not be available:\n",
108 @failures,
109 );
110 }
ac1c8bdb »
2002-05-15 Added sungo's makefile magic.
111 }
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
112
113 check_for_modules("required", CORE_REQUIREMENTS);
114 check_for_modules(
115 "optional",
116 "Compress::Zlib" => 1.33,
117 "Curses" => 1.08,
118 "IO::Poll" => 0.01,
119 "IO::Pty" => 1.02,
120 "LWP" => 5.79,
121 "Socket6" => 0.14,
122 "Storable" => 2.12,
123 "Term::Cap" => 1.09,
124 "Term::ReadKey" => 2.21,
125 RECOMMENDED_TIME_HIRES,
126 "URI" => 1.30,
127 );
128
129 ### Generate Makefile.PL.
130
131 sub MY::postamble {
132 return <<EOF;
133
134 ppmdist: pm_to_blib
135 \cI\$(TAR) --exclude '*/man[13]*' -cvf \\
136 \cI\cI\$(DISTVNAME)-win32ppd.tar blib
137 \cI\$(COMPRESS) \$(DISTVNAME)-win32ppd.tar
138
139 ppddist: ppmdist
140
141 coverage: Makefile
142 \cI$^X mylib/coverage.perl
143
144 cover: coverage
145 EOF
916c46ac »
2000-12-13 add dependency checking
146 }
147
04cad87e »
2011-01-26 Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.
148 WriteMakefile(
149 NAME => 'POE',
150 AUTHOR => DIST_AUTHOR,
151 ABSTRACT => DIST_ABSTRACT,
152
153 VERSION_FROM => 'lib/POE.pm',
154 dist => {
155 COMPRESS => 'gzip -9f',
156 SUFFIX => 'gz',
157 PREOP => (
158 'git-log.pl | ' .
159 '/usr/bin/tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES; ' .
160 "$^X mylib/gen-meta.perl; " .
161 '/bin/cp -f ./META.yml ./$(DISTNAME)-$(VERSION)/META.yml'
162 ),
163 },
164
165 clean => { FILES => CLEAN_FILES },
166 test => { TESTS => TEST_FILES },
167
168 # Not executed on "make test".
169 PL_FILES => { 'mylib/gen-tests.perl' => [ 'lib/POE.pm' ] },
170
171 # More for META.yml than anything.
172 NO_META => 1,
173 PREREQ_PM => { CORE_REQUIREMENTS },
174 );
175
ab7773f0 »
2007-03-18 Some package tools expect Makefile.PL to return 1. And since this is
176 1;
Something went wrong with that request. Please try again.