summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2018-03-21 15:02:52 +1300
committerKent Fredric <kentnl@gentoo.org>2018-03-21 15:03:09 +1300
commit1a3a8010c45d2e6d3ed6828898b0b2f04a02d65e (patch)
tree93d3640db3c15df356359a7f23382a52b12fb3e9
parentapp-editors/emacs-25.3-r4: hppa stable, bug 649910 (diff)
downloadgentoo-1a3a8010c45d2e6d3ed6828898b0b2f04a02d65e.tar.gz
gentoo-1a3a8010c45d2e6d3ed6828898b0b2f04a02d65e.tar.bz2
gentoo-1a3a8010c45d2e6d3ed6828898b0b2f04a02d65e.zip
dev-perl/Weather-Com: Fix for '.' in @INC re bug #623148
- EAPI6ify - Fix tests for Perl 5.26+ without '.' in @INC - Disable Network IO unless DIST_TEST_OVERRIDE=~network - Add USE="examples" Bug: https://bugs.gentoo.org/623148 Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r--dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild33
-rw-r--r--dev-perl/Weather-Com/files/Weather-Com-2.0.0-dotinc.patch68
-rw-r--r--dev-perl/Weather-Com/files/Weather-Com-2.0.0-network.patch54
3 files changed, 155 insertions, 0 deletions
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
new file mode 100644
index 000000000000..ec884a815d57
--- /dev/null
+++ b/dev-perl/Weather-Com/Weather-Com-2.0.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+DIST_AUTHOR=BOBERNST
+DIST_VERSION=2.0.0
+DIST_EXAMPLES=("samples/*")
+inherit perl-module
+
+DESCRIPTION='fetching weather information from weather.com'
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ virtual/perl-Data-Dumper
+ dev-perl/HTTP-Message
+ dev-perl/libwww-perl
+ virtual/perl-Locale-Maketext
+ virtual/perl-Storable
+ dev-perl/Test-MockObject
+ >=dev-perl/Time-Format-1.0.0
+ virtual/perl-Time-Local
+ dev-perl/URI
+ dev-perl/XML-Simple
+"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.0-dotinc.patch"
+ "${FILESDIR}/${PN}-2.0.0-network.patch"
+)
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
new file mode 100644
index 000000000000..e850732127e5
--- /dev/null
+++ b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-dotinc.patch
@@ -0,0 +1,68 @@
+From 8093cbf66931ef66aadf6e68d8132066c49a792f Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 21 Mar 2018 14:46:49 +1300
+Subject: Fix tests for '.' in @INC removal
+
+Bug: https://bugs.gentoo.org/623148
+---
+ t/Base.t | 2 +-
+ t/Cached.t | 2 +-
+ t/OOInterface.t | 2 +-
+ t/Simple.t | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/t/Base.t b/t/Base.t
+index 4085b6e..9669bc3 100644
+--- a/t/Base.t
++++ b/t/Base.t
+@@ -16,7 +16,7 @@
+ #
+ no warnings;
+ use Test::More tests => 6;
+-require 't/TestData.pm';
++require './t/TestData.pm';
+
+ BEGIN {
+ use_ok('Weather::Com::Base');
+diff --git a/t/Cached.t b/t/Cached.t
+index 33aff23..7257374 100644
+--- a/t/Cached.t
++++ b/t/Cached.t
+@@ -16,7 +16,7 @@
+ #
+ no warnings;
+ use Test::More tests => 10;
+-require 't/TestData.pm';
++require './t/TestData.pm';
+
+ BEGIN {
+ use_ok('Weather::Com::Cached');
+diff --git a/t/OOInterface.t b/t/OOInterface.t
+index 33d75a2..b20535e 100644
+--- a/t/OOInterface.t
++++ b/t/OOInterface.t
+@@ -15,7 +15,7 @@
+ #
+ no warnings;
+ use Test::More tests => 62;
+-require 't/TestData.pm';
++require './t/TestData.pm';
+
+ BEGIN {
+ use_ok('Weather::Com::Finder');
+diff --git a/t/Simple.t b/t/Simple.t
+index b29c5bd..227383d 100644
+--- a/t/Simple.t
++++ b/t/Simple.t
+@@ -16,7 +16,7 @@
+ no warnings;
+ use Data::Dumper;
+ use Test::More tests => 2;
+-require 't/TestData.pm';
++require './t/TestData.pm';
+
+ BEGIN {
+ use_ok('Weather::Com::Simple');
+--
+2.16.2
+
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
new file mode 100644
index 000000000000..b16a71f5ca9e
--- /dev/null
+++ b/dev-perl/Weather-Com/files/Weather-Com-2.0.0-network.patch
@@ -0,0 +1,54 @@
+From d1c3b3bc53f2ce1ceb99e634a2d62f573a539220 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 21 Mar 2018 14:58:29 +1300
+Subject: Disable tests that require network IO when NO_NETWORK_TESTING set
+
+---
+ t/OOInterface.t | 9 ++++++++-
+ t/Simple.t | 9 ++++++++-
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/t/OOInterface.t b/t/OOInterface.t
+index b20535e..9591d93 100644
+--- a/t/OOInterface.t
++++ b/t/OOInterface.t
+@@ -14,7 +14,14 @@
+ # initialization
+ #
+ no warnings;
+-use Test::More tests => 62;
++BEGIN {
++ if ( $ENV{NO_NETWORK_TESTING} ) {
++ print "1..0 # SKIP NO_NETWORK_TESTING set";
++ exit 0;
++ }
++ require Test::More;
++ Test::More->import( tests => 62 );
++}
+ require './t/TestData.pm';
+
+ BEGIN {
+diff --git a/t/Simple.t b/t/Simple.t
+index 227383d..f4687ec 100644
+--- a/t/Simple.t
++++ b/t/Simple.t
+@@ -14,8 +14,15 @@
+ # initialization
+ #
+ no warnings;
++BEGIN {
++ if ( $ENV{NO_NETWORK_TESTING} ) {
++ print "1..0 # SKIP NO_NETWORK_TESTING set";
++ exit 0;
++ }
++ require Test::More;
++ Test::More->import( tests => 2 );
++}
+ use Data::Dumper;
+-use Test::More tests => 2;
+ require './t/TestData.pm';
+
+ BEGIN {
+--
+2.16.2
+