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

Comparing Coro/Makefile.PL (file contents):
Revision 1.14 by root, Sat Mar 22 18:50:31 2003 UTC vs.
Revision 1.51 by root, Fri May 30 21:41:34 2008 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 fix it ;)
12*** 26***
13*** Marc Lehmann <pcg\@goof.com> 27*** Marc Lehmann <schmorp\@schmorp.de>
14*** 28***
15 29
16EOF 30EOF
17} 31}
18 32
19if (eval { require Event }) { 33if (eval { require Event }) {
20 if ($Event::VERSION < 0.86) { 34 if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) {
21 print "*** Please read the INSTALL file, you need a patched Event.\n"; 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
22 } else { 46 } else {
23 $EVENT = 1; 47 $EVENT = 1;
24 $DEFINE .= " -DHAVE_EVENT=1"; 48 $DEFINE .= " -DHAVE_EVENT=1";
25 print "\nEvent version $Event::VERSION found, building Event support.\n\n"; 49 print "\nEvent version $Event::VERSION found, building Event support.\n\n";
26 } 50 }
27 print "\n";
28} else { 51} else {
29 print "\n*** Event not found, not build Event support.\n\n"; 52 print "\n*** Event not found, not build Event support.\n\n";
30} 53}
31 54
55if (eval { require EV }) {
56 if ($EV::VERSION < 2.0) {
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 2.0.
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}
32 74
33WriteMakefile( 75WriteMakefile(
34 dist => { 76 dist => {
35 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 . ;',
36 COMPRESS => 'gzip -9v', 78 COMPRESS => 'gzip -9v',
37 SUFFIX => '.gz', 79 SUFFIX => '.gz',
38 }, 80 },
39 NAME => "Coro", 81 NAME => "Coro",
40 VERSION_FROM => "Coro.pm", 82 VERSION_FROM => "Coro.pm",
41 DIR => ['Coro', ($EVENT ? 'Event' : ())], 83 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
42 PREREQ_PM => { 84 PREREQ_PM => {
43 Event => 0.86,
44 Scalar::Util => 0.00, 85 Scalar::Util => 0.00,
86 AnyEvent => 4.1,
87 Storable => 2.15,
88 Time::HiRes => 0,
89
90 # for Coro::Event
91 #Event => 1.06,
92
93 # for Coro::EV
94 #EV => 3.0,
95
96 # for Coro::AIO
97 #IO::AIO => 2.3,
98 #AnyEvent::AIO => 1.0,
99
100 # for Coro::BDB
101 #BDB => 1.5,
102 #AnyEvent::BDB => 1.0,
103 },
104 # neither configure_requires nor recommends can be used
105 # for optional dependencies. whoever decided that a module needs
106 # to build properly without its dependencies installed
107 # needs his brian rearranged dramatically.
108 EXTRA_META => q{
109recommends:
110 Event: 1.08
111 EV: 3.0
112 IO::AIO: 0
113 AnyEvent::AIO: 1.0
114 BDB: 0
115 AnyEvent::BDB: 1.0
45 }, 116 },
46 PM => { 117 PM => {
47 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', 118 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
48 119
49 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', 120 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
50 121
51 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', 122 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
52 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', 123 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
53 124
54 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', 125# 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
55 126
56 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', 127 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
57 128
58 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm', 129 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
59 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', 130 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
60 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', 131 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
61 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', 132 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
62 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', 133 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
63 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', 134 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
64 $EVENT ? ( 135
65 'Event/Event.pm' => '$(INST_LIBDIR)/Coro/Event.pm', 136 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm',
66 'Event/Handle.pm'=> '$(INST_LIBDIR)/Coro/Handle.pm',
67 'Event/Socket.pm'=> '$(INST_LIBDIR)/Coro/Socket.pm',
68 'Event/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm', 137 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm',
69 'Event/Select.pm'=> '$(INST_LIBDIR)/Coro/Select.pm', 138 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm',
70 ) : (), 139 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm',
140 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm',
141
142 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
143 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
144 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
145 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
146 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
71 }, 147 },
72); 148);
73 149
74sub MY::postamble { 150sub MY::postamble {
75 <<EOF; 151 <<EOF;
76 152
77# set \$VERSION in all modules 153# set \$VERSION in all modules
78setver: 154setver:
79 \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm 155 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
80 156
81EOF 157EOF
82} 158}
83 159
84 160

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines