1 |
commit: 6370e4ba36a89ff234d08525b10f9aabeff48d7d |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 6 23:57:53 2017 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 6 23:57:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6370e4ba |
7 |
|
8 |
dev-perl/ORLite-Migrate: Fix '.' in @INC test failures |
9 |
|
10 |
- Fix tests failing on Perl 5.26 exposed by fixing Makefile.PL |
11 |
- Disable parallel testing, due to database concurrent access |
12 |
- Migate Makefile.PL fix to patch |
13 |
|
14 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
15 |
|
16 |
.../ORLite-Migrate-1.100.0-r1.ebuild | 8 +- |
17 |
.../files/ORLite-Migrate-1.10-dot-in-inc.patch | 85 ++++++++++++++++++++++ |
18 |
2 files changed, 87 insertions(+), 6 deletions(-) |
19 |
|
20 |
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 |
21 |
index 126b10627a6..e3f8e6b4d52 100644 |
22 |
--- a/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild |
23 |
+++ b/dev-perl/ORLite-Migrate/ORLite-Migrate-1.100.0-r1.ebuild |
24 |
@@ -27,9 +27,5 @@ RDEPEND=" |
25 |
" |
26 |
DEPEND="${RDEPEND} |
27 |
" |
28 |
- |
29 |
-src_prepare() { |
30 |
- sed -i -e 's/use inc::Module::Install::DSL/use lib q[.];\nuse inc::Module::Install::DSL/' Makefile.PL || |
31 |
- die "Can't patch Makefile.PL for 5.26 dot-in-inc" |
32 |
- perl-module_src_prepare |
33 |
-} |
34 |
+PATCHES=("${FILESDIR}/${PN}-1.10-dot-in-inc.patch") |
35 |
+DIST_TEST="do" # Parallel tests broken, concurrent DB access |
36 |
|
37 |
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 |
38 |
new file mode 100644 |
39 |
index 00000000000..239239941d5 |
40 |
--- /dev/null |
41 |
+++ b/dev-perl/ORLite-Migrate/files/ORLite-Migrate-1.10-dot-in-inc.patch |
42 |
@@ -0,0 +1,85 @@ |
43 |
+From 4527c099a60d6e78e730c4aea51f55c74f95119d Mon Sep 17 00:00:00 2001 |
44 |
+From: Kent Fredric <kentfredric@×××××.com> |
45 |
+Date: Fri, 7 Jul 2017 11:52:55 +1200 |
46 |
+Subject: [PATCH] Fix for '.' build and test failures |
47 |
+ |
48 |
+Bug: https://rt.cpan.org/Ticket/Display.html?id=121741 |
49 |
+--- |
50 |
+ Makefile.PL | 1 + |
51 |
+ t/02_main.t | 2 +- |
52 |
+ t/03_trivial.t | 2 +- |
53 |
+ t/04_class.t | 12 ++++++++---- |
54 |
+ 4 files changed, 11 insertions(+), 6 deletions(-) |
55 |
+ |
56 |
+diff --git a/Makefile.PL b/Makefile.PL |
57 |
+index a5b1f8f..1961b17 100644 |
58 |
+--- a/Makefile.PL |
59 |
++++ b/Makefile.PL |
60 |
+@@ -1,3 +1,4 @@ |
61 |
++use lib '.'; |
62 |
+ use inc::Module::Install::DSL 1.04; |
63 |
+ |
64 |
+ all_from lib/ORLite/Migrate.pm |
65 |
+diff --git a/t/02_main.t b/t/02_main.t |
66 |
+index c895f11..ba93eaa 100644 |
67 |
+--- a/t/02_main.t |
68 |
++++ b/t/02_main.t |
69 |
+@@ -8,7 +8,7 @@ BEGIN { |
70 |
+ use Test::More tests => 5; |
71 |
+ use File::Spec::Functions ':ALL'; |
72 |
+ use ORLite::Migrate (); |
73 |
+-use t::lib::Test; |
74 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import } |
75 |
+ |
76 |
+ # Check for migration patches |
77 |
+ my $timeline = catdir( 't', 'data', 'trivial' ); |
78 |
+diff --git a/t/03_trivial.t b/t/03_trivial.t |
79 |
+index 63ab9d0..32efa07 100644 |
80 |
+--- a/t/03_trivial.t |
81 |
++++ b/t/03_trivial.t |
82 |
+@@ -7,7 +7,7 @@ BEGIN { |
83 |
+ |
84 |
+ use Test::More tests => 4; |
85 |
+ use File::Spec::Functions ':ALL'; |
86 |
+-use t::lib::Test; |
87 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import } |
88 |
+ |
89 |
+ # Check for migration patches |
90 |
+ my $timeline = catdir( 't', 'data', 'trivial' ); |
91 |
+diff --git a/t/04_class.t b/t/04_class.t |
92 |
+index 3f33baf..591f3d9 100644 |
93 |
+--- a/t/04_class.t |
94 |
++++ b/t/04_class.t |
95 |
+@@ -8,8 +8,8 @@ BEGIN { |
96 |
+ use Test::More tests => 4; |
97 |
+ use File::Spec::Functions ':ALL'; |
98 |
+ use ORLite::Migrate::Timeline (); |
99 |
+-use t::lib::Test; |
100 |
+-use t::lib::MyTimeline; |
101 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import } |
102 |
++BEGIN { require "./t/lib/MyTimeline.pm"; t::lib::Test->import; $INC{"t/lib/MyTimeline.pm"} = "1" } |
103 |
+ |
104 |
+ # Set up the file |
105 |
+ my $file = test_db(); |
106 |
+@@ -19,12 +19,16 @@ eval <<"END_PERL"; die $@ if $@; |
107 |
+ package Foo::Bar; |
108 |
+ |
109 |
+ use strict; |
110 |
+-use ORLite::Migrate { |
111 |
++BEGIN { |
112 |
++ require ORLite::Migrate; |
113 |
++ \@INC=('.', \@INC ); |
114 |
++ ORLite::Migrate->import({ |
115 |
+ file => '$file', |
116 |
+ timeline => 't::lib::MyTimeline', |
117 |
+ user_version => 3, |
118 |
+ prune => 1, |
119 |
+-}; |
120 |
++ }); |
121 |
++} |
122 |
+ |
123 |
+ 1; |
124 |
+ END_PERL |
125 |
+-- |
126 |
+2.13.1 |
127 |
+ |