1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | use 5.008002; |
3 | use 5.008002; |
|
|
4 | |
|
|
5 | use Canary::Stability Coro => 1; |
4 | |
6 | |
5 | unless (-e "Coro/libcoro/coro.c") { |
7 | unless (-e "Coro/libcoro/coro.c") { |
6 | print <<EOF; |
8 | print <<EOF; |
7 | |
9 | |
8 | *** |
10 | *** |
… | |
… | |
15 | exit 1; |
17 | exit 1; |
16 | } |
18 | } |
17 | |
19 | |
18 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
20 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
19 | |
21 | |
20 | if ($] < 5.006) { |
|
|
21 | print <<EOF; |
|
|
22 | |
|
|
23 | *** |
|
|
24 | *** WARNING: This module is quite low-level and uses undocumented perl |
|
|
25 | *** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
|
|
26 | *** it has not been tested with older versions. If it compiles and passes the |
|
|
27 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
|
|
28 | *** |
|
|
29 | *** Marc Lehmann <schmorp\@schmorp.de> |
|
|
30 | *** |
|
|
31 | |
|
|
32 | EOF |
|
|
33 | } |
|
|
34 | |
|
|
35 | if (eval { require Event }) { |
22 | if (eval { require Event }) { |
36 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
23 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
37 | print <<EOF |
24 | print <<EOF |
38 | |
25 | |
39 | *** |
26 | *** |
40 | *** WARNING: Event version $Event::VERSION found, NOT building Event support. |
27 | *** WARNING: Event version $Event::VERSION found, NOT building Event support. |
41 | *** |
28 | *** |
42 | *** This version of Event is broken. The only currently known non-broken |
29 | *** This version of Event is broken. The only currently known non-broken |
43 | *** versions of Event are 0.87 and 0.89+. Please install one of those |
30 | *** versions of Event are 0.87 and 0.89+. Please install one of those |
44 | *** versions. |
31 | *** versions. |
… | |
… | |
49 | $EVENT = 1; |
36 | $EVENT = 1; |
50 | $DEFINE .= " -DHAVE_EVENT=1"; |
37 | $DEFINE .= " -DHAVE_EVENT=1"; |
51 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
38 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
52 | } |
39 | } |
53 | } else { |
40 | } else { |
54 | print "\n*** Event not found, not build Event support.\n\n"; |
41 | print "\n*** Event not found, not building Event support.\n\n"; |
55 | } |
42 | } |
56 | |
43 | |
57 | if (eval { require EV }) { |
44 | if (eval { require EV }) { |
58 | if ($EV::VERSION < 3.3) { |
45 | if ($EV::VERSION < 4.0) { |
59 | print <<EOF |
46 | print <<EOF |
60 | |
47 | |
61 | *** |
|
|
62 | *** WARNING: Event version $EV::VERSION found, NOT building EV support. |
|
|
63 | *** |
48 | *** |
|
|
49 | *** WARNING: EV version $EV::VERSION found, NOT building EV support. |
|
|
50 | *** |
64 | *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3. |
51 | *** This version is ABI-incompatible with Coro, please upgrade to at least 4.0. |
65 | *** |
52 | *** |
66 | |
53 | |
67 | EOF |
54 | EOF |
68 | } else { |
55 | } else { |
69 | $EV = 1; |
56 | $EV = 1; |
70 | $DEFINE .= " -DHAVE_EV=1"; |
57 | $DEFINE .= " -DHAVE_EV=1"; |
71 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
58 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
72 | } |
59 | } |
73 | } else { |
60 | } else { |
74 | print "\n*** EV not found, not build EV support.\n\n"; |
61 | print "\n*** EV not found, not building EV support.\n\n"; |
75 | } |
62 | } |
76 | |
63 | |
77 | WriteMakefile( |
64 | WriteMakefile( |
78 | dist => { |
65 | dist => { |
79 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
66 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
… | |
… | |
84 | VERSION_FROM => "Coro.pm", |
71 | VERSION_FROM => "Coro.pm", |
85 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
72 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
86 | PREREQ_PM => { |
73 | PREREQ_PM => { |
87 | common::sense => 0, |
74 | common::sense => 0, |
88 | Scalar::Util => 0.00, |
75 | Scalar::Util => 0.00, |
89 | AnyEvent => 4.81, |
76 | AnyEvent => 5.0, |
90 | Storable => 2.15, |
77 | Storable => 2.15, |
91 | Time::HiRes => 0, |
|
|
92 | Guard => 0.5, |
78 | Guard => 0.5, |
93 | |
79 | |
94 | # for Coro::Event |
80 | # for Coro::Event |
95 | #Event => 1.06, |
81 | #Event => 1.06, |
96 | |
82 | |
97 | # for Coro::EV |
83 | # for Coro::EV |
98 | #EV => 3.3, |
84 | #EV => 4.0, |
99 | |
85 | |
100 | # for Coro::AIO |
86 | # for Coro::AIO |
101 | #IO::AIO => 2.3, |
87 | #IO::AIO => 2.3, |
102 | #AnyEvent::AIO => 1.1, |
88 | #AnyEvent::AIO => 1.1, |
103 | |
89 | |
104 | # for Coro::BDB |
90 | # for Coro::BDB |
105 | #BDB => 1.5, |
91 | #BDB => 1.5, |
106 | #AnyEvent::BDB => 1.0, |
92 | #AnyEvent::BDB => 1.0, |
107 | }, |
93 | }, |
|
|
94 | CONFIGURE_REQUIRES => { ExtUtils::MakeMaker => 6.52, Canary::Stability => 0 }, |
108 | # neither configure_requires nor recommends can be used |
95 | # neither configure_requires nor recommends can be used |
109 | # for optional dependencies. whoever decided that a module needs |
96 | # for optional dependencies. whoever decided that a module needs |
110 | # to build properly without its dependencies installed |
97 | # to build properly without its dependencies installed |
111 | # needs his brain rearranged dramatically. |
98 | # needs his brain rearranged dramatically. |
112 | META_MERGE => { |
99 | META_MERGE => { |
113 | recommends => { |
100 | recommends => { |
114 | Event => 1.08, |
101 | Event => 1.08, |
115 | EV => 3.0, |
102 | EV => 4.0, |
116 | IO::AIO => 3.1, |
103 | IO::AIO => 3.1, |
|
|
104 | BDB => 0, |
|
|
105 | AnyEvent => 7.0, |
117 | AnyEvent::AIO => 1.0, |
106 | AnyEvent::AIO => 1.0, |
118 | BDB => 0, |
|
|
119 | AnyEvent::BDB => 1.0, |
107 | AnyEvent::BDB => 1.0, |
120 | } |
108 | } |
121 | }, |
109 | }, |
122 | PM => { |
110 | PM => { |
123 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
111 | 'Coro.pm' => '$(INST_LIB)/Coro.pm', |
124 | |
112 | |
125 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
113 | 'Coro/State.pm' => '$(INST_LIB)/Coro/State.pm', |
|
|
114 | 'Coro/jit-amd64-unix.pl' => '$(INST_LIB)/Coro/jit-amd64-unix.pl', |
|
|
115 | 'Coro/jit-x86-unix.pl' => '$(INST_LIB)/Coro/jit-x86-unix.pl', |
126 | |
116 | |
127 | 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', |
117 | 'Coro/MakeMaker.pm' => '$(INST_LIB)/Coro/MakeMaker.pm', |
128 | 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', |
118 | 'Coro/CoroAPI.h' => '$(INST_LIB)/Coro/CoroAPI.h', |
129 | |
119 | |
130 | # 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', |
120 | # 'Coro/Cont.pm' => '$(INST_LIB)/Coro/Cont.pm', |
131 | |
121 | |
132 | 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', |
122 | 'Coro/Specific.pm' => '$(INST_LIB)/Coro/Specific.pm', |
133 | |
123 | |
134 | 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm', |
124 | 'Coro/Timer.pm' => '$(INST_LIB)/Coro/Timer.pm', |
135 | 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
125 | 'Coro/Signal.pm' => '$(INST_LIB)/Coro/Signal.pm', |
136 | 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
126 | 'Coro/Channel.pm' => '$(INST_LIB)/Coro/Channel.pm', |
137 | 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
127 | 'Coro/Semaphore.pm' => '$(INST_LIB)/Coro/Semaphore.pm', |
138 | 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', |
128 | 'Coro/SemaphoreSet.pm'=> '$(INST_LIB)/Coro/SemaphoreSet.pm', |
139 | 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
129 | 'Coro/RWLock.pm' => '$(INST_LIB)/Coro/RWLock.pm', |
140 | |
130 | |
141 | 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm', |
131 | 'Coro/Debug.pm' => '$(INST_LIB)/Coro/Debug.pm', |
142 | 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', |
132 | 'Coro/Util.pm' => '$(INST_LIB)/Coro/Util.pm', |
143 | 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', |
133 | 'Coro/Select.pm' => '$(INST_LIB)/Coro/Select.pm', |
144 | 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', |
134 | 'Coro/Handle.pm' => '$(INST_LIB)/Coro/Handle.pm', |
145 | 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', |
135 | 'Coro/Socket.pm' => '$(INST_LIB)/Coro/Socket.pm', |
146 | |
136 | |
147 | 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
137 | 'Coro/AIO.pm' => '$(INST_LIB)/Coro/AIO.pm', |
148 | 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm', |
138 | 'Coro/BDB.pm' => '$(INST_LIB)/Coro/BDB.pm', |
149 | 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
139 | 'Coro/LWP.pm' => '$(INST_LIB)/Coro/LWP.pm', |
150 | 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', |
140 | 'Coro/Storable.pm' => '$(INST_LIB)/Coro/Storable.pm', |
151 | 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm', |
141 | 'Coro/AnyEvent.pm' => '$(INST_LIB)/Coro/AnyEvent.pm', |
152 | }, |
142 | }, |
153 | ); |
143 | ); |
154 | |
144 | |
155 | sub MY::postamble { |
145 | sub MY::postamble { |
156 | <<EOF; |
146 | <<EOF; |