1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
|
|
2 | |
|
|
3 | use 5.008002; |
2 | |
4 | |
3 | unless (-e "Coro/libcoro/coro.c") { |
5 | unless (-e "Coro/libcoro/coro.c") { |
4 | print <<EOF; |
6 | print <<EOF; |
5 | |
7 | |
6 | *** |
8 | *** |
… | |
… | |
12 | EOF |
14 | EOF |
13 | exit 1; |
15 | exit 1; |
14 | } |
16 | } |
15 | |
17 | |
16 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
18 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
17 | |
|
|
18 | if ($] < 5.006) { |
|
|
19 | print <<EOF; |
|
|
20 | |
|
|
21 | *** |
|
|
22 | *** WARNING: This module is quite low-level and uses undocumented perl |
|
|
23 | *** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
|
|
24 | *** it has not been tested with older versions. If it compiles and passes the |
|
|
25 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
|
|
26 | *** |
|
|
27 | *** Marc Lehmann <schmorp\@schmorp.de> |
|
|
28 | *** |
|
|
29 | |
|
|
30 | EOF |
|
|
31 | } |
|
|
32 | |
19 | |
33 | if (eval { require Event }) { |
20 | if (eval { require Event }) { |
34 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
21 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
35 | print <<EOF |
22 | print <<EOF |
36 | |
23 | |
… | |
… | |
51 | } else { |
38 | } else { |
52 | print "\n*** Event not found, not build Event support.\n\n"; |
39 | print "\n*** Event not found, not build Event support.\n\n"; |
53 | } |
40 | } |
54 | |
41 | |
55 | if (eval { require EV }) { |
42 | if (eval { require EV }) { |
56 | if ($EV::VERSION < 2.0) { |
43 | if ($EV::VERSION < 3.3) { |
57 | print <<EOF |
44 | print <<EOF |
58 | |
45 | |
59 | *** |
46 | *** |
60 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
47 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
61 | *** |
48 | *** |
62 | *** This version is ABI-incompatible with Coro, please upgrade to 2.0. |
49 | *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3. |
63 | *** |
50 | *** |
64 | |
51 | |
65 | EOF |
52 | EOF |
66 | } else { |
53 | } else { |
67 | $EV = 1; |
54 | $EV = 1; |
… | |
… | |
80 | }, |
67 | }, |
81 | NAME => "Coro", |
68 | NAME => "Coro", |
82 | VERSION_FROM => "Coro.pm", |
69 | VERSION_FROM => "Coro.pm", |
83 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
70 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
84 | PREREQ_PM => { |
71 | PREREQ_PM => { |
|
|
72 | common::sense => 0, |
85 | Scalar::Util => 0.00, |
73 | Scalar::Util => 0.00, |
86 | AnyEvent => 4.01, |
74 | AnyEvent => 5.0, |
87 | Storable => 2.15, |
75 | Storable => 2.15, |
88 | Time::HiRes => 0, |
76 | Time::HiRes => 0, |
|
|
77 | Guard => 0.5, |
89 | |
78 | |
90 | # for Coro::Event |
79 | # for Coro::Event |
91 | #Event => 1.06, |
80 | #Event => 1.06, |
92 | |
81 | |
93 | # for Coro::EV |
82 | # for Coro::EV |
94 | #EV => 3.0, |
83 | #EV => 3.3, |
95 | |
84 | |
96 | # for Coro::AIO |
85 | # for Coro::AIO |
97 | #IO::AIO => 2.3, |
86 | #IO::AIO => 2.3, |
98 | #AnyEvent::AIO => 1.0, |
87 | #AnyEvent::AIO => 1.1, |
99 | |
88 | |
100 | # for Coro::BDB |
89 | # for Coro::BDB |
101 | #BDB => 1.5, |
90 | #BDB => 1.5, |
102 | #AnyEvent::BDB => 1.0, |
91 | #AnyEvent::BDB => 1.0, |
103 | }, |
92 | }, |
104 | # neither configure_requires nor recommends can be used |
93 | # neither configure_requires nor recommends can be used |
105 | # for optional dependencies. whoever decided that a module needs |
94 | # for optional dependencies. whoever decided that a module needs |
106 | # to build properly without its dependencies installed |
95 | # to build properly without its dependencies installed |
107 | # needs his brian rearranged dramatically. |
96 | # needs his brain rearranged dramatically. |
108 | EXTRA_META => q{ |
97 | META_MERGE => { |
109 | recommends: |
98 | recommends => { |
110 | Event: 1.08 |
99 | Event => 1.08, |
111 | EV: 3.0 |
100 | EV => 3.0, |
112 | IO::AIO: 0 |
101 | IO::AIO => 3.1, |
113 | AnyEvent::AIO: 1.0 |
102 | AnyEvent::AIO => 1.0, |
114 | BDB: 0 |
103 | BDB => 0, |
115 | AnyEvent::BDB: 1.0 |
104 | AnyEvent::BDB => 1.0, |
|
|
105 | } |
116 | }, |
106 | }, |
117 | PM => { |
107 | PM => { |
118 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
108 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
119 | |
109 | |
120 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
110 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
… | |
… | |
150 | sub MY::postamble { |
140 | sub MY::postamble { |
151 | <<EOF; |
141 | <<EOF; |
152 | |
142 | |
153 | # set \$VERSION in all modules |
143 | # set \$VERSION in all modules |
154 | setver: |
144 | setver: |
155 | \$(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 |
156 | |
146 | |
157 | EOF |
147 | EOF |
158 | } |
148 | } |
159 | |
149 | |
160 | |
150 | |