ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.72
Committed: Thu Jun 4 22:58:28 2015 UTC (8 years, 11 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-6_46, rel-6_45, rel-6_43, rel-6_47, rel-6_44, rel-6_48
Changes since 1.71: +3 -0 lines
Log Message:
*** empty log message ***

File Contents

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