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

Comparing Coro/Makefile.PL (file contents):
Revision 1.21 by root, Mon Dec 26 18:48:11 2005 UTC vs.
Revision 1.57 by root, Wed Jul 8 02:16:49 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 fix it ;)
12*** 26***
13*** Marc Lehmann <schmorp\@schmorp.de> 27*** Marc Lehmann <schmorp\@schmorp.de>
14*** 28***
15 29
16EOF 30EOF
32 } else { 46 } else {
33 $EVENT = 1; 47 $EVENT = 1;
34 $DEFINE .= " -DHAVE_EVENT=1"; 48 $DEFINE .= " -DHAVE_EVENT=1";
35 print "\nEvent version $Event::VERSION found, building Event support.\n\n"; 49 print "\nEvent version $Event::VERSION found, building Event support.\n\n";
36 } 50 }
37 print "\n";
38} else { 51} else {
39 print "\n*** Event not found, not build Event support.\n\n"; 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";
40} 73}
41 74
42WriteMakefile( 75WriteMakefile(
43 dist => { 76 dist => {
44 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 . ;',
45 COMPRESS => 'gzip -9v', 78 COMPRESS => 'gzip -9v',
46 SUFFIX => '.gz', 79 SUFFIX => '.gz',
47 }, 80 },
48 NAME => "Coro", 81 NAME => "Coro",
49 VERSION_FROM => "Coro.pm", 82 VERSION_FROM => "Coro.pm",
50 DIR => ['Coro', ($EVENT ? 'Event' : ())], 83 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
51 PREREQ_PM => { 84 PREREQ_PM => {
52 Scalar::Util => 0.00, 85 Scalar::Util => 0.00,
86 AnyEvent => 4.800001,
87 Storable => 2.15,
88 Time::HiRes => 0,
89 Guard => 0.5,
53 90
54 # for Coro::Event 91 # for Coro::Event
55 Event => 0.86, 92 #Event => 1.06,
93
94 # for Coro::EV
95 #EV => 3.3,
56 96
57 # for Coro::AIO 97 # for Coro::AIO
58 IO::AIO => 1.6, 98 #IO::AIO => 2.3,
59 AnyEvent => 0, 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 EXTRA_META => q{
110recommends:
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
60 }, 117 },
61 PM => { 118 PM => {
62 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', 119 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
63 120
64 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', 121 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
65 122
66 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', 123 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
67 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', 124 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
68 125
69 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', 126# 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
70 127
71 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm', 128 'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
72 129
73 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm', 130 'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
74 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm', 131 'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
75 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm', 132 'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
76 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm', 133 'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
77 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm', 134 'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
78 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm', 135 'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
79 136
137 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm',
138 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm',
139 'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm',
140 'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm',
141 'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm',
142
80 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', 143 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
144 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
145 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
146 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
147 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
81 }, 148 },
82); 149);
83 150
84sub MY::postamble { 151sub MY::postamble {
85 <<EOF; 152 <<EOF;
86 153
87# set \$VERSION in all modules 154# set \$VERSION in all modules
88setver: 155setver:
89 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm 156 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
90 157
91EOF 158EOF
92} 159}
93 160
94 161

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines