ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
(Generate patch)

Comparing Coro/Makefile.PL (file contents):
Revision 1.39 by root, Mon Dec 17 06:36:24 2007 UTC vs.
Revision 1.65 by root, Sat Jun 11 13:01:26 2011 UTC

1use ExtUtils::MakeMaker; 1use ExtUtils::MakeMaker;
2
3use 5.008002;
2 4
3unless (-e "Coro/libcoro/coro.c") { 5unless (-e "Coro/libcoro/coro.c") {
4 print <<EOF; 6 print <<EOF;
5 7
6*** 8***
12EOF 14EOF
13 exit 1; 15 exit 1;
14} 16}
15 17
16print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; 18print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
17
18if ($] < 5.006) {
19 print <<EOF;
20
21***
22*** WARNING: This module is quite low-level and uses undocumented perl
23*** internals to do it's job. While it seems to work fine with perl-5.[6-10]
24*** 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***
27*** Marc Lehmann <schmorp\@schmorp.de>
28***
29
30EOF
31}
32 19
33if (eval { require Event }) { 20if (eval { require Event }) {
34 if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { 21 if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) {
35 print <<EOF 22 print <<EOF
36 23
47 $EVENT = 1; 34 $EVENT = 1;
48 $DEFINE .= " -DHAVE_EVENT=1"; 35 $DEFINE .= " -DHAVE_EVENT=1";
49 print "\nEvent version $Event::VERSION found, building Event support.\n\n"; 36 print "\nEvent version $Event::VERSION found, building Event support.\n\n";
50 } 37 }
51} else { 38} else {
52 print "\n*** Event not found, not build Event support.\n\n"; 39 print "\n*** Event not found, not building Event support.\n\n";
53} 40}
54 41
55if (eval { require EV }) { 42if (eval { require EV }) {
43 if ($EV::VERSION < 3.3) {
44 print <<EOF
45
46***
47*** WARNING: EV version $EV::VERSION found, NOT building EV support.
48***
49*** This version is ABI-incompatible with Coro, please upgrade to at least 3.3.
50***
51
52EOF
53 } else {
56 $EV = 1; 54 $EV = 1;
57 $DEFINE .= " -DHAVE_EV=1"; 55 $DEFINE .= " -DHAVE_EV=1";
58 print "\nEV version $EV::VERSION found, building EV support.\n\n"; 56 print "\nEV version $EV::VERSION found, building EV support.\n\n";
57 }
59} else { 58} else {
60 print "\n*** EV not found, not build EV support.\n\n"; 59 print "\n*** EV not found, not building EV support.\n\n";
61} 60}
62 61
63WriteMakefile( 62WriteMakefile(
64 dist => { 63 dist => {
65 PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', 64 PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
68 }, 67 },
69 NAME => "Coro", 68 NAME => "Coro",
70 VERSION_FROM => "Coro.pm", 69 VERSION_FROM => "Coro.pm",
71 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], 70 DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())],
72 PREREQ_PM => { 71 PREREQ_PM => {
72 common::sense => 0,
73 Scalar::Util => 0.00, 73 Scalar::Util => 0.00,
74 AnyEvent => 2.7, 74 AnyEvent => 5.0,
75 Storable => 2.15, 75 Storable => 2.15,
76 Time::HiRes => 0, 76 Time::HiRes => 0,
77 Guard => 0.5,
77 78
78 # for Coro::Event 79 # for Coro::Event
79 Event => 1.06, 80 #Event => 1.06,
80 81
81 # for Coro::EV 82 # for Coro::EV
82 EV => 1.3, 83 #EV => 3.3,
83 84
84 # for Coro::AIO 85 # for Coro::AIO
85 IO::AIO => 2.3, 86 #IO::AIO => 2.3,
87 #AnyEvent::AIO => 1.1,
88
89 # for Coro::BDB
90 #BDB => 1.5,
91 #AnyEvent::BDB => 1.0,
86 }, 92 },
93 # 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 # needs his brain rearranged dramatically.
87 EXTRA_META => q{ 97 META_MERGE => {
88configure_requires: 98 recommends => {
89 Event: 1.06 99 Event => 1.08,
90 EV: 1.3 100 EV => 3.0,
101 IO::AIO => 3.1,
102 AnyEvent::AIO => 1.0,
103 BDB => 0,
104 AnyEvent::BDB => 1.0,
105 }
91 }, 106 },
92 PM => { 107 PM => {
93 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', 108 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
94 109
95 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', 110 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
111 'Coro/jit-amd64-unix.pl' => '$(INST_LIBDIR)/Coro/jit-amd64-unix.pl',
96 112
97 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm', 113 'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
98 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h', 114 'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
99 115
100# 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm', 116# 'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
116 132
117 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm', 133 'Coro/AIO.pm' => '$(INST_LIBDIR)/Coro/AIO.pm',
118 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm', 134 'Coro/BDB.pm' => '$(INST_LIBDIR)/Coro/BDB.pm',
119 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm', 135 'Coro/LWP.pm' => '$(INST_LIBDIR)/Coro/LWP.pm',
120 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm', 136 'Coro/Storable.pm' => '$(INST_LIBDIR)/Coro/Storable.pm',
137 'Coro/AnyEvent.pm' => '$(INST_LIBDIR)/Coro/AnyEvent.pm',
121 }, 138 },
122); 139);
123 140
124sub MY::postamble { 141sub MY::postamble {
125 <<EOF; 142 <<EOF;
126 143
127# set \$VERSION in all modules 144# set \$VERSION in all modules
128setver: 145setver:
129 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm 146 \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm
130 147
131EOF 148EOF
132} 149}
133 150
134 151

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines