From 15daaf123635c1e734dfe6e3aed60f52df0364ce Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 27 Mar 2017 09:56:14 -0400 Subject: Bug 1350466 - Uplift bug 1342832 to bmo for performance and other reasons --- Makefile.PL | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'Makefile.PL') 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', -- cgit v1.2.3-24-g4f1b