commit:     6370e4ba36a89ff234d08525b10f9aabeff48d7d
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  6 23:57:53 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Thu Jul  6 23:57:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6370e4ba

dev-perl/ORLite-Migrate: Fix '.' in @INC test failures

- Fix tests failing on Perl 5.26 exposed by fixing Makefile.PL
- Disable parallel testing, due to database concurrent access
- Migate Makefile.PL fix to patch

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../ORLite-Migrate-1.100.0-r1.ebuild               |  8 +-
 .../files/ORLite-Migrate-1.10-dot-in-inc.patch     | 85 ++++++++++++++++++++++
 2 files changed, 87 insertions(+), 6 deletions(-)

diff --git a/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild 
b/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild
index 126b10627a6..e3f8e6b4d52 100644
--- a/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild
+++ b/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild
@@ -27,9 +27,5 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}
 "
-
-src_prepare() {
-       sed -i -e 's/use inc::Module::Install::DSL/use lib q[.];\nuse 
inc::Module::Install::DSL/' Makefile.PL ||
-               die "Can't patch Makefile.PL for 5.26 dot-in-inc"
-       perl-module_src_prepare
-}
+PATCHES=("${FILESDIR}/${PN}-1.10-dot-in-inc.patch")
+DIST_TEST="do" # Parallel tests broken, concurrent DB access

diff --git a/dev-perl/ORLite-Migrate/files/ORLite-Migrate-1.10-dot-in-inc.patch 
b/dev-perl/ORLite-Migrate/files/ORLite-Migrate-1.10-dot-in-inc.patch
new file mode 100644
index 00000000000..239239941d5
--- /dev/null
+++ b/dev-perl/ORLite-Migrate/files/ORLite-Migrate-1.10-dot-in-inc.patch
@@ -0,0 +1,85 @@
+From 4527c099a60d6e78e730c4aea51f55c74f95119d Mon Sep 17 00:00:00 2001
+From: Kent Fredric <[email protected]>
+Date: Fri, 7 Jul 2017 11:52:55 +1200
+Subject: [PATCH] Fix for '.' build and test failures
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=121741
+---
+ Makefile.PL    |  1 +
+ t/02_main.t    |  2 +-
+ t/03_trivial.t |  2 +-
+ t/04_class.t   | 12 ++++++++----
+ 4 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index a5b1f8f..1961b17 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,3 +1,4 @@
++use lib '.';
+ use inc::Module::Install::DSL 1.04;
+ 
+ all_from      lib/ORLite/Migrate.pm
+diff --git a/t/02_main.t b/t/02_main.t
+index c895f11..ba93eaa 100644
+--- a/t/02_main.t
++++ b/t/02_main.t
+@@ -8,7 +8,7 @@ BEGIN {
+ use Test::More tests => 5;
+ use File::Spec::Functions ':ALL';
+ use ORLite::Migrate ();
+-use t::lib::Test;
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import }
+ 
+ # Check for migration patches
+ my $timeline = catdir( 't', 'data', 'trivial' );
+diff --git a/t/03_trivial.t b/t/03_trivial.t
+index 63ab9d0..32efa07 100644
+--- a/t/03_trivial.t
++++ b/t/03_trivial.t
+@@ -7,7 +7,7 @@ BEGIN {
+ 
+ use Test::More tests => 4;
+ use File::Spec::Functions ':ALL';
+-use t::lib::Test;
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import }
+ 
+ # Check for migration patches
+ my $timeline = catdir( 't', 'data', 'trivial' );
+diff --git a/t/04_class.t b/t/04_class.t
+index 3f33baf..591f3d9 100644
+--- a/t/04_class.t
++++ b/t/04_class.t
+@@ -8,8 +8,8 @@ BEGIN {
+ use Test::More tests => 4;
+ use File::Spec::Functions ':ALL';
+ use ORLite::Migrate::Timeline ();
+-use t::lib::Test;
+-use t::lib::MyTimeline;
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import }
++BEGIN { require "./t/lib/MyTimeline.pm"; t::lib::Test->import; 
$INC{"t/lib/MyTimeline.pm"} = "1" }
+ 
+ # Set up the file
+ my $file = test_db();
+@@ -19,12 +19,16 @@ eval <<"END_PERL"; die $@ if $@;
+ package Foo::Bar;
+ 
+ use strict;
+-use ORLite::Migrate {
++BEGIN {
++  require ORLite::Migrate;
++  \@INC=('.', \@INC );
++  ORLite::Migrate->import({
+       file         => '$file',
+       timeline     => 't::lib::MyTimeline',
+       user_version => 3,
+       prune        => 1,
+-};
++  });
++}
+ 
+ 1;
+ END_PERL
+-- 
+2.13.1
+

Reply via email to