--- cvsroot/Coro/Makefile.PL 2001/11/25 20:04:04 1.10 +++ cvsroot/Coro/Makefile.PL 2015/10/16 05:25:42 1.73 @@ -1,23 +1,63 @@ use ExtUtils::MakeMaker; -if ($] < 5.006) { +use Canary::Stability Coro => 1, 5.010; + +unless (-e "Coro/libcoro/coro.c") { print < +*** This version of Event is broken. The only currently known non-broken +*** versions of Event are 0.87 and 0.89+. Please install one of those +*** versions. *** EOF + } else { + $EVENT = 1; + $DEFINE .= " -DHAVE_EVENT=1"; + print "\nEvent version $Event::VERSION found, building Event support.\n\n"; + } +} else { + print "\n*** Event not found, not building Event support.\n\n"; } -$EVENT = eval { require Event }; +if (eval { require EV }) { + if ($EV::VERSION < 4.0) { + print < { @@ -27,13 +67,76 @@ }, NAME => "Coro", VERSION_FROM => "Coro.pm", - DIR => ['Coro', ($EVENT ? 'Event' : ())], + DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], PREREQ_PM => { - Event => 0.83, # still, 0.83 and below have serious bugs(!) + common::sense => 0, Scalar::Util => 0.00, + AnyEvent => 5.0, + Storable => 2.15, + Guard => 0.5, + + # for Coro::Event + #Event => 1.06, + + # for Coro::EV + #EV => 4.0, + + # for Coro::AIO + #IO::AIO => 2.3, + #AnyEvent::AIO => 1.1, + + # for Coro::BDB + #BDB => 1.5, + #AnyEvent::BDB => 1.0, + }, + CONFIGURE_REQUIRES => { ExtUtils::MakeMaker => 6.52, Canary::Stability => 0 }, + # neither configure_requires nor recommends can be used + # for optional dependencies. whoever decided that a module needs + # to build properly without its dependencies installed + # needs his brain rearranged dramatically. + META_MERGE => { + recommends => { + Event => 1.08, + EV => 4.0, + IO::AIO => 3.1, + BDB => 0, + AnyEvent => 7.0, + AnyEvent::AIO => 1.0, + AnyEvent::BDB => 1.0, + } }, PM => { - 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', + 'Coro.pm' => '$(INST_LIB)/Coro.pm', + + 'Coro/State.pm' => '$(INST_LIB)/Coro/State.pm', + 'Coro/jit-amd64-unix.pl' => '$(INST_LIB)/Coro/jit-amd64-unix.pl', + 'Coro/jit-x86-unix.pl' => '$(INST_LIB)/Coro/jit-x86-unix.pl', + + 'Coro/MakeMaker.pm' => '$(INST_LIB)/Coro/MakeMaker.pm', + 'Coro/CoroAPI.h' => '$(INST_LIB)/Coro/CoroAPI.h', + +# 'Coro/Cont.pm' => '$(INST_LIB)/Coro/Cont.pm', + + 'Coro/Specific.pm' => '$(INST_LIB)/Coro/Specific.pm', + + 'Coro/Timer.pm' => '$(INST_LIB)/Coro/Timer.pm', + 'Coro/Signal.pm' => '$(INST_LIB)/Coro/Signal.pm', + 'Coro/Channel.pm' => '$(INST_LIB)/Coro/Channel.pm', + 'Coro/Semaphore.pm' => '$(INST_LIB)/Coro/Semaphore.pm', + 'Coro/SemaphoreSet.pm'=> '$(INST_LIB)/Coro/SemaphoreSet.pm', + 'Coro/RWLock.pm' => '$(INST_LIB)/Coro/RWLock.pm', + + 'Coro/Debug.pm' => '$(INST_LIB)/Coro/Debug.pm', + 'Coro/Util.pm' => '$(INST_LIB)/Coro/Util.pm', + 'Coro/Select.pm' => '$(INST_LIB)/Coro/Select.pm', + 'Coro/Handle.pm' => '$(INST_LIB)/Coro/Handle.pm', + 'Coro/Socket.pm' => '$(INST_LIB)/Coro/Socket.pm', + + 'Coro/AIO.pm' => '$(INST_LIB)/Coro/AIO.pm', + 'Coro/BDB.pm' => '$(INST_LIB)/Coro/BDB.pm', + 'Coro/LWP.pm' => '$(INST_LIB)/Coro/LWP.pm', + 'Coro/Storable.pm' => '$(INST_LIB)/Coro/Storable.pm', + 'Coro/AnyEvent.pm' => '$(INST_LIB)/Coro/AnyEvent.pm', }, ); @@ -42,7 +145,7 @@ # set \$VERSION in all modules setver: - \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm + \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm EV/*.pm Event/*.pm EOF }