1#!/usr/bin/perl 2 3package main; 4 5use 5.010001; 6use strict; 7use warnings; 8use ExtUtils::MakeMaker 6.48; 9use ExtUtils::Liblist; 10use Config; 11 12my $libs = ($^O eq 'freebsd' or $^O eq 'dragonfly') ? '-ltidy5' : '-ltidy'; 13my $inc = "-I. -I/usr/include/tidy -I/usr/local/include/tidy -I$Config{usrinc}/tidy"; 14 15if ( not eval { require LWP::Simple; 1; } ) { 16 print <<'EOF'; 17 18NOTE: It seems that you don't have LWP::Simple installed. 19 The webtidy program will not be able to retrieve web pages. 20 21EOF 22} 23 24my $parms = { 25 NAME => 'HTML::Tidy5', 26 AUTHOR => 'Andy Lester <andy@petdance.com>', 27 VERSION_FROM => 'lib/HTML/Tidy5.pm', 28 ABSTRACT_FROM => 'lib/HTML/Tidy5.pm', 29 PREREQ_PM => { 30 'Encode' => 0, # for tests 31 'Exporter' => 0, 32 'Getopt::Long' => 0, # in webtidy 33 'Test::More' => '0.98', # For subtest() 34 'Test::Builder' => 0, 35 'Test::Exception' => 0, 36 'Carp' => 0, 37 'constant' => 0, 38 }, 39 40 MIN_PERL_VERSION => 5.010001, 41 LICENSE => 'artistic_2', 42 META_MERGE => { 43 resources => { 44 license => 'http://www.opensource.org/licenses/artistic-license-2.0.php', 45 homepage => 'http://github.com/petdance/html-tidy5', 46 bugtracker => 'http://github.com/petdance/html-tidy5/issues', 47 repository => 'http://github.com/petdance/html-tidy5', 48 }, 49 }, 50 51 LIBS => [$libs], 52 NEEDS_LINKING => 1, 53 INC => $inc, 54 55 EXE_FILES => [qw(bin/webtidy5)], 56 dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, 57 clean => { FILES => 'HTML-Tidy5-*' }, 58}; 59 60WriteMakefile( %{$parms} ); 61 62sub MY::postamble { ## no critic ( Subroutines::ProhibitQualifiedSubDeclarations ) 63return <<'MAKE_FRAG'; 64.PHONY: tags critic 65 66tags: 67 ctags -f tags --recurse --totals \ 68 --exclude=blib --exclude=t/lib \ 69 --exclude=.svn --exclude='*~' \ 70 --languages=C,Perl --langmap=Perl:+.t \ 71 . 72 73critic: 74 perlcritic -1 \ 75 -profile perlcriticrc \ 76 . 77 78MAKE_FRAG 79} 80