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

Comparing Coro/Makefile.PL (file contents):
Revision 1.43 by root, Sat May 10 22:32:40 2008 UTC vs.
Revision 1.70 by root, Fri Feb 8 22:29:18 2013 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines