This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge branch 'release-5.38.0' into blead
[perl5.git] / cpan / Scalar-List-Utils / Makefile.PL
1 # -*- perl -*-
2 BEGIN { require 5.006; }
3 use strict;
4 use warnings;
5 use Config;
6 use File::Spec;
7 use ExtUtils::MakeMaker;
8 my $PERL_CORE = grep { $_ eq 'PERL_CORE=1' } @ARGV;
9 my $defines = $ENV{PERL_CORE} ? q[-DPERL_EXT] : q[-DPERL_EXT -DUSE_PPPORT_H];
10
11 my %params = (
12   NAME         => q[List::Util],
13   ABSTRACT     => q[Common Scalar and List utility subroutines],
14   AUTHOR       => q[Graham Barr <gbarr@cpan.org>],
15   DEFINE       => $defines,
16   DISTNAME     => q[Scalar-List-Utils],
17   VERSION_FROM => 'lib/List/Util.pm',
18
19   # We go through the ListUtil.xs trickery to foil platforms
20   # that have the feature combination of
21   # (1) static builds
22   # (2) allowing only one object by the same name in the static library
23   # (3) the object name matching being case-blind
24   # This means that we can't have the top-level util.o
25   # and the extension-level Util.o in the same build.
26   # One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform.
27   XS     => {'ListUtil.xs' => 'ListUtil.c'},
28   OBJECT => 'ListUtil$(OBJ_EXT)',
29   ( $PERL_CORE
30     ? ()
31     : (
32       INSTALLDIRS      => ($] < 5.011 ? q[perl] : q[site]),
33       TEST_REQUIRES => {
34         'Test::More' => 0,
35       },
36       (eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
37       (eval { ExtUtils::MakeMaker->VERSION(6.48) } ? (MIN_PERL_VERSION => '5.006') : ()),
38       ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (
39           META_MERGE => {
40             'meta-spec' => { version => 2 },
41             dynamic_config => 0,
42             resources => {    ##
43               repository => {
44                 url => 'https://github.com/Scalar-List-Utils/Scalar-List-Utils.git',
45                 web => 'https://github.com/Scalar-List-Utils/Scalar-List-Utils',
46                 type => 'git',
47               },
48               bugtracker => {
49                 mailto => 'bug-Scalar-List-Utils@rt.cpan.org',
50                 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils',
51               },
52             },
53           }
54           )
55         : ()
56       ),
57     )
58   ),
59 );
60
61 if ($params{TEST_REQUIRES} and !eval { ExtUtils::MakeMaker->VERSION(6.64) }) {
62     $params{BUILD_REQUIRES} = {
63         %{$params{BUILD_REQUIRES} || {}},
64         %{delete $params{TEST_REQUIRES}},
65     };
66 }
67 if ($params{BUILD_REQUIRES} and !eval { ExtUtils::MakeMaker->VERSION(6.5503) }) {
68     $params{PREREQ_PM} = {
69         %{$params{PREREQ_PM} || {}},
70         %{delete $params{BUILD_REQUIRES}},
71     };
72 }
73
74 WriteMakefile(%params);