ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.56
Committed: Sat Jun 20 08:58:00 2009 UTC (14 years, 11 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-5_151, rel-5_15, rel-5_14
Changes since 1.55: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2    
3 root 1.34 unless (-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    
12     EOF
13     exit 1;
14     }
15    
16 root 1.33 print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
17    
18 root 1.4 if ($] < 5.006) {
19     print <<EOF;
20    
21     ***
22     *** WARNING: This module is quite low-level and uses undocumented perl
23 root 1.33 *** internals to do it's job. While it seems to work fine with perl-5.[6-10]
24 root 1.22 *** 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 root 1.4 ***
27 root 1.18 *** Marc Lehmann <schmorp\@schmorp.de>
28 root 1.4 ***
29    
30     EOF
31     }
32 root 1.1
33 root 1.14 if (eval { require Event }) {
34 root 1.17 if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) {
35 pcg 1.16 print <<EOF
36    
37     ***
38     *** WARNING: Event version $Event::VERSION found, NOT building Event support.
39 root 1.17 ***
40 pcg 1.16 *** This version of Event is broken. The only currently known non-broken
41 root 1.20 *** versions of Event are 0.87 and 0.89+. Please install one of those
42 root 1.17 *** versions.
43     ***
44 pcg 1.16
45     EOF
46 root 1.14 } else {
47     $EVENT = 1;
48     $DEFINE .= " -DHAVE_EVENT=1";
49     print "\nEvent version $Event::VERSION found, building Event support.\n\n";
50     }
51     } else {
52     print "\n*** Event not found, not build Event support.\n\n";
53     }
54    
55 root 1.33 if (eval { require EV }) {
56 root 1.52 if ($EV::VERSION < 3.3) {
57 root 1.40 print <<EOF
58    
59     ***
60     *** WARNING: Event version $EV::VERSION found, NOT building EV support.
61     ***
62 root 1.53 *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3.
63 root 1.40 ***
64    
65     EOF
66     } else {
67     $EV = 1;
68     $DEFINE .= " -DHAVE_EV=1";
69     print "\nEV version $EV::VERSION found, building EV support.\n\n";
70     }
71 root 1.33 } else {
72     print "\n*** EV not found, not build EV support.\n\n";
73     }
74    
75 root 1.1 WriteMakefile(
76 root 1.5 dist => {
77     PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
78     COMPRESS => 'gzip -9v',
79     SUFFIX => '.gz',
80     },
81     NAME => "Coro",
82 root 1.1 VERSION_FROM => "Coro.pm",
83 root 1.33 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
84 root 1.6 PREREQ_PM => {
85 root 1.21 Scalar::Util => 0.00,
86 root 1.56 AnyEvent => 4.110001,
87 root 1.32 Storable => 2.15,
88 root 1.33 Time::HiRes => 0,
89 root 1.55 Guard => 0.5,
90 root 1.21
91     # for Coro::Event
92 root 1.46 #Event => 1.06,
93 root 1.33
94     # for Coro::EV
95 root 1.53 #EV => 3.3,
96 root 1.21
97 root 1.32 # for Coro::AIO
98 root 1.42 #IO::AIO => 2.3,
99 root 1.46 #AnyEvent::AIO => 1.0,
100    
101     # for Coro::BDB
102     #BDB => 1.5,
103     #AnyEvent::BDB => 1.0,
104 root 1.5 },
105 root 1.46 # 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 root 1.53 # needs his brain rearranged dramatically.
109 root 1.35 EXTRA_META => q{
110 root 1.46 recommends:
111     Event: 1.08
112 root 1.41 EV: 3.0
113 root 1.54 IO::AIO: 3.1
114 root 1.46 AnyEvent::AIO: 1.0
115     BDB: 0
116     AnyEvent::BDB: 1.0
117 root 1.35 },
118 root 1.7 PM => {
119 root 1.9 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
120 root 1.14
121     'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
122    
123     'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
124     'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
125    
126 root 1.27 # 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
127 root 1.14
128     'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
129    
130     'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
131     'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
132     'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
133     'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
134     'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
135     'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
136 root 1.21
137 root 1.31 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm',
138 root 1.25 '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    
143 root 1.21 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
144 root 1.39 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
145 root 1.23 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
146 root 1.29 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
147 root 1.41 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
148 root 1.8 },
149 root 1.1 );
150    
151 root 1.3 sub MY::postamble {
152     <<EOF;
153    
154     # set \$VERSION in all modules
155     setver:
156 root 1.51 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
157 root 1.3
158     EOF
159     }
160    
161