ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.71
Committed: Sat Nov 2 19:48:50 2013 UTC (10 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-6_32, rel-6_33, rel-6_36, rel-6_37, rel-6_38, rel-6_39, rel-6_42, rel-6_41
Changes since 1.70: +30 -30 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.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 root 1.69 ***
25 pcg 1.16 *** 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 root 1.64 print "\n*** Event not found, not building Event support.\n\n";
40 root 1.14 }
41    
42 root 1.33 if (eval { require EV }) {
43 root 1.68 if ($EV::VERSION < 4.0) {
44 root 1.40 print <<EOF
45    
46 root 1.69 ***
47 root 1.65 *** WARNING: EV version $EV::VERSION found, NOT building EV support.
48 root 1.40 ***
49 root 1.68 *** This version is ABI-incompatible with Coro, please upgrade to at least 4.0.
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 root 1.64 print "\n*** EV not found, not building EV support.\n\n";
60 root 1.33 }
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.55 Guard => 0.5,
77 root 1.21
78     # for Coro::Event
79 root 1.46 #Event => 1.06,
80 root 1.33
81     # for Coro::EV
82 root 1.68 #EV => 4.0,
83 root 1.21
84 root 1.32 # for Coro::AIO
85 root 1.42 #IO::AIO => 2.3,
86 root 1.62 #AnyEvent::AIO => 1.1,
87 root 1.46
88     # for Coro::BDB
89     #BDB => 1.5,
90     #AnyEvent::BDB => 1.0,
91 root 1.5 },
92 root 1.46 # 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 root 1.53 # needs his brain rearranged dramatically.
96 root 1.58 META_MERGE => {
97     recommends => {
98     Event => 1.08,
99 root 1.68 EV => 4.0,
100 root 1.58 IO::AIO => 3.1,
101 root 1.68 BDB => 0,
102     AnyEvent => 7.0,
103 root 1.58 AnyEvent::AIO => 1.0,
104     AnyEvent::BDB => 1.0,
105     }
106 root 1.35 },
107 root 1.7 PM => {
108 root 1.71 'Coro.pm' => '$(INST_LIB)/Coro.pm',
109 root 1.14
110 root 1.71 'Coro/State.pm' => '$(INST_LIB)/Coro/State.pm',
111     'Coro/jit-amd64-unix.pl' => '$(INST_LIB)/Coro/jit-amd64-unix.pl',
112     'Coro/jit-x86-unix.pl' => '$(INST_LIB)/Coro/jit-x86-unix.pl',
113    
114     'Coro/MakeMaker.pm' => '$(INST_LIB)/Coro/MakeMaker.pm',
115     'Coro/CoroAPI.h' => '$(INST_LIB)/Coro/CoroAPI.h',
116    
117     # 'Coro/Cont.pm' => '$(INST_LIB)/Coro/Cont.pm',
118    
119     'Coro/Specific.pm' => '$(INST_LIB)/Coro/Specific.pm',
120    
121     'Coro/Timer.pm' => '$(INST_LIB)/Coro/Timer.pm',
122     'Coro/Signal.pm' => '$(INST_LIB)/Coro/Signal.pm',
123     'Coro/Channel.pm' => '$(INST_LIB)/Coro/Channel.pm',
124     'Coro/Semaphore.pm' => '$(INST_LIB)/Coro/Semaphore.pm',
125     'Coro/SemaphoreSet.pm'=> '$(INST_LIB)/Coro/SemaphoreSet.pm',
126     'Coro/RWLock.pm' => '$(INST_LIB)/Coro/RWLock.pm',
127    
128     'Coro/Debug.pm' => '$(INST_LIB)/Coro/Debug.pm',
129     'Coro/Util.pm' => '$(INST_LIB)/Coro/Util.pm',
130     'Coro/Select.pm' => '$(INST_LIB)/Coro/Select.pm',
131     'Coro/Handle.pm' => '$(INST_LIB)/Coro/Handle.pm',
132     'Coro/Socket.pm' => '$(INST_LIB)/Coro/Socket.pm',
133    
134     'Coro/AIO.pm' => '$(INST_LIB)/Coro/AIO.pm',
135     'Coro/BDB.pm' => '$(INST_LIB)/Coro/BDB.pm',
136     'Coro/LWP.pm' => '$(INST_LIB)/Coro/LWP.pm',
137     'Coro/Storable.pm' => '$(INST_LIB)/Coro/Storable.pm',
138     'Coro/AnyEvent.pm' => '$(INST_LIB)/Coro/AnyEvent.pm',
139 root 1.8 },
140 root 1.1 );
141    
142 root 1.3 sub MY::postamble {
143     <<EOF;
144    
145     # set \$VERSION in all modules
146     setver:
147 root 1.51 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
148 root 1.3
149     EOF
150     }
151    
152