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.72 by root, Thu Jun 4 22:58:28 2015 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines