1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | use 5.008; # AnyEvent core seems to work with 5.6 |
3 | use 5.008001; # AnyEvent perl event loop seems to work with 5.6, other modules not |
4 | |
4 | |
5 | print <<EOF; |
5 | print <<EOF; |
6 | |
6 | |
7 | *** |
7 | *** |
8 | *** The EV module is recommended for even better performance, unless you |
8 | *** The EV module is recommended for even better performance, unless you |
9 | *** have to use one of the other adaptors (Event, Glib, Tk, etc.). |
9 | *** have to use one of the other adaptors (Event, Glib, Tk, etc.). |
|
|
10 | *** The Async::Interrupt module is highly recommended to efficiently avoid |
|
|
11 | *** race conditions in/with other event loops. |
10 | *** |
12 | *** |
11 | *** This module does not have ANY dependencies, even if it might look |
13 | *** This module does not have ANY dependencies, even if it might look |
12 | *** otherwise. If you are building a distribution package or have |
14 | *** otherwise. If you are building a distribution package or have |
13 | *** difficulties installing this package due to dependencies, report this |
15 | *** difficulties installing this package due to dependencies, report this |
14 | *** to the packager as a bug. |
16 | *** to the packager as a bug. |
15 | *** |
17 | *** |
16 | *** This module is guaranteed to stay pure-perl and still be full-featured |
18 | *** This module is guaranteed to stay 100% pure-perl, full-featured |
17 | *** and performant, even without any optionally recommended modules. |
19 | *** and performant, even without any of the optional modules. |
18 | *** |
20 | *** |
19 | |
21 | |
20 | EOF |
22 | EOF |
|
|
23 | |
|
|
24 | do "constants.pl.PL" |
|
|
25 | or die "cannot execute constants.pl.PL: $@"; |
21 | |
26 | |
22 | WriteMakefile( |
27 | WriteMakefile( |
23 | dist => { |
28 | dist => { |
24 | PREOP => 'pod2text lib/AnyEvent.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
29 | PREOP => 'pod2text lib/AnyEvent.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
25 | COMPRESS => 'gzip -9v', |
30 | COMPRESS => 'gzip -9v', |
26 | SUFFIX => '.gz', |
31 | SUFFIX => '.gz', |
27 | }, |
32 | }, |
28 | test => { TESTS => "t/*.t t/handle/*.t" }, |
33 | test => { TESTS => "t/*.t t/handle/*.t" }, |
29 | NAME => "AnyEvent", |
34 | NAME => "AnyEvent", |
30 | VERSION_FROM => "lib/AnyEvent.pm", |
35 | VERSION_FROM => "lib/AnyEvent.pm", |
|
|
36 | PMLIBDIRS => ["lib"], |
31 | META_MERGE => { |
37 | META_MERGE => { |
32 | recommends => { |
38 | recommends => { |
33 | "Net::SSLeay" => 1.33, |
39 | "Net::SSLeay" => 1.33, |
34 | "JSON" => 2.09, |
40 | "JSON" => 2.09, |
35 | "JSON::XS" => 2.2, |
41 | "JSON::XS" => 2.2, |
36 | "EV" => 3.05, |
42 | "EV" => 4.00, |
37 | "Guard" => 1.02, |
43 | "Guard" => 1.02, |
|
|
44 | "Async::Interrupt" => 1.0, |
38 | } |
45 | } |
|
|
46 | }, |
|
|
47 | PM => { |
|
|
48 | 'lib/AE.pm' => '$(INST_LIBDIR)/AE.pm', |
|
|
49 | 'lib/AnyEvent.pm' => '$(INST_LIBDIR)/AnyEvent.pm', |
|
|
50 | 'lib/AnyEvent/DNS.pm' => '$(INST_LIBDIR)/AnyEvent/DNS.pm', |
|
|
51 | 'lib/AnyEvent/Debug.pm' => '$(INST_LIBDIR)/AnyEvent/Debug.pm', |
|
|
52 | 'lib/AnyEvent/FAQ.pod' => '$(INST_LIBDIR)/AnyEvent/FAQ.pod', |
|
|
53 | 'lib/AnyEvent/Handle.pm' => '$(INST_LIBDIR)/AnyEvent/Handle.pm', |
|
|
54 | 'lib/AnyEvent/Loop.pm' => '$(INST_LIBDIR)/AnyEvent/Loop.pm', |
|
|
55 | 'lib/AnyEvent/Impl/Cocoa.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Cocoa.pm', |
|
|
56 | 'lib/AnyEvent/Impl/EV.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/EV.pm', |
|
|
57 | 'lib/AnyEvent/Impl/Event.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Event.pm', |
|
|
58 | 'lib/AnyEvent/Impl/EventLib.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/EventLib.pm', |
|
|
59 | 'lib/AnyEvent/Impl/Glib.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Glib.pm', |
|
|
60 | 'lib/AnyEvent/Impl/IOAsync.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/IOAsync.pm', |
|
|
61 | 'lib/AnyEvent/Impl/Irssi.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Irssi.pm', |
|
|
62 | 'lib/AnyEvent/Impl/POE.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/POE.pm', |
|
|
63 | 'lib/AnyEvent/Impl/Perl.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Perl.pm', |
|
|
64 | 'lib/AnyEvent/Impl/Qt.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Qt.pm', |
|
|
65 | 'lib/AnyEvent/Impl/Tk.pm' => '$(INST_LIBDIR)/AnyEvent/Impl/Tk.pm', |
|
|
66 | 'lib/AnyEvent/Intro.pod' => '$(INST_LIBDIR)/AnyEvent/Intro.pod', |
|
|
67 | 'lib/AnyEvent/Socket.pm' => '$(INST_LIBDIR)/AnyEvent/Socket.pm', |
|
|
68 | 'lib/AnyEvent/Strict.pm' => '$(INST_LIBDIR)/AnyEvent/Strict.pm', |
|
|
69 | 'lib/AnyEvent/TLS.pm' => '$(INST_LIBDIR)/AnyEvent/TLS.pm', |
|
|
70 | 'lib/AnyEvent/Util.pm' => '$(INST_LIBDIR)/AnyEvent/Util.pm', |
|
|
71 | 'lib/AnyEvent/Util/idna.pl' => '$(INST_LIBDIR)/AnyEvent/Util/idna.pl', |
|
|
72 | 'lib/AnyEvent/Util/uts46data.pl' => '$(INST_LIBDIR)/AnyEvent/Util/uts46data.pl', |
|
|
73 | 'lib/AnyEvent/constants.pl' => '$(INST_ARCHLIBDIR)/AnyEvent/constants.pl', |
39 | }, |
74 | }, |
40 | ); |
75 | ); |
41 | |
76 | |
42 | sub MY::postamble { |
|
|
43 | <<EOF; |
|
|
44 | |
|
|
45 | # set \$VERSION in all modules |
|
|
46 | setver: |
|
|
47 | \$(PERL) -pi -e 's/^(\\s*(our\\s*)?\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' \$(TO_INST_PM) |
|
|
48 | |
|
|
49 | EOF |
|
|
50 | } |
|
|
51 | |
|
|