X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Makefile.PL;h=96979982eafcb47c9ded1941cfbf23cb42ca56f0;hb=cc7a828047363ac6c6021fd0857e4748ac0e646b;hp=697c079ca1aebbb4e798d37b9fd90a58f405b935;hpb=b41c498738a3a4ccb8742883a42e6ea5addb1afd;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/Makefile.PL b/Makefile.PL index 697c079..9697998 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,28 +4,12 @@ use strict; use warnings; use ExtUtils::MakeMaker; -my $has_version_pm; BEGIN { eval { require Config }; die 'OS unsupported' if $@; - Config->import(qw/%Config/); + Config->import(qw<%Config>); eval { require File::Spec }; die 'OS unsupported' if $@; - $has_version_pm = eval "require version; 1" || 0; -} -use lib 'lib'; - -print 'Checking for valgrind ' . ('>= 3.1.0 ' x $has_version_pm) .'in PATH... '; -require Test::Valgrind::Session; -my $vg = eval q[ - Test::Valgrind::Session->new((min_version => '3.1.0') x $has_version_pm) - ->valgrind -]; -if ($vg) { - print "$vg\n"; -} else { - print "no\n"; - die 'OS unsupported'; } # Inspired from Module::Install::Can @@ -57,6 +41,13 @@ if ($has_cc) { print "none\n"; } +my $dist = 'Test-Valgrind'; + +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Carp' => 0, 'Digest::MD5' => 0, @@ -64,28 +55,24 @@ my %PREREQ_PM = ( 'File::HomeDir' => '0.86', 'File::Path' => 0, 'File::Spec' => 0, - 'File::Temp' => 0, + 'File::Temp' => '0.14', # OO interface + 'Filter::Util::Call' => 0, 'Fcntl' => 0, + 'List::Util' => 0, 'POSIX' => 0, 'Perl::Destruct::Level' => 0, 'Scalar::Util' => 0, 'Test::Builder' => 0, + 'Test::More' => 0, 'XML::Twig' => 0, + 'base' => 0, 'version' => 0, ); -my $dist = 'Test-Valgrind'; - my %META = ( configure_requires => { - 'Carp' => 0, - 'Config' => 0, - 'ExtUtils::MakeMaker' => 0, - 'Fcntl' => 0, 'File::Spec' => 0, - 'POSIX' => 0, - 'Scalar::Util' => 0, - 'version' => 0, + 'ExtUtils::MakeMaker' => 0, }, build_requires => { 'ExtUtils::MakeMaker' => 0, @@ -96,30 +83,31 @@ my %META = ( 'DynaLoader' => 0, 'XSLoader' => 0, }, + dynamic_config => 1, resources => { bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist", homepage => "http://search.cpan.org/dist/$dist/", license => 'http://dev.perl.org/licenses/', - repository => "http://git.profvince.com/perl/modules/$dist.git", + repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git", }, ); WriteMakefile( - NAME => 'Test::Valgrind', - AUTHOR => 'Vincent Pit ', - LICENSE => 'perl', - VERSION_FROM => 'lib/Test/Valgrind.pm', - ABSTRACT_FROM => 'lib/Test/Valgrind.pm', - OPTIMIZE => '-g', - C => \@C, - PREREQ_PM => \%PREREQ_PM, - MIN_PERL_VERSION => 5.006, - META_MERGE => \%META, - dist => { - PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README', - COMPRESS => 'gzip -9f', SUFFIX => 'gz', - }, - clean => { - FILES => "$dist-* Makefile.bak *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt" - }, + NAME => $name, + AUTHOR => 'Vincent Pit ', + LICENSE => 'perl', + VERSION_FROM => $file, + ABSTRACT_FROM => $file, + OPTIMIZE => '-g', + C => \@C, + PREREQ_PM => \%PREREQ_PM, + MIN_PERL_VERSION => 5.006, + META_MERGE => \%META, + dist => { + PREOP => "pod2text -u $file > \$(DISTVNAME)/README", + COMPRESS => 'gzip -9f', SUFFIX => 'gz', + }, + clean => { + FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt" + }, );