]> git.vpit.fr Git - perl/modules/autovivification.git/blob - Makefile.PL
Don't run the POD spelling test in taint mode
[perl/modules/autovivification.git] / Makefile.PL
1 use 5.008003;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 use Config;
8
9 my @DEFINES;
10 my %macro;
11
12 my $is_gcc_34 = 0;
13 print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
14 if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
15  my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
16  if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
17   $is_gcc_34 = 1;
18   my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
19   $_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
20   $libperl = "-l$libperl";
21   my $libdirs = join ' ',
22                  map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
23                   @Config{qw<bin sitebin>};
24   $macro{LDDLFLAGS}    = "$lddlflags $libdirs $libperl";
25   $macro{LDFLAGS}      = "$ldflags $libdirs $libperl";
26   $macro{PERL_ARCHIVE} = '',
27  }
28 }
29 print $is_gcc_34 ? "yes\n" : "no\n";
30
31 # Threads, Windows and 5.8.x don't seem to be best friends
32 if ($^O eq 'MSWin32' && "$]" < 5.009) {
33  push @DEFINES, '-DA_MULTIPLICITY=0';
34 }
35
36 # Fork emulation got "fixed" in 5.10.1
37 if ($^O eq 'MSWin32' && "$]" < 5.010001) {
38  push @DEFINES, '-DA_FORKSAFE=0';
39 }
40
41 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
42 %macro   = (macro  => { %macro })         if %macro; # Beware of the circle
43
44 my $dist = 'autovivification';
45
46 (my $name = $dist) =~ s{-}{::}g;
47
48 (my $file = $dist) =~ s{-}{/}g;
49 $file = "lib/$file.pm";
50
51 my %PREREQ_PM = (
52  'XSLoader' => 0,
53 );
54
55 my %BUILD_REQUIRES = (
56  'Config'              => 0,
57  'Exporter'            => 0,
58  'ExtUtils::MakeMaker' => 0,
59  'Test::More'          => 0,
60  %PREREQ_PM,
61 );
62
63 my %META = (
64  configure_requires => {
65   'ExtUtils::MakeMaker' => 0,
66  },
67  build_requires => {
68   %BUILD_REQUIRES,
69  },
70  dynamic_config => 1,
71  resources => {
72   bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
73   homepage   => "http://search.cpan.org/dist/$dist/",
74   license    => 'http://dev.perl.org/licenses/',
75   repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
76  },
77 );
78
79 WriteMakefile(
80  NAME             => $name,
81  AUTHOR           => 'Vincent Pit <perl@profvince.com>',
82  LICENSE          => 'perl',
83  VERSION_FROM     => $file,
84  ABSTRACT_FROM    => $file,
85  PL_FILES         => {},
86  @DEFINES,
87  BUILD_REQUIRES   => \%BUILD_REQUIRES,
88  PREREQ_PM        => \%PREREQ_PM,
89  MIN_PERL_VERSION => '5.008003',
90  META_MERGE       => \%META,
91  dist             => {
92   PREOP    => "pod2text -u $file > \$(DISTVNAME)/README",
93   COMPRESS => 'gzip -9f', SUFFIX => 'gz'
94  },
95  clean            => {
96   FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"
97  },
98  %macro,
99 );