diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-03-27 15:56:14 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-03-27 17:18:19 +0200 |
commit | 15daaf123635c1e734dfe6e3aed60f52df0364ce (patch) | |
tree | c4823e177859f5b69a68017635bbd29491ceec90 /Makefile.PL | |
parent | 08c0187b591bb1bb4248382a8106a450c9b359e3 (diff) | |
download | bugzilla-15daaf123635c1e734dfe6e3aed60f52df0364ce.tar.gz bugzilla-15daaf123635c1e734dfe6e3aed60f52df0364ce.tar.xz |
Bug 1350466 - Uplift bug 1342832 to bmo for performance and other reasons
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/Makefile.PL b/Makefile.PL index f9054cc21..59ed8f2cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,7 +15,14 @@ use 5.10.1; use strict; use warnings; -use lib qw(. lib local/lib/perl5); + +use File::Basename; +use File::Spec; +BEGIN { + require lib; + my $dir = File::Spec->rel2abs(dirname(__FILE__)); + lib->import($dir, File::Spec->catdir($dir, "lib"), File::Spec->catdir($dir, qw(local lib perl5))); +} use ExtUtils::MakeMaker 6.55; use constant BUGZILLA_VERSION => $ENV{BUGZILLA_VERSION} // 42; @@ -29,28 +36,6 @@ BEGIN { } } -# META.json and META.yml exist only for the benefit of older -# installs where cpanm can't get the optional features out of Makefile.PL -# Unfortunately having META.json and META.yml commited to the repo is weird -# and MakeMaker always prefers their content to the internal data (unless CPAN::META -# is not installed). -# Since we (Bugzilla) require this cludge, we hide the files from MakeMaker. -BEGIN { - warn "Hiding META.{json,yml} from MakeMaker...\n"; - rename( 'META.json', 'META.json.hide' ) || unlink("META.json"); - rename( 'META.yml', 'META.yml.hide' ) || unlink("META.yml"); - - if (!eval { ExtUtils::MakeMaker->VERSION('6.57_07') }) { - warn "WARNING: ExtUtils::MakeMaker should be at least 6.57_07 in order to support updating META.json files\n"; - } -} - -END { - warn "Unhiding META.{json,yml}...\n"; - rename( 'META.json.hide', 'META.json' ); - rename( 'META.yml.hide', 'META.yml' ); -} - # PREREQ_PM my %requires = ( 'CGI' => '<= 3.63', |