1 |
commit: 1a3a8010c45d2e6d3ed6828898b0b2f04a02d65e |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 02:02:52 2018 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 02:03:09 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a3a8010 |
7 |
|
8 |
dev-perl/Weather-Com: Fix for '.' in @INC re bug #623148 |
9 |
|
10 |
- EAPI6ify |
11 |
- Fix tests for Perl 5.26+ without '.' in @INC |
12 |
- Disable Network IO unless DIST_TEST_OVERRIDE=~network |
13 |
- Add USE="examples" |
14 |
|
15 |
Bug: https://bugs.gentoo.org/623148 |
16 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
17 |
|
18 |
dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild | 33 +++++++++++ |
19 |
.../files/Weather-Com-2.0.0-dotinc.patch | 68 ++++++++++++++++++++++ |
20 |
.../files/Weather-Com-2.0.0-network.patch | 54 +++++++++++++++++ |
21 |
3 files changed, 155 insertions(+) |
22 |
|
23 |
diff --git a/dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild b/dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..ec884a815d5 |
26 |
--- /dev/null |
27 |
+++ b/dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild |
28 |
@@ -0,0 +1,33 @@ |
29 |
+# Copyright 1999-2018 Gentoo Foundation |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=6 |
33 |
+DIST_AUTHOR=BOBERNST |
34 |
+DIST_VERSION=2.0.0 |
35 |
+DIST_EXAMPLES=("samples/*") |
36 |
+inherit perl-module |
37 |
+ |
38 |
+DESCRIPTION='fetching weather information from weather.com' |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+IUSE="" |
42 |
+ |
43 |
+RDEPEND=" |
44 |
+ virtual/perl-Data-Dumper |
45 |
+ dev-perl/HTTP-Message |
46 |
+ dev-perl/libwww-perl |
47 |
+ virtual/perl-Locale-Maketext |
48 |
+ virtual/perl-Storable |
49 |
+ dev-perl/Test-MockObject |
50 |
+ >=dev-perl/Time-Format-1.0.0 |
51 |
+ virtual/perl-Time-Local |
52 |
+ dev-perl/URI |
53 |
+ dev-perl/XML-Simple |
54 |
+" |
55 |
+DEPEND="${RDEPEND} |
56 |
+ virtual/perl-ExtUtils-MakeMaker |
57 |
+" |
58 |
+PATCHES=( |
59 |
+ "${FILESDIR}/${PN}-2.0.0-dotinc.patch" |
60 |
+ "${FILESDIR}/${PN}-2.0.0-network.patch" |
61 |
+) |
62 |
|
63 |
diff --git a/dev-perl/Weather-Com/files/Weather-Com-2.0.0-dotinc.patch b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-dotinc.patch |
64 |
new file mode 100644 |
65 |
index 00000000000..e850732127e |
66 |
--- /dev/null |
67 |
+++ b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-dotinc.patch |
68 |
@@ -0,0 +1,68 @@ |
69 |
+From 8093cbf66931ef66aadf6e68d8132066c49a792f Mon Sep 17 00:00:00 2001 |
70 |
+From: Kent Fredric <kentnl@g.o> |
71 |
+Date: Wed, 21 Mar 2018 14:46:49 +1300 |
72 |
+Subject: Fix tests for '.' in @INC removal |
73 |
+ |
74 |
+Bug: https://bugs.gentoo.org/623148 |
75 |
+--- |
76 |
+ t/Base.t | 2 +- |
77 |
+ t/Cached.t | 2 +- |
78 |
+ t/OOInterface.t | 2 +- |
79 |
+ t/Simple.t | 2 +- |
80 |
+ 4 files changed, 4 insertions(+), 4 deletions(-) |
81 |
+ |
82 |
+diff --git a/t/Base.t b/t/Base.t |
83 |
+index 4085b6e..9669bc3 100644 |
84 |
+--- a/t/Base.t |
85 |
++++ b/t/Base.t |
86 |
+@@ -16,7 +16,7 @@ |
87 |
+ # |
88 |
+ no warnings; |
89 |
+ use Test::More tests => 6; |
90 |
+-require 't/TestData.pm'; |
91 |
++require './t/TestData.pm'; |
92 |
+ |
93 |
+ BEGIN { |
94 |
+ use_ok('Weather::Com::Base'); |
95 |
+diff --git a/t/Cached.t b/t/Cached.t |
96 |
+index 33aff23..7257374 100644 |
97 |
+--- a/t/Cached.t |
98 |
++++ b/t/Cached.t |
99 |
+@@ -16,7 +16,7 @@ |
100 |
+ # |
101 |
+ no warnings; |
102 |
+ use Test::More tests => 10; |
103 |
+-require 't/TestData.pm'; |
104 |
++require './t/TestData.pm'; |
105 |
+ |
106 |
+ BEGIN { |
107 |
+ use_ok('Weather::Com::Cached'); |
108 |
+diff --git a/t/OOInterface.t b/t/OOInterface.t |
109 |
+index 33d75a2..b20535e 100644 |
110 |
+--- a/t/OOInterface.t |
111 |
++++ b/t/OOInterface.t |
112 |
+@@ -15,7 +15,7 @@ |
113 |
+ # |
114 |
+ no warnings; |
115 |
+ use Test::More tests => 62; |
116 |
+-require 't/TestData.pm'; |
117 |
++require './t/TestData.pm'; |
118 |
+ |
119 |
+ BEGIN { |
120 |
+ use_ok('Weather::Com::Finder'); |
121 |
+diff --git a/t/Simple.t b/t/Simple.t |
122 |
+index b29c5bd..227383d 100644 |
123 |
+--- a/t/Simple.t |
124 |
++++ b/t/Simple.t |
125 |
+@@ -16,7 +16,7 @@ |
126 |
+ no warnings; |
127 |
+ use Data::Dumper; |
128 |
+ use Test::More tests => 2; |
129 |
+-require 't/TestData.pm'; |
130 |
++require './t/TestData.pm'; |
131 |
+ |
132 |
+ BEGIN { |
133 |
+ use_ok('Weather::Com::Simple'); |
134 |
+-- |
135 |
+2.16.2 |
136 |
+ |
137 |
|
138 |
diff --git a/dev-perl/Weather-Com/files/Weather-Com-2.0.0-network.patch b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-network.patch |
139 |
new file mode 100644 |
140 |
index 00000000000..b16a71f5ca9 |
141 |
--- /dev/null |
142 |
+++ b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-network.patch |
143 |
@@ -0,0 +1,54 @@ |
144 |
+From d1c3b3bc53f2ce1ceb99e634a2d62f573a539220 Mon Sep 17 00:00:00 2001 |
145 |
+From: Kent Fredric <kentnl@g.o> |
146 |
+Date: Wed, 21 Mar 2018 14:58:29 +1300 |
147 |
+Subject: Disable tests that require network IO when NO_NETWORK_TESTING set |
148 |
+ |
149 |
+--- |
150 |
+ t/OOInterface.t | 9 ++++++++- |
151 |
+ t/Simple.t | 9 ++++++++- |
152 |
+ 2 files changed, 16 insertions(+), 2 deletions(-) |
153 |
+ |
154 |
+diff --git a/t/OOInterface.t b/t/OOInterface.t |
155 |
+index b20535e..9591d93 100644 |
156 |
+--- a/t/OOInterface.t |
157 |
++++ b/t/OOInterface.t |
158 |
+@@ -14,7 +14,14 @@ |
159 |
+ # initialization |
160 |
+ # |
161 |
+ no warnings; |
162 |
+-use Test::More tests => 62; |
163 |
++BEGIN { |
164 |
++ if ( $ENV{NO_NETWORK_TESTING} ) { |
165 |
++ print "1..0 # SKIP NO_NETWORK_TESTING set"; |
166 |
++ exit 0; |
167 |
++ } |
168 |
++ require Test::More; |
169 |
++ Test::More->import( tests => 62 ); |
170 |
++} |
171 |
+ require './t/TestData.pm'; |
172 |
+ |
173 |
+ BEGIN { |
174 |
+diff --git a/t/Simple.t b/t/Simple.t |
175 |
+index 227383d..f4687ec 100644 |
176 |
+--- a/t/Simple.t |
177 |
++++ b/t/Simple.t |
178 |
+@@ -14,8 +14,15 @@ |
179 |
+ # initialization |
180 |
+ # |
181 |
+ no warnings; |
182 |
++BEGIN { |
183 |
++ if ( $ENV{NO_NETWORK_TESTING} ) { |
184 |
++ print "1..0 # SKIP NO_NETWORK_TESTING set"; |
185 |
++ exit 0; |
186 |
++ } |
187 |
++ require Test::More; |
188 |
++ Test::More->import( tests => 2 ); |
189 |
++} |
190 |
+ use Data::Dumper; |
191 |
+-use Test::More tests => 2; |
192 |
+ require './t/TestData.pm'; |
193 |
+ |
194 |
+ BEGIN { |
195 |
+-- |
196 |
+2.16.2 |
197 |
+ |