File: Makefile.PL

package info (click to toggle)
libhtml-html5-parser-perl 0.992-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,444 kB
  • sloc: perl: 16,129; makefile: 2; sh: 1
file content (180 lines) | stat: -rw-r--r-- 10,007 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
use strict;
use ExtUtils::MakeMaker 6.17;

my $EUMM = eval( $ExtUtils::MakeMaker::VERSION );

my $meta = {
  "abstract"           => "parse HTML reliably",
  "author"             => ["Toby Inkster <tobyink\@cpan.org>"],
  "dynamic_config"     => 0,
  "generated_by"       => "Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010",
  "keywords"           => ["HTML", "HTML5", "Web"],
  "license"            => ["perl_5"],
  "meta-spec"          => {
                            url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
                            version => 2,
                          },
  "name"               => "HTML-HTML5-Parser",
  "no_index"           => { directory => ["eg", "examples", "inc", "t", "xt"] },
  "prereqs"            => {
                            configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } },
                            develop   => { recommends => { "Dist::Inkt" => 0.001 } },
                            runtime   => {
                                           requires => {
                                             "HTML::HTML5::Entities" => 0.002,
                                             "HTTP::Tiny"            => 0,
                                             "IO::HTML"              => 0,
                                             "perl"                  => 5.008001,
                                             "Scalar::Util"          => 0,
                                             "Try::Tiny"             => 0,
                                             "URI::file"             => 0,
                                             "XML::LibXML"           => 1.94,
                                             "XML::LibXML::Devel"    => 0,
                                           },
                                         },
                            test      => {
                                           recommends => { "LWP::UserAgent" => 0 },
                                           requires   => { "FindBin" => 0, "Test::More" => 0.61, "Test::Requires" => 0 },
                                         },
                          },
  "provides"           => {
                            "HTML::HTML5::Parser"                                    => { file => "lib/HTML/HTML5/Parser.pm", version => 0.992 },
                            "HTML::HTML5::Parser::Charset::DecodeHandle"             => {
                                                                                          file => "lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm",
                                                                                          version => 0.992,
                                                                                        },
                            "HTML::HTML5::Parser::Charset::DecodeHandle::ByteBuffer" => { file => "lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm" },
                            "HTML::HTML5::Parser::Charset::DecodeHandle::CharString" => { file => "lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm" },
                            "HTML::HTML5::Parser::Charset::DecodeHandle::Encode"     => { file => "lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm" },
                            "HTML::HTML5::Parser::Charset::DecodeHandle::ISO2022JP"  => { file => "lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm" },
                            "HTML::HTML5::Parser::Charset::Info"                     => { file => "lib/HTML/HTML5/Parser/Charset/Info.pm", version => 0.992 },
                            "HTML::HTML5::Parser::Charset::UnicodeChecker"           => {
                                                                                          file => "lib/HTML/HTML5/Parser/Charset/UnicodeChecker.pm",
                                                                                          version => 0.992,
                                                                                        },
                            "HTML::HTML5::Parser::Charset::UniversalCharDet"         => {
                                                                                          file => "lib/HTML/HTML5/Parser/Charset/UniversalCharDet.pm",
                                                                                          version => 0.992,
                                                                                        },
                            "HTML::HTML5::Parser::Charset::USASCII"                  => { file => "lib/HTML/HTML5/Parser/Charset/WebLatin1.pm" },
                            "HTML::HTML5::Parser::Charset::WebLatin1"                => {
                                                                                          file => "lib/HTML/HTML5/Parser/Charset/WebLatin1.pm",
                                                                                          version => 0.992,
                                                                                        },
                            "HTML::HTML5::Parser::Charset::WebLatin5"                => { file => "lib/HTML/HTML5/Parser/Charset/WebLatin1.pm" },
                            "HTML::HTML5::Parser::Charset::WebThai"                  => {
                                                                                          file => "lib/HTML/HTML5/Parser/Charset/WebThai.pm",
                                                                                          version => 0.992,
                                                                                        },
                            "HTML::HTML5::Parser::Charset::WebThai::WebTIS620"       => { file => "lib/HTML/HTML5/Parser/Charset/WebThai.pm" },
                            "HTML::HTML5::Parser::Error"                             => { file => "lib/HTML/HTML5/Parser/Error.pm", version => 0.992 },
                            "HTML::HTML5::Parser::TagSoupParser"                     => { file => "lib/HTML/HTML5/Parser/TagSoupParser.pm", version => 0.992 },
                            "HTML::HTML5::Parser::TagSoupParser::RestartParser"      => { file => "lib/HTML/HTML5/Parser/TagSoupParser.pm" },
                            "HTML::HTML5::Parser::Tokenizer"                         => { file => "lib/HTML/HTML5/Parser/Tokenizer.pm", version => 0.992 },
                            "HTML::HTML5::Parser::UA"                                => { file => "lib/HTML/HTML5/Parser/UA.pm", version => 0.992 },
                          },
  "release_status"     => "stable",
  "resources"          => {
                            bugtracker   => { web => "https://github.com/tobyink/p5-html-html5-parser/issues" },
                            homepage     => "https://metacpan.org/release/HTML-HTML5-Parser",
                            license      => ["http://dev.perl.org/licenses/"],
                            repository   => {
                                              type => "git",
                                              url  => "git://github.com/tobyink/p5-html-html5-parser.git",
                                              web  => "https://github.com/tobyink/p5-html-html5-parser",
                                            },
                            x_identifier => "http://purl.org/NET/cpan-uri/dist/HTML-HTML5-Parser/project",
                          },
  "version"            => 0.992,
  "x_contributors"     => [
                            "Wakaba",
                            "SHELLAC",
                            "AUDREYT <audreyt\@cpan.org>",
                            "TOBYINK",
                            "Dorian Taylor",
                            "Gregory Williams",
                            "Kjetil Kjernsmo",
                            "Alex Vandiver",
                          ],
  "x_provides_scripts" => {
                            html2xhtml => { file => "bin/html2xhtml" },
                            html5debug => { file => "bin/html5debug" },
                          },
};

my %dynamic_config;

my %WriteMakefileArgs = (
	ABSTRACT   => $meta->{abstract},
	AUTHOR     => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]),
	DISTNAME   => $meta->{name},
	VERSION    => $meta->{version},
	EXE_FILES  => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ],
	NAME       => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n },
	test       => { TESTS => "t/*.t" },
	%dynamic_config,
);

$WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001;

sub deps
{
	my %r;
	for my $stage (@_)
	{
		for my $dep (keys %{$meta->{prereqs}{$stage}{requires}})
		{
			next if $dep eq 'perl';
			my $ver = $meta->{prereqs}{$stage}{requires}{$dep};
			$r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep};
		}
	}
	\%r;
}

my ($build_requires, $configure_requires, $runtime_requires, $test_requires);
if ($EUMM >= 6.6303)
{
	$WriteMakefileArgs{BUILD_REQUIRES}     ||= deps('build');
	$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
	$WriteMakefileArgs{TEST_REQUIRES}      ||= deps('test');
	$WriteMakefileArgs{PREREQ_PM}          ||= deps('runtime');
}
elsif ($EUMM >= 6.5503)
{
	$WriteMakefileArgs{BUILD_REQUIRES}     ||= deps('build', 'test');
	$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
	$WriteMakefileArgs{PREREQ_PM}          ||= deps('runtime');	
}
elsif ($EUMM >= 6.52)
{
	$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
	$WriteMakefileArgs{PREREQ_PM}          ||= deps('runtime', 'build', 'test');	
}
else
{
	$WriteMakefileArgs{PREREQ_PM}          ||= deps('configure', 'build', 'test', 'runtime');	
}

{
	my ($minperl) = reverse sort(
		grep defined && /^[0-9]+(\.[0-9]+)?$/,
		map $meta->{prereqs}{$_}{requires}{perl},
		qw( configure build runtime )
	);
	
	if (defined($minperl))
	{
		die "Installing $meta->{name} requires Perl >= $minperl"
			unless $] >= $minperl;
		
		$WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl
			if $EUMM >= 6.48;
	}
}


my $mm = WriteMakefile(%WriteMakefileArgs);

exit(0);