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

Comparing Coro/Makefile.PL (file contents):
Revision 1.25 by root, Mon Nov 6 19:26:10 2006 UTC vs.
Revision 1.63 by root, Sat Aug 22 22:36:23 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines