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 | *** |
… | |
… | |
51 | } else { |
53 | } else { |
52 | print "\n*** Event not found, not build Event support.\n\n"; |
54 | print "\n*** Event not found, not build Event support.\n\n"; |
53 | } |
55 | } |
54 | |
56 | |
55 | if (eval { require EV }) { |
57 | if (eval { require EV }) { |
56 | if ($EV::VERSION < 2.0) { |
58 | if ($EV::VERSION < 3.3) { |
57 | print <<EOF |
59 | print <<EOF |
58 | |
60 | |
59 | *** |
61 | *** |
60 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
62 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
61 | *** |
63 | *** |
62 | *** This version is ABI-incompatible with Coro, please upgrade to 2.0. |
64 | *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3. |
63 | *** |
65 | *** |
64 | |
66 | |
65 | EOF |
67 | EOF |
66 | } else { |
68 | } else { |
67 | $EV = 1; |
69 | $EV = 1; |
… | |
… | |
80 | }, |
82 | }, |
81 | NAME => "Coro", |
83 | NAME => "Coro", |
82 | VERSION_FROM => "Coro.pm", |
84 | VERSION_FROM => "Coro.pm", |
83 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
85 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
84 | PREREQ_PM => { |
86 | PREREQ_PM => { |
|
|
87 | common::sense => 0, |
85 | Scalar::Util => 0.00, |
88 | Scalar::Util => 0.00, |
86 | AnyEvent => 3.3, |
89 | AnyEvent => 4.81, |
87 | Storable => 2.15, |
90 | Storable => 2.15, |
88 | Time::HiRes => 0, |
91 | Time::HiRes => 0, |
|
|
92 | Guard => 0.5, |
89 | |
93 | |
90 | # for Coro::Event |
94 | # for Coro::Event |
91 | Event => 1.06, |
95 | #Event => 1.06, |
92 | |
96 | |
93 | # for Coro::EV |
97 | # for Coro::EV |
94 | EV => 3.0, |
98 | #EV => 3.3, |
95 | |
99 | |
96 | # for Coro::AIO |
100 | # for Coro::AIO |
97 | IO::AIO => 2.3, |
101 | #IO::AIO => 2.3, |
|
|
102 | #AnyEvent::AIO => 1.0, |
|
|
103 | |
|
|
104 | # for Coro::BDB |
|
|
105 | #BDB => 1.5, |
|
|
106 | #AnyEvent::BDB => 1.0, |
98 | }, |
107 | }, |
|
|
108 | # neither configure_requires nor recommends can be used |
|
|
109 | # for optional dependencies. whoever decided that a module needs |
|
|
110 | # to build properly without its dependencies installed |
|
|
111 | # needs his brain rearranged dramatically. |
99 | EXTRA_META => q{ |
112 | META_MERGE => { |
100 | configure_requires: |
113 | recommends => { |
101 | Event: 1.06 |
114 | Event => 1.08, |
102 | EV: 3.0 |
115 | EV => 3.0, |
|
|
116 | IO::AIO => 3.1, |
|
|
117 | AnyEvent::AIO => 1.0, |
|
|
118 | BDB => 0, |
|
|
119 | AnyEvent::BDB => 1.0, |
|
|
120 | } |
103 | }, |
121 | }, |
104 | PM => { |
122 | PM => { |
105 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
123 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
106 | |
124 | |
107 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
125 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
… | |
… | |
137 | sub MY::postamble { |
155 | sub MY::postamble { |
138 | <<EOF; |
156 | <<EOF; |
139 | |
157 | |
140 | # set \$VERSION in all modules |
158 | # set \$VERSION in all modules |
141 | setver: |
159 | setver: |
142 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm |
160 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm |
143 | |
161 | |
144 | EOF |
162 | EOF |
145 | } |
163 | } |
146 | |
164 | |
147 | |
165 | |