Repository: lucy-clownfish Updated Branches: refs/heads/0.4 414832f34 -> 0a905080e
Make sure that CFC prereqs appear in CPAN META files Never delete CFC prereqs from Module::Build args. Avoid warnings about missing prereqs by adding '../../compiler/perl/lib' to @INC permanently. Don't modify @INC when building from a CPAN dist. Fixes CLOWNFISH-69. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f93c813d Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f93c813d Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f93c813d Branch: refs/heads/0.4 Commit: f93c813dc8788bb2279b53959eb25a10866e2734 Parents: 414832f Author: Nick Wellnhofer <[email protected]> Authored: Thu Jan 21 17:07:08 2016 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Thu Jan 21 17:07:08 2016 +0100 ---------------------------------------------------------------------- runtime/perl/buildlib/Clownfish/Build.pm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f93c813d/runtime/perl/buildlib/Clownfish/Build.pm ---------------------------------------------------------------------- diff --git a/runtime/perl/buildlib/Clownfish/Build.pm b/runtime/perl/buildlib/Clownfish/Build.pm index a76fe41..4ce5107 100644 --- a/runtime/perl/buildlib/Clownfish/Build.pm +++ b/runtime/perl/buildlib/Clownfish/Build.pm @@ -16,20 +16,25 @@ use strict; use warnings; -use lib '../../compiler/perl/blib/arch'; -use lib '../../compiler/perl/blib/lib'; - package Clownfish::Build; -# We want to subclass Clownfish::CFC::Perl::Build, but CFC might not be built -# yet. So we look in 'clownfish/compiler/perl/lib' directly and cleanup @INC -# afterwards. -use lib '../../compiler/perl/lib'; +my $IS_CPAN_DIST; + +BEGIN { + $IS_CPAN_DIST = -e 'core'; + + if (!$IS_CPAN_DIST) { + unshift @INC, + '../../compiler/perl/blib/lib', + '../../compiler/perl/blib/arch', + '../../compiler/perl/lib'; # blib dir might not exist yet. + } +} + use base qw( Clownfish::CFC::Perl::Build Clownfish::CFC::Perl::Build::Charmonic ); -no lib '../../compiler/perl/lib'; our $VERSION = '0.004003'; $VERSION = eval $VERSION; @@ -51,7 +56,6 @@ my $XS_SOURCE_DIR = 'xs'; my $CFC_BUILD = catfile( $CFC_DIR, 'Build' ); my $LIB_DIR = 'lib'; my $CHARMONIZER_C; -my $IS_CPAN_DIST = !@BASE_PATH; if ($IS_CPAN_DIST) { $CHARMONIZER_C = 'charmonizer.c'; } @@ -67,10 +71,6 @@ sub new { include => [], # Don't use default includes. source => [ $CORE_SOURCE_DIR, $XS_SOURCE_DIR ], }; - 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
