1 |
root |
1.1 |
use ExtUtils::MakeMaker; |
2 |
|
|
|
3 |
root |
1.61 |
use 5.008002; |
4 |
|
|
|
5 |
root |
1.34 |
unless (-e "Coro/libcoro/coro.c") { |
6 |
|
|
print <<EOF; |
7 |
|
|
|
8 |
|
|
*** |
9 |
|
|
*** ERROR: Coro/libcoro is missing or damaged. If you used a CVS check-out |
10 |
|
|
*** of Coro, you also have to check-out the "libcoro" module from the same CVS |
11 |
|
|
*** repository in the Coro subdirectory (i.e. Coro/Coro/libcoro from outside). |
12 |
|
|
*** |
13 |
|
|
|
14 |
|
|
EOF |
15 |
|
|
exit 1; |
16 |
|
|
} |
17 |
|
|
|
18 |
root |
1.33 |
print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
19 |
|
|
|
20 |
root |
1.4 |
if ($] < 5.006) { |
21 |
|
|
print <<EOF; |
22 |
|
|
|
23 |
|
|
*** |
24 |
|
|
*** WARNING: This module is quite low-level and uses undocumented perl |
25 |
root |
1.33 |
*** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
26 |
root |
1.22 |
*** 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 |
root |
1.4 |
*** |
29 |
root |
1.18 |
*** Marc Lehmann <schmorp\@schmorp.de> |
30 |
root |
1.4 |
*** |
31 |
|
|
|
32 |
|
|
EOF |
33 |
|
|
} |
34 |
root |
1.1 |
|
35 |
root |
1.14 |
if (eval { require Event }) { |
36 |
root |
1.17 |
if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
37 |
pcg |
1.16 |
print <<EOF |
38 |
|
|
|
39 |
|
|
*** |
40 |
|
|
*** WARNING: Event version $Event::VERSION found, NOT building Event support. |
41 |
root |
1.17 |
*** |
42 |
pcg |
1.16 |
*** This version of Event is broken. The only currently known non-broken |
43 |
root |
1.20 |
*** versions of Event are 0.87 and 0.89+. Please install one of those |
44 |
root |
1.17 |
*** versions. |
45 |
|
|
*** |
46 |
pcg |
1.16 |
|
47 |
|
|
EOF |
48 |
root |
1.14 |
} else { |
49 |
|
|
$EVENT = 1; |
50 |
|
|
$DEFINE .= " -DHAVE_EVENT=1"; |
51 |
|
|
print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
52 |
|
|
} |
53 |
|
|
} else { |
54 |
|
|
print "\n*** Event not found, not build Event support.\n\n"; |
55 |
|
|
} |
56 |
|
|
|
57 |
root |
1.33 |
if (eval { require EV }) { |
58 |
root |
1.52 |
if ($EV::VERSION < 3.3) { |
59 |
root |
1.40 |
print <<EOF |
60 |
|
|
|
61 |
|
|
*** |
62 |
|
|
*** WARNING: Event version $EV::VERSION found, NOT building EV support. |
63 |
|
|
*** |
64 |
root |
1.53 |
*** This version is ABI-incompatible with Coro, please upgrade to at least 3.3. |
65 |
root |
1.40 |
*** |
66 |
|
|
|
67 |
|
|
EOF |
68 |
|
|
} else { |
69 |
|
|
$EV = 1; |
70 |
|
|
$DEFINE .= " -DHAVE_EV=1"; |
71 |
|
|
print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
72 |
|
|
} |
73 |
root |
1.33 |
} else { |
74 |
|
|
print "\n*** EV not found, not build EV support.\n\n"; |
75 |
|
|
} |
76 |
|
|
|
77 |
root |
1.1 |
WriteMakefile( |
78 |
root |
1.5 |
dist => { |
79 |
|
|
PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
80 |
|
|
COMPRESS => 'gzip -9v', |
81 |
|
|
SUFFIX => '.gz', |
82 |
|
|
}, |
83 |
|
|
NAME => "Coro", |
84 |
root |
1.1 |
VERSION_FROM => "Coro.pm", |
85 |
root |
1.33 |
DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
86 |
root |
1.6 |
PREREQ_PM => { |
87 |
root |
1.59 |
common::sense => 0, |
88 |
root |
1.21 |
Scalar::Util => 0.00, |
89 |
root |
1.60 |
AnyEvent => 4.81, |
90 |
root |
1.32 |
Storable => 2.15, |
91 |
root |
1.33 |
Time::HiRes => 0, |
92 |
root |
1.55 |
Guard => 0.5, |
93 |
root |
1.21 |
|
94 |
|
|
# for Coro::Event |
95 |
root |
1.46 |
#Event => 1.06, |
96 |
root |
1.33 |
|
97 |
|
|
# for Coro::EV |
98 |
root |
1.53 |
#EV => 3.3, |
99 |
root |
1.21 |
|
100 |
root |
1.32 |
# for Coro::AIO |
101 |
root |
1.42 |
#IO::AIO => 2.3, |
102 |
root |
1.46 |
#AnyEvent::AIO => 1.0, |
103 |
|
|
|
104 |
|
|
# for Coro::BDB |
105 |
|
|
#BDB => 1.5, |
106 |
|
|
#AnyEvent::BDB => 1.0, |
107 |
root |
1.5 |
}, |
108 |
root |
1.46 |
# 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 |
root |
1.53 |
# needs his brain rearranged dramatically. |
112 |
root |
1.58 |
META_MERGE => { |
113 |
|
|
recommends => { |
114 |
|
|
Event => 1.08, |
115 |
|
|
EV => 3.0, |
116 |
|
|
IO::AIO => 3.1, |
117 |
|
|
AnyEvent::AIO => 1.0, |
118 |
|
|
BDB => 0, |
119 |
|
|
AnyEvent::BDB => 1.0, |
120 |
|
|
} |
121 |
root |
1.35 |
}, |
122 |
root |
1.7 |
PM => { |
123 |
root |
1.9 |
'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
124 |
root |
1.14 |
|
125 |
|
|
'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
126 |
|
|
|
127 |
|
|
'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', |
128 |
|
|
'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', |
129 |
|
|
|
130 |
root |
1.27 |
# 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', |
131 |
root |
1.14 |
|
132 |
|
|
'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', |
133 |
|
|
|
134 |
|
|
'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm', |
135 |
|
|
'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
136 |
|
|
'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
137 |
|
|
'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
138 |
|
|
'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', |
139 |
|
|
'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
140 |
root |
1.21 |
|
141 |
root |
1.31 |
'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm', |
142 |
root |
1.25 |
'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', |
143 |
|
|
'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', |
144 |
|
|
'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', |
145 |
|
|
'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', |
146 |
|
|
|
147 |
root |
1.21 |
'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
148 |
root |
1.39 |
'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm', |
149 |
root |
1.23 |
'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
150 |
root |
1.29 |
'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', |
151 |
root |
1.41 |
'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm', |
152 |
root |
1.8 |
}, |
153 |
root |
1.1 |
); |
154 |
|
|
|
155 |
root |
1.3 |
sub MY::postamble { |
156 |
|
|
<<EOF; |
157 |
|
|
|
158 |
|
|
# set \$VERSION in all modules |
159 |
|
|
setver: |
160 |
root |
1.51 |
\$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm |
161 |
root |
1.3 |
|
162 |
|
|
EOF |
163 |
|
|
} |
164 |
|
|
|
165 |
|
|
|