ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.63
Committed: Sat Aug 22 22:36:23 2009 UTC (14 years, 8 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-5_371, rel-5_372, rel-5_22, rel-5_23, rel-5_24, rel-5_25, rel-5_2, rel-5_37, rel-5_36, rel-5_17
Changes since 1.62: +1 -16 lines
Log Message:
5.17

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2    
3 root 1.61 use 5.008002;
4    
5 root 1.34 unless (-e "Coro/libcoro/coro.c") {
6     print <<EOF;
7    
8     ***
9     *** ERROR: Coro/libcoro is missing or damaged. If you used a CVS check-out
10     *** of Coro, you also have to check-out the "libcoro" module from the same CVS
11     *** repository in the Coro subdirectory (i.e. Coro/Coro/libcoro from outside).
12     ***
13    
14     EOF
15     exit 1;
16     }
17    
18 root 1.33 print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
19    
20 root 1.14 if (eval { require Event }) {
21 root 1.17 if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) {
22 pcg 1.16 print <<EOF
23    
24     ***
25     *** WARNING: Event version $Event::VERSION found, NOT building Event support.
26 root 1.17 ***
27 pcg 1.16 *** This version of Event is broken. The only currently known non-broken
28 root 1.20 *** versions of Event are 0.87 and 0.89+. Please install one of those
29 root 1.17 *** versions.
30     ***
31 pcg 1.16
32     EOF
33 root 1.14 } else {
34     $EVENT = 1;
35     $DEFINE .= " -DHAVE_EVENT=1";
36     print "\nEvent version $Event::VERSION found, building Event support.\n\n";
37     }
38     } else {
39     print "\n*** Event not found, not build Event support.\n\n";
40     }
41    
42 root 1.33 if (eval { require EV }) {
43 root 1.52 if ($EV::VERSION < 3.3) {
44 root 1.40 print <<EOF
45    
46     ***
47     *** WARNING: Event version $EV::VERSION found, NOT building EV support.
48     ***
49 root 1.53 *** This version is ABI-incompatible with Coro, please upgrade to at least 3.3.
50 root 1.40 ***
51    
52     EOF
53     } else {
54     $EV = 1;
55     $DEFINE .= " -DHAVE_EV=1";
56     print "\nEV version $EV::VERSION found, building EV support.\n\n";
57     }
58 root 1.33 } else {
59     print "\n*** EV not found, not build EV support.\n\n";
60     }
61    
62 root 1.1 WriteMakefile(
63 root 1.5 dist => {
64     PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
65     COMPRESS => 'gzip -9v',
66     SUFFIX => '.gz',
67     },
68     NAME => "Coro",
69 root 1.1 VERSION_FROM => "Coro.pm",
70 root 1.33 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
71 root 1.6 PREREQ_PM => {
72 root 1.59 common::sense => 0,
73 root 1.21 Scalar::Util => 0.00,
74 root 1.63 AnyEvent => 5.0,
75 root 1.32 Storable => 2.15,
76 root 1.33 Time::HiRes => 0,
77 root 1.55 Guard => 0.5,
78 root 1.21
79     # for Coro::Event
80 root 1.46 #Event => 1.06,
81 root 1.33
82     # for Coro::EV
83 root 1.53 #EV => 3.3,
84 root 1.21
85 root 1.32 # for Coro::AIO
86 root 1.42 #IO::AIO => 2.3,
87 root 1.62 #AnyEvent::AIO => 1.1,
88 root 1.46
89     # for Coro::BDB
90     #BDB => 1.5,
91     #AnyEvent::BDB => 1.0,
92 root 1.5 },
93 root 1.46 # 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 root 1.53 # needs his brain rearranged dramatically.
97 root 1.58 META_MERGE => {
98     recommends => {
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     }
106 root 1.35 },
107 root 1.7 PM => {
108 root 1.9 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
109 root 1.14
110     'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
111    
112     'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
113     'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
114    
115 root 1.27 # 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
116 root 1.14
117     'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
118    
119     'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
120     'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
121     'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
122     'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
123     'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
124     'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
125 root 1.21
126 root 1.31 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm',
127 root 1.25 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm',
128     'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm',
129     'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm',
130     'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm',
131    
132 root 1.21 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
133 root 1.39 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
134 root 1.23 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
135 root 1.29 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
136 root 1.41 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
137 root 1.8 },
138 root 1.1 );
139    
140 root 1.3 sub MY::postamble {
141     <<EOF;
142    
143     # set \$VERSION in all modules
144     setver:
145 root 1.51 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
146 root 1.3
147     EOF
148     }
149    
150