Add CFC CPAN prereqs, but avoid warning. Reversing the logic (adding then conditionally deleting rather than conditionally adding) means that the CPAN dist will generate a META.json with the proper prereqs.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8b7336af Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8b7336af Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8b7336af Branch: refs/heads/master Commit: 8b7336af94b42cceb9378c2334fed46d782df618 Parents: 8846ca4 Author: Marvin Humphrey <[email protected]> Authored: Tue Aug 12 17:53:44 2014 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Wed Aug 20 16:57:43 2014 -0700 ---------------------------------------------------------------------- runtime/perl/Build.PL | 8 ++++++-- runtime/perl/buildlib/Clownfish/Build.pm | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8b7336af/runtime/perl/Build.PL ---------------------------------------------------------------------- diff --git a/runtime/perl/Build.PL b/runtime/perl/Build.PL index 14cd1c9..6fef470 100644 --- a/runtime/perl/Build.PL +++ b/runtime/perl/Build.PL @@ -27,12 +27,16 @@ my $builder = Clownfish::Build->new( dist_version => '0.3.0', dist_abstract => 'Apache Clownfish Runtime', requires => { 'perl' => '5.8.3', }, - configure_requires => { 'Module::Build' => 0.280801 }, - build_requires => { + configure_requires => { + 'Module::Build' => 0.280801, + 'Clownfish::CFC::Perl::Build' => 0.003000, + }, + build_requires => { 'Module::Build' => 0.280801, 'ExtUtils::CBuilder' => 0.21, 'ExtUtils::ParseXS' => 2.18, 'Devel::PPPort' => 3.13, + 'Clownfish::CFC' => 0.003000, }, meta_merge => { keywords => [qw( clownfish )], }, meta_add => { http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8b7336af/runtime/perl/buildlib/Clownfish/Build.pm ---------------------------------------------------------------------- diff --git a/runtime/perl/buildlib/Clownfish/Build.pm b/runtime/perl/buildlib/Clownfish/Build.pm index 19d923f..3540e1b 100644 --- a/runtime/perl/buildlib/Clownfish/Build.pm +++ b/runtime/perl/buildlib/Clownfish/Build.pm @@ -67,8 +67,10 @@ sub new { include => [], # Don't use default includes. source => [ $CORE_SOURCE_DIR, $XS_SOURCE_DIR ], }; - $args{build_requires}{'Clownfish::CFC'} = '0.3.0' - if $IS_CPAN_DIST; + if (!$IS_CPAN_DIST) { + delete $args{build_requires}{'Clownfish::CFC'}; + delete $args{configure_requires}{'Clownfish::CFC::Perl::Build'}; + } my $self = $class->SUPER::new( recursive_test_files => 1, %args ); # Fix for MSVC: Although the generated XS should be C89-compliant, it
