ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.33
Committed: Mon Oct 29 19:13:39 2007 UTC (16 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.32: +16 -4 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2    
3 root 1.33 print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
4    
5 root 1.4 if ($] < 5.006) {
6     print <<EOF;
7    
8     ***
9     *** WARNING: This module is quite low-level and uses undocumented perl
10 root 1.33 *** internals to do it's job. While it seems to work fine with perl-5.[6-10]
11 root 1.22 *** it has not been tested with older versions. If it compiles and passes the
12     *** testsuite, it should work. Otherwise you should either upgrade or fix it ;)
13 root 1.4 ***
14 root 1.18 *** Marc Lehmann <schmorp\@schmorp.de>
15 root 1.4 ***
16    
17     EOF
18     }
19 root 1.1
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     $EV = 1;
44     $DEFINE .= " -DHAVE_EV=1";
45     print "\nEV version $EV::VERSION found, building EV support.\n\n";
46     } else {
47     print "\n*** EV not found, not build EV support.\n\n";
48     }
49    
50 root 1.1 WriteMakefile(
51 root 1.5 dist => {
52     PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
53     COMPRESS => 'gzip -9v',
54     SUFFIX => '.gz',
55     },
56     NAME => "Coro",
57 root 1.1 VERSION_FROM => "Coro.pm",
58 root 1.33 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
59 root 1.6 PREREQ_PM => {
60 root 1.21 Scalar::Util => 0.00,
61 root 1.32 AnyEvent => 2.51,
62     Storable => 2.15,
63 root 1.33 Time::HiRes => 0,
64 root 1.21
65     # for Coro::Event
66 root 1.28 Event => 1.06,
67 root 1.33
68     # for Coro::EV
69     EV => 0.03,
70 root 1.21
71 root 1.32 # for Coro::AIO
72 root 1.28 IO::AIO => 2.3,
73 root 1.5 },
74 root 1.7 PM => {
75 root 1.9 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
76 root 1.14
77     'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
78    
79     'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
80     'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
81    
82 root 1.27 # 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
83 root 1.14
84     'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
85    
86     'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
87     'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
88     'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
89     'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
90     'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
91     'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
92 root 1.21
93 root 1.31 'Coro/Debug.pm' => '$(INST_LIBDIR)/Coro/Debug.pm',
94 root 1.25 'Coro/Util.pm' => '$(INST_LIBDIR)/Coro/Util.pm',
95     'Coro/Select.pm' => '$(INST_LIBDIR)/Coro/Select.pm',
96     'Coro/Handle.pm' => '$(INST_LIBDIR)/Coro/Handle.pm',
97     'Coro/Socket.pm' => '$(INST_LIBDIR)/Coro/Socket.pm',
98    
99 root 1.21 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
100 root 1.23 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
101 root 1.29 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
102 root 1.8 },
103 root 1.1 );
104    
105 root 1.3 sub MY::postamble {
106     <<EOF;
107    
108     # set \$VERSION in all modules
109     setver:
110 root 1.19 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm
111 root 1.3
112     EOF
113     }
114    
115