~ubuntu-branches/ubuntu/trusty/libversion-perl/trusty

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-09 14:44:58 UTC
  • mfrom: (7.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20140109144458-35u0eijdn1ed62w0
Tags: 1:0.9906-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - debian/control: Build-depend on locales rather than locales-all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
use ExtUtils::MakeMaker;
9
9
use Config qw(%Config);
10
10
use File::Spec;
 
11
use File::Copy;
11
12
 
12
13
use vars qw ($no_xs $force_xs);
13
 
 
14
 
if ( $] >= 5.009_001 && $] < 5.010_000 ) {
15
 
    die "The CPAN module cannot be tested with Perl $]\n".
16
 
        "Please update to the latest bleadperl...";
17
 
}
 
14
unlink 'pm_to_blib'; # belts and braces
18
15
 
19
16
if ($ENV{PERL_ONLY}) {
20
17
    $no_xs = 1;
27
24
    /^--xs/ and $no_xs = 0;
28
25
}
29
26
 
 
27
if ($] < 5.010) { # support pure Perl only
 
28
    $no_xs = 1;
 
29
}
 
30
 
30
31
map { unlink $_ if -f $_ } <vutil/Makefile*>;
31
32
 
32
33
unless (defined $no_xs)
33
34
{
34
35
    check_for_compiler()
35
36
        or no_cc();
 
37
 
36
38
}
37
39
 
38
40
write_makefile();
40
42
sub write_makefile
41
43
{
42
44
    my %prereq = (
43
 
        'Test::More' => 0.45,
44
 
        'File::Temp' => 0.13,
45
 
        'parent'     => 0.221,
 
45
        'Test::More' => 0.45,
 
46
        'File::Temp' => 0.13,
 
47
        'parent'     => 0.221,
46
48
    );
47
49
 
48
50
    WriteMakefile( VERSION_FROM    => 'lib/version.pm',
55
57
                       AUTHOR      => 'John Peacock <jpeacock@cpan.org>') :
56
58
                     ()
57
59
                   ), 
58
 
                   ( $] >= 5.009001 && $] < 5.011000 ?
59
 
                     ( INSTALLDIRS => 'perl' ) :
 
60
                   ( $] >= 5.009001 && $] < 5.011000 ?
 
61
                     ( INSTALLDIRS => 'perl' ) :
 
62
                     ()
 
63
                   ),
 
64
                   ( ($] < 5.012
 
65
                       && ! $ENV{PERL_NO_HIGHLANDER}
 
66
                       && ! ( $ENV{PERL_MM_OPT}
 
67
                           && $ENV{PERL_MM_OPT} =~ /(?:INSTALL_BASE|PREFIX)/ )
 
68
                       && ! grep { /INSTALL_BASE/ || /PREFIX/ } @ARGV ) ?
 
69
                     ( UNINST => 1 ) :
60
70
                     ()
61
71
                   ),
62
72
                   PM              => 
63
73
                       {'lib/version.pm'  => '$(INST_LIBDIR)/version.pm',
64
74
                        'lib/version.pod' => '$(INST_LIBDIR)/version.pod',
 
75
                        'lib/version/regex.pm'  =>
 
76
                            '$(INST_LIBDIR)/version/regex.pm',
65
77
                        'lib/version/Internals.pod' =>
66
 
                            '$(INST_LIBDIR)/version/Internals.pod'},
 
78
                            '$(INST_LIBDIR)/version/Internals.pod',
 
79
                        'vperl/vpp.pm' => '$(INST_LIBDIR)/version/vpp.pm',
 
80
                        },
67
81
                   PL_FILES        => {},
68
82
                   C               => [],
69
 
                   clean           => { FILES => 'vutil/Makefile.PL' },
 
83
                   clean           => { FILES => ['vutil/Makefile.PL',
 
84
                                                 ]},
70
85
                   dist            => {
71
86
                       COMPRESS => 'gzip -9f', 
72
87
                       SUFFIX => 'gz',
74
89
                          'hg log --style changelog > Changes'
75
90
                       ),
76
91
                   },
77
 
 
78
92
                 );
79
93
}
80
94
 
83
97
    my $hash = $_[1];
84
98
 
85
99
    # include this always
86
 
    $hash->{'PM'}->{'vperl/vpp.pm'} = '$(INST_LIBDIR)/version/vpp.pm';
87
100
    unless ($no_xs) {
88
101
        open MAKEFILE, '>vutil/Makefile.PL';
89
102
        while (<DATA>) {
167
180
    AUTHOR              => 'John Peacock <jpeacock@cpan.org>',
168
181
    VERSION_FROM        => 'lib/version/vxs.pm',
169
182
    OBJECT              => q/$(O_FILES)/,
170
 
    TYPEMAPS            => ['../lib/version/typemap'],
 
183
    depend              => { qw< vxs.c vxs.inc > },
171
184
);