1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
3 | use 5.008002; |
4 | |
4 | |
5 | if ($] < 5.006) { |
5 | unless (-e "Coro/libcoro/coro.c") { |
6 | print <<EOF; |
6 | print <<EOF; |
7 | |
7 | |
8 | *** |
8 | *** |
9 | *** WARNING: This module is quite low-level and uses undocumented perl |
9 | *** ERROR: Coro/libcoro is missing or damaged. If you used a CVS check-out |
10 | *** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
10 | *** of Coro, you also have to check-out the "libcoro" module from the same CVS |
11 | *** it has not been tested with older versions. If it compiles and passes the |
11 | *** repository in the Coro subdirectory (i.e. Coro/Coro/libcoro from outside). |
12 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
|
|
13 | *** |
|
|
14 | *** Marc Lehmann <schmorp\@schmorp.de> |
|
|
15 | *** |
12 | *** |
16 | |
13 | |
17 | EOF |
14 | EOF |
|
|
15 | exit 1; |
18 | } |
16 | } |
|
|
17 | |
|
|
18 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
19 | |
19 | |
20 | if (eval { require Event }) { |
20 | if (eval { require Event }) { |
21 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
21 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
22 | print <<EOF |
22 | print <<EOF |
23 | |
23 | |
… | |
… | |
38 | } else { |
38 | } else { |
39 | print "\n*** Event not found, not build Event support.\n\n"; |
39 | print "\n*** Event not found, not build Event support.\n\n"; |
40 | } |
40 | } |
41 | |
41 | |
42 | if (eval { require EV }) { |
42 | if (eval { require EV }) { |
|
|
43 | if ($EV::VERSION < 3.3) { |
|
|
44 | print <<EOF |
|
|
45 | |
|
|
46 | *** |
|
|
47 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
|
|
48 | *** |
|
|
49 | *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3. |
|
|
50 | *** |
|
|
51 | |
|
|
52 | EOF |
|
|
53 | } else { |
43 | $EV = 1; |
54 | $EV = 1; |
44 | $DEFINE .= " -DHAVE_EV=1"; |
55 | $DEFINE .= " -DHAVE_EV=1"; |
45 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
56 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
|
|
57 | } |
46 | } else { |
58 | } else { |
47 | print "\n*** EV not found, not build EV support.\n\n"; |
59 | print "\n*** EV not found, not build EV support.\n\n"; |
48 | } |
60 | } |
49 | |
61 | |
50 | WriteMakefile( |
62 | WriteMakefile( |
… | |
… | |
55 | }, |
67 | }, |
56 | NAME => "Coro", |
68 | NAME => "Coro", |
57 | VERSION_FROM => "Coro.pm", |
69 | VERSION_FROM => "Coro.pm", |
58 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
70 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
59 | PREREQ_PM => { |
71 | PREREQ_PM => { |
|
|
72 | common::sense => 0, |
60 | Scalar::Util => 0.00, |
73 | Scalar::Util => 0.00, |
61 | AnyEvent => 2.51, |
74 | AnyEvent => 5.0, |
62 | Storable => 2.15, |
75 | Storable => 2.15, |
63 | Time::HiRes => 0, |
76 | Time::HiRes => 0, |
|
|
77 | Guard => 0.5, |
64 | |
78 | |
65 | # for Coro::Event |
79 | # for Coro::Event |
66 | Event => 1.06, |
80 | #Event => 1.06, |
67 | |
81 | |
68 | # for Coro::EV |
82 | # for Coro::EV |
69 | EV => 0.03, |
83 | #EV => 3.3, |
70 | |
84 | |
71 | # for Coro::AIO |
85 | # for Coro::AIO |
72 | IO::AIO => 2.3, |
86 | #IO::AIO => 2.3, |
|
|
87 | #AnyEvent::AIO => 1.1, |
|
|
88 | |
|
|
89 | # for Coro::BDB |
|
|
90 | #BDB => 1.5, |
|
|
91 | #AnyEvent::BDB => 1.0, |
|
|
92 | }, |
|
|
93 | # neither configure_requires nor recommends can be used |
|
|
94 | # for optional dependencies. whoever decided that a module needs |
|
|
95 | # to build properly without its dependencies installed |
|
|
96 | # needs his brain rearranged dramatically. |
|
|
97 | META_MERGE => { |
|
|
98 | recommends => { |
|
|
99 | Event => 1.08, |
|
|
100 | EV => 3.0, |
|
|
101 | IO::AIO => 3.1, |
|
|
102 | AnyEvent::AIO => 1.0, |
|
|
103 | BDB => 0, |
|
|
104 | AnyEvent::BDB => 1.0, |
|
|
105 | } |
73 | }, |
106 | }, |
74 | PM => { |
107 | PM => { |
75 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
108 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
76 | |
109 | |
77 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
110 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
… | |
… | |
95 | 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', |
128 | 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', |
96 | 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', |
129 | 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', |
97 | 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', |
130 | 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', |
98 | |
131 | |
99 | 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
132 | 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
|
|
133 | 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm', |
100 | 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
134 | 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
101 | 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', |
135 | 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', |
|
|
136 | 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm', |
102 | }, |
137 | }, |
103 | ); |
138 | ); |
104 | |
139 | |
105 | sub MY::postamble { |
140 | sub MY::postamble { |
106 | <<EOF; |
141 | <<EOF; |
107 | |
142 | |
108 | # set \$VERSION in all modules |
143 | # set \$VERSION in all modules |
109 | setver: |
144 | setver: |
110 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm |
145 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm |
111 | |
146 | |
112 | EOF |
147 | EOF |
113 | } |
148 | } |
114 | |
149 | |
115 | |
150 | |