root/trunk/plagger/Makefile.PL

Revision 1966 (checked in by miyagawa, 13 years ago)

update XML::RSS::LibXML dependency

Line 
1 use strict;
2 use inc::Module::Install;
3
4 name('Plagger');
5 all_from('lib/Plagger.pm');
6
7 requires('Class::Accessor::Fast');
8 requires('File::Find::Rule');
9 requires('UNIVERSAL::require' => 0.10);
10 requires('Template', 2.13);
11 requires('Template::Provider::Encoding' => 0.04);
12 requires('YAML' => 0.39);
13 requires('Text::Tags');
14 requires('DateTime' => 0.35);
15 requires('DateTime::TimeZone' => 0.56);
16 requires('DateTime::Locale' => 0.32);
17 requires('DateTime::Format::Mail');
18 requires('DateTime::Format::W3CDTF');
19 requires('DateTime::Format::Strptime');
20 requires('Digest::MD5');
21 requires('LWP');
22 requires('HTML::Parser' => 3.51);
23 requires('URI::Fetch' => 0.071);
24 requires('Cache::Cache' => 1.04);
25 requires('Module::Pluggable::Fast');
26 requires('HTML::ResolveLink');
27 requires('Date::Parse');
28 requires('MIME::Types', 1.16);
29 requires('Net::DNS');
30
31 requires('XML::Feed', 0.12);
32 requires('XML::LibXML');
33 requires('XML::Atom', 0.23);
34 requires('XML::RSS::LibXML', 0.3002);
35 requires('Encode', 2.10);
36 requires('Term::Encoding');
37 requires('File::HomeDir');
38
39 build_requires('YAML');
40 build_requires('YAML::Loader');
41 include_deps('YAML');
42
43 build_requires('Test::More', 0.42);
44 build_requires('Test::Base', 0.52);
45
46 features(
47     'Better Encoding detection' => [
48         -default => 0,
49         recommends('Encode::Detect', 1.0),
50     ],
51     'POD Testing' => [
52         -default => 0,
53         recommends('Test::Pod'),
54         recommends('Test::Pod::Coverage'),
55     ],
56     'Cookie sharing with Firefox' => [
57         -default => 0,
58         recommends('HTTP::Cookies::Mozilla'),
59     ],
60     'Liberal XML parsing' => [
61         -default => 1,
62         recommends('XML::Liberal', 0.14),
63         recommends('XML::RSS::Liberal'),
64     ],
65     'XPath support in Subscription and Feed Upgrader' => [
66         -default => 1,
67         recommends('HTML::TreeBuilder::XPath'),
68     ],
69     'Better html to text formatter' => [
70         -default => 1,
71         recommends('HTML::TreeBuilder'),
72         recommends('HTML::FormatText'),
73     ],
74     'Parse Japanese datetime format' => [
75         -default => 0,
76         recommends('DateTime::Format::Japanese'),
77     ],
78 );
79
80 require YAML;
81 require DirHandle;
82 require File::Spec;
83
84 my $dh = DirHandle->new("deps");
85 my @plugins;
86 while (my $f = $dh->read) {
87     next unless $f =~ /\.yaml$/;
88     my $meta = eval { YAML::LoadFile( File::Spec->catfile("deps", $f) ) };
89     if ($@) {
90         warn "Loading deps/$f failed: $@";
91         next;
92     }
93     push @plugins, $meta if !$meta->{platform} || $meta->{platform} eq $^O;
94 }
95
96 for my $meta (sort { $b->{default} <=> $a->{default} || $a->{name} cmp $b->{name} } @plugins) {
97     features(
98         $meta->{name}, [
99             -default => $meta->{default},
100             map recommends($_ => $meta->{depends}->{$_}), keys %{$meta->{depends} || {}},
101         ],
102     );
103 }
104
105 tests 't/*.t t/*/*.t t/*/*/*.t';
106
107 use_test_base;
108
109 auto_include;
110 auto_install;
111
112 install_script('plagger');
113 install_script('bin/plagger-ircbot');
114 WriteAll;
Note: See TracBrowser for help on using the browser.