… | |
… | |
3 | if ($] < 5.006) { |
3 | if ($] < 5.006) { |
4 | print <<EOF; |
4 | print <<EOF; |
5 | |
5 | |
6 | *** |
6 | *** |
7 | *** WARNING: This module is quite low-level and uses undocumented perl |
7 | *** WARNING: This module is quite low-level and uses undocumented perl |
8 | *** internals to do it's job. While it seems to work fine with perl-5.8, |
8 | *** internals to do it's job. While it seems to work fine with perl-5.[6-9] |
9 | *** 5.7 and 5.6, it has not been tested with older versions. If it |
9 | *** it has not been tested with older versions. If it compiles and passes the |
10 | *** compiles and passes the testsuite, it should work. Otherwise you |
10 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
11 | *** should either upgrade or fix it ;) |
|
|
12 | *** |
11 | *** |
13 | *** Marc Lehmann <pcg\@goof.com> |
12 | *** Marc Lehmann <schmorp\@schmorp.de> |
14 | *** |
13 | *** |
15 | |
14 | |
16 | EOF |
15 | EOF |
17 | } |
16 | } |
18 | |
17 | |
19 | if (eval { require Event }) { |
18 | if (eval { require Event }) { |
20 | if ($Event::VERSION < 0.86) { |
19 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
21 | print "*** Please read the INSTALL file, you need a patched Event.\n"; |
20 | print <<EOF |
|
|
21 | |
|
|
22 | *** |
|
|
23 | *** WARNING: Event version $Event::VERSION found, NOT building Event support. |
|
|
24 | *** |
|
|
25 | *** This version of Event is broken. The only currently known non-broken |
|
|
26 | *** versions of Event are 0.87 and 0.89+. Please install one of those |
|
|
27 | *** versions. |
|
|
28 | *** |
|
|
29 | |
|
|
30 | EOF |
22 | } else { |
31 | } else { |
23 | $EVENT = 1; |
32 | $EVENT = 1; |
24 | $DEFINE .= " -DHAVE_EVENT=1"; |
33 | $DEFINE .= " -DHAVE_EVENT=1"; |
25 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
34 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
26 | } |
35 | } |
… | |
… | |
37 | }, |
46 | }, |
38 | NAME => "Coro", |
47 | NAME => "Coro", |
39 | VERSION_FROM => "Coro.pm", |
48 | VERSION_FROM => "Coro.pm", |
40 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
49 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
41 | PREREQ_PM => { |
50 | PREREQ_PM => { |
|
|
51 | Scalar::Util => 0.00, |
|
|
52 | |
|
|
53 | # for Coro::Event |
42 | Event => 0.86, |
54 | Event => 0.86, |
43 | Scalar::Util => 0.00, |
55 | |
|
|
56 | # for Coro::AIO, Coro::Util |
|
|
57 | IO::AIO => 1.6, |
|
|
58 | AnyEvent => 0, |
44 | }, |
59 | }, |
45 | PM => { |
60 | PM => { |
46 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
61 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
47 | |
62 | |
48 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
63 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
… | |
… | |
58 | 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
73 | 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
59 | 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
74 | 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
60 | 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
75 | 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
61 | 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', |
76 | 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', |
62 | 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
77 | 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
|
|
78 | |
|
|
79 | 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
|
|
80 | 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
|
|
81 | 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', |
63 | }, |
82 | }, |
64 | ); |
83 | ); |
65 | |
84 | |
66 | sub MY::postamble { |
85 | sub MY::postamble { |
67 | <<EOF; |
86 | <<EOF; |
68 | |
87 | |
69 | # set \$VERSION in all modules |
88 | # set \$VERSION in all modules |
70 | setver: |
89 | setver: |
71 | \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm |
90 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm |
72 | |
91 | |
73 | EOF |
92 | EOF |
74 | } |
93 | } |
75 | |
94 | |
76 | |
95 | |