ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
(Generate patch)

Comparing Coro/Makefile.PL (file contents):
Revision 1.33 by root, Mon Oct 29 19:13:39 2007 UTC vs.
Revision 1.59 by root, Tue Jul 14 00:55:10 2009 UTC

1use ExtUtils::MakeMaker; 1use ExtUtils::MakeMaker;
2
3unless (-e "Coro/libcoro/coro.c") {
4 print <<EOF;
5
6***
7*** ERROR: Coro/libcoro is missing or damaged. If you used a CVS check-out
8*** of Coro, you also have to check-out the "libcoro" module from the same CVS
9*** repository in the Coro subdirectory (i.e. Coro/Coro/libcoro from outside).
10***
11
12EOF
13 exit 1;
14}
2 15
3print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; 16print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
4 17
5if ($] < 5.006) { 18if ($] < 5.006) {
6 print <<EOF; 19 print <<EOF;
38} else { 51} else {
39 print "\n*** Event not found, not build Event support.\n\n"; 52 print "\n*** Event not found, not build Event support.\n\n";
40} 53}
41 54
42if (eval { require EV }) { 55if (eval { require EV }) {
56 if ($EV::VERSION < 3.3) {
57 print <<EOF
58
59***
60*** WARNING: Event version $EV::VERSION found, NOT building EV support.
61***
62*** This version is ABI-incompatible with Coro, please upgrade to at least 3.3.
63***
64
65EOF
66 } else {
43 $EV = 1; 67 $EV = 1;
44 $DEFINE .= " -DHAVE_EV=1"; 68 $DEFINE .= " -DHAVE_EV=1";
45 print "\nEV version $EV::VERSION found, building EV support.\n\n"; 69 print "\nEV version $EV::VERSION found, building EV support.\n\n";
70 }
46} else { 71} else {
47 print "\n*** EV not found, not build EV support.\n\n"; 72 print "\n*** EV not found, not build EV support.\n\n";
48} 73}
49 74
50WriteMakefile( 75WriteMakefile(
55 }, 80 },
56 NAME => "Coro", 81 NAME => "Coro",
57 VERSION_FROM => "Coro.pm", 82 VERSION_FROM => "Coro.pm",
58 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], 83 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
59 PREREQ_PM => { 84 PREREQ_PM => {
85 common::sense => 0,
60 Scalar::Util => 0.00, 86 Scalar::Util => 0.00,
61 AnyEvent => 2.51, 87 AnyEvent => 4.800001,
62 Storable => 2.15, 88 Storable => 2.15,
63 Time::HiRes => 0, 89 Time::HiRes => 0,
90 Guard => 0.5,
64 91
65 # for Coro::Event 92 # for Coro::Event
66 Event => 1.06, 93 #Event => 1.06,
67 94
68 # for Coro::EV 95 # for Coro::EV
69 EV => 0.03, 96 #EV => 3.3,
70 97
71 # for Coro::AIO 98 # for Coro::AIO
72 IO::AIO => 2.3, 99 #IO::AIO => 2.3,
100 #AnyEvent::AIO => 1.0,
101
102 # for Coro::BDB
103 #BDB => 1.5,
104 #AnyEvent::BDB => 1.0,
105 },
106 # neither configure_requires nor recommends can be used
107 # for optional dependencies. whoever decided that a module needs
108 # to build properly without its dependencies installed
109 # needs his brain rearranged dramatically.
110 META_MERGE => {
111 recommends => {
112 Event => 1.08,
113 EV => 3.0,
114 IO::AIO => 3.1,
115 AnyEvent::AIO => 1.0,
116 BDB => 0,
117 AnyEvent::BDB => 1.0,
118 }
73 }, 119 },
74 PM => { 120 PM => {
75 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', 121 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
76 122
77 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', 123 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
95 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', 141 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm',
96 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', 142 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm',
97 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', 143 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm',
98 144
99 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', 145 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
146 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
100 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', 147 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
101 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', 148 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
149 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
102 }, 150 },
103); 151);
104 152
105sub MY::postamble { 153sub MY::postamble {
106 <<EOF; 154 <<EOF;
107 155
108# set \$VERSION in all modules 156# set \$VERSION in all modules
109setver: 157setver:
110 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm 158 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
111 159
112EOF 160EOF
113} 161}
114 162
115 163

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines