ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
(Generate patch)

Comparing Coro/Makefile.PL (file contents):
Revision 1.7 by root, Thu Aug 16 21:55:34 2001 UTC vs.
Revision 1.58 by root, Thu Jul 9 18:45:57 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines