… | |
… | |
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 contact the author, maybe it can be made to |
|
|
12 | *** work... |
|
|
13 | *** |
11 | *** |
14 | *** Marc Lehmann <pcg\@goof.com> |
12 | *** Marc Lehmann <schmorp\@schmorp.de> |
15 | *** |
13 | *** |
16 | |
14 | |
17 | EOF |
15 | EOF |
18 | } |
16 | } |
19 | |
17 | |
20 | $EVENT = eval { require Event }; |
18 | if (eval { require Event }) { |
|
|
19 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
|
|
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 |
|
|
31 | } else { |
|
|
32 | $EVENT = 1; |
|
|
33 | $DEFINE .= " -DHAVE_EVENT=1"; |
|
|
34 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
|
|
35 | } |
|
|
36 | print "\n"; |
|
|
37 | } else { |
|
|
38 | print "\n*** Event not found, not build Event support.\n\n"; |
|
|
39 | } |
21 | |
40 | |
22 | WriteMakefile( |
41 | WriteMakefile( |
23 | dist => { |
42 | dist => { |
24 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
43 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
25 | COMPRESS => 'gzip -9v', |
44 | COMPRESS => 'gzip -9v', |
… | |
… | |
27 | }, |
46 | }, |
28 | NAME => "Coro", |
47 | NAME => "Coro", |
29 | VERSION_FROM => "Coro.pm", |
48 | VERSION_FROM => "Coro.pm", |
30 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
49 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
31 | PREREQ_PM => { |
50 | PREREQ_PM => { |
32 | Event => 0.83, # still, 0.83 and below have serious bugs(!) |
51 | Scalar::Util => 0.00, |
|
|
52 | |
|
|
53 | # for Coro::Event |
|
|
54 | Event => 0.86, |
|
|
55 | |
|
|
56 | # for Coro::AIO, Coro::Util |
|
|
57 | IO::AIO => 1.6, |
|
|
58 | AnyEvent => 2.1, |
33 | }, |
59 | }, |
34 | PM => { |
60 | PM => { |
35 | 'Coro.pm' => '$(INST_LIBDIR)/Coro/Coro.pm', |
61 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
|
|
62 | |
36 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
63 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
37 | |
64 | |
38 | 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', |
65 | 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', |
39 | 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', |
66 | 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', |
40 | |
67 | |
41 | 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', |
68 | 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', |
42 | |
69 | |
43 | 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', |
70 | 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', |
44 | |
71 | |
|
|
72 | 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm', |
45 | 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
73 | 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', |
46 | 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
74 | 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', |
47 | 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
75 | 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', |
|
|
76 | 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', |
48 | 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
77 | 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', |
49 | |
78 | |
50 | $EVENT ? ( |
79 | 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', |
51 | 'Event/Event.pm' => '$(INST_LIBDIR)/Coro/Event.pm', |
80 | 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm', |
52 | 'Event/Handle.pm'=> '$(INST_LIBDIR)/Coro/Handle.pm', |
81 | 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm', |
53 | 'Event/Socket.pm'=> '$(INST_LIBDIR)/Coro/Socket.pm', |
82 | 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm', |
54 | 'Event/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', |
83 | |
55 | ) : (), |
84 | 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', |
|
|
85 | 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', |
56 | }, |
86 | }, |
57 | ); |
87 | ); |
58 | |
88 | |
59 | sub MY::postamble { |
89 | sub MY::postamble { |
60 | <<EOF; |
90 | <<EOF; |
61 | |
91 | |
62 | # set \$VERSION in all modules |
92 | # set \$VERSION in all modules |
63 | setver: |
93 | setver: |
64 | \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm |
94 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm |
65 | |
95 | |
66 | EOF |
96 | EOF |
67 | } |
97 | } |
68 | |
98 | |
69 | |
99 | |