"Fossies" - the Fresh Open Source Software Archive

Member "Module-Build-0.4229/Build.PL" (15 Apr 2019, 5112 Bytes) of package /linux/privat/Module-Build-0.4229.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Build.PL": 0.4224_vs_0.4229.

    1 use 5.006001;
    2 use strict;
    3 
    4 BEGIN {
    5   die "CPANPLUS::Dist::Build version 0.08 or later is required to install Module::Build\n"
    6     if $INC{'CPANPLUS/Dist/Build.pm'} && CPANPLUS::Dist::Build->VERSION lt '0.08';
    7 }
    8 
    9 # On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" doesn't
   10 # find the local "lib" directory, so we use File::Spec to do it properly.
   11 use File::Spec 0.82;
   12 use lib File::Spec->catdir('lib');          # use our self to install
   13 # XXX This doesn't carry over to sub processes
   14 use lib File::Spec->catdir('t', 'bundled'); # use bundled modules
   15 use lib File::Spec->catdir('t', 'lib');     # our utilities
   16 
   17 # bootstrap configure_requires prereqs
   18 BEGIN { do './inc/bootstrap.pl' }
   19 
   20 # We use Module::Build to test & install itself.
   21 use Module::Build;
   22 
   23 # 
   24 
   25 my $build = Module::Build->new(
   26   module_name => 'Module::Build',
   27   license     => 'perl',
   28   configure_requires => {
   29     'CPAN::Meta'            => '2.142060',
   30     'Perl::OSType'          => 1,
   31     'Module::Metadata'      => '1.000002',
   32     'version'               => '0.87',
   33     'File::Spec'            => '0.82',
   34     'File::Copy'            => 0,
   35     'File::Basename'        => 0,
   36     'File::Path'            => 0,
   37   },
   38   # KEEP 'requires' as low as possible and target Build/test/install
   39   # Requirements for authors should be implemented as optional features
   40   requires    => {
   41     'perl'                  => '5.006001',
   42     'Data::Dumper'          => 0,
   43     'File::Basename'        => 0,
   44     'File::Compare'         => 0,
   45     'File::Copy'            => 0,
   46     'File::Find'            => 0,
   47     'File::Path'            => 0,
   48     'File::Spec'            => ($^O eq 'MSWin32' ? 3.30 : '0.82'), # rel2abs()
   49     'ExtUtils::CBuilder'    => 0.27, # major platform fixes
   50     'ExtUtils::Install'     => 0,
   51     'ExtUtils::Manifest'    => 0,
   52     'ExtUtils::Mkbootstrap' => 0,
   53     'ExtUtils::ParseXS'     => 2.21, # various bug fixes
   54     'Cwd'                   => 0,
   55     'Text::Abbrev'          => 0,
   56     'Text::ParseWords'      => 0,
   57     'Getopt::Long'          => 0,
   58     'TAP::Harness'          => 3.29,
   59     'CPAN::Meta'            => '2.142060',
   60     'Perl::OSType'          => ( $^O eq 'bitrig' ? 1.004 : 1 ), # needs 1.0 API
   61     'version'               => 0.87,  # No longer requires M::B
   62     'Module::Metadata'      => 1.000002, # uses version.pm
   63     'Pod::Man'              => 2.17, # utf8 support
   64   },
   65   test_requires         => {
   66     'File::Temp'            => 0.15,    # tmpdir() + fixes
   67     'Test::More'            => 0.49,
   68     'TAP::Harness'          => 3.29,    # TAP::Harness::Env
   69     'Parse::CPAN::Meta'     => '1.4401',
   70     'CPAN::Meta::YAML'      => 0.003,
   71   },
   72   recommends => {
   73     'ExtUtils::Install'  => 0.30,
   74     'ExtUtils::Manifest' => 1.54, # public maniskip()
   75   },
   76   recursive_test_files => 1,
   77   sign          => 0, 
   78   create_readme => 1,
   79   create_license => 1,
   80 
   81   # overwrite the M::B that shipped in core
   82   installdirs   => ($] >= 5.009004 && $] < 5.011 ? 'core' : 'site'),
   83 
   84   # Some CPANPLUS::Dist::Build versions need to allow mismatches
   85   # On logic: thanks to Module::Install, CPAN.pm must set both keys, but
   86   # CPANPLUS sets only the one
   87   allow_mb_mismatch => (
   88     $ENV{PERL5_CPANPLUS_IS_RUNNING} && ! $ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0
   89   ),
   90 
   91   auto_features => {
   92     dist_authoring => {
   93       description => "Create new distributions",
   94       requires => {
   95         'Archive::Tar'       => 1.09,
   96       },
   97       recommends => {
   98         'Pod::Readme'        => 0.04,
   99         'Module::Signature'  => 0.21,
  100       },
  101     },
  102     license_creation => {
  103       description => "Create licenses automatically in distributions",
  104       requires => {
  105         'Software::License'  => 0.103009
  106       },
  107     },
  108     PPM_support => {
  109       description => "Generate PPM files for distributions",
  110     },
  111     inc_bundling_support => {
  112       description => "Bundle Module::Build in inc/",
  113       requires    => {
  114         'inc::latest'           => 0.500, # split out from Module::Build
  115         'ExtUtils::Install'     => 1.54, # also gets us ExtUtils::Installed 1.999_001
  116         'ExtUtils::Installed'   => 1.999, # technically 1.999_001 is what's available
  117       },
  118     },
  119     manpage_support => {
  120       description => "Create Unix man pages",
  121       requires    => {'Pod::Man' => 0 },
  122     },
  123     HTML_support => {
  124       description => "Create HTML documentation",
  125       requires    => {'Pod::Html' => 0},
  126     },
  127   },
  128 
  129   add_to_cleanup => ['t/Sample/pod2htm*'],
  130   script_files   => ['bin/config_data'],
  131   meta_merge     => {
  132     resources => {
  133       MailingList => 'mailto:module-build@perl.org',
  134       repository  => 'https://github.com/Perl-Toolchain-Gang/Module-Build',
  135       IRC         => 'irc://irc.perl.org/#toolchain',
  136     }
  137   },
  138 );
  139 
  140 $build->create_build_script;
  141 if (-f "META.yml" && ! -f "MYMETA.yml") { # fallback if we don't have CPAN::Meta
  142   require File::Copy;
  143   File::Copy::copy("META.yml", "MYMETA.yml") or warn "Error: $!\n";
  144   if ( -f 'MYMETA.yml' ) {
  145     warn "Copied META.yml to MYMETA.yml for bootstrapping\n";
  146   }
  147   else {
  148     warn "Could not copy META.yml to MYMETA.yml.  That's odd!\n";
  149   }
  150 }
  151 
  152 # vim:ts=2:sw=2:et:sta