diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-perl/Feed-Find | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-perl/Feed-Find')
-rw-r--r-- | dev-perl/Feed-Find/Feed-Find-0.70.0-r3.ebuild | 61 | ||||
-rw-r--r-- | dev-perl/Feed-Find/Manifest | 3 | ||||
-rw-r--r-- | dev-perl/Feed-Find/files/Feed-Find-0.07-local-network.patch | 109 | ||||
-rw-r--r-- | dev-perl/Feed-Find/files/Feed-Find-0.07-no-dot-inc.patch | 21 |
4 files changed, 194 insertions, 0 deletions
diff --git a/dev-perl/Feed-Find/Feed-Find-0.70.0-r3.ebuild b/dev-perl/Feed-Find/Feed-Find-0.70.0-r3.ebuild new file mode 100644 index 000000000000..3e1c6d265b59 --- /dev/null +++ b/dev-perl/Feed-Find/Feed-Find-0.70.0-r3.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR=BTROTT +DIST_VERSION=0.07 +inherit perl-module + +DESCRIPTION="Syndication feed auto-discovery" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-perl/Class-ErrorHandler + dev-perl/HTML-Parser + dev-perl/libwww-perl + dev-perl/URI +" +BDEPEND="${RDEPEND} + test? ( + dev-perl/Test-Base + dev-perl/CGI-Application-Server + dev-perl/Test-HTTP-Server-Simple + ) +" +PATCHES=( + "${FILESDIR}/${PN}-0.07-no-dot-inc.patch" + "${FILESDIR}/${PN}-0.07-local-network.patch" +) +PERL_RM_FILES=( + inc/Spiffy.pm + inc/Test/Base.pm + inc/Test/Base/Filter.pm + inc/Test/Builder.pm + inc/Test/Builder/Module.pm + inc/Test/More.pm +) +src_test() { + local MODULES=( + "Feed::Find ${DIST_VERSION}" + ) + local failed=() + for dep in "${MODULES[@]}"; do + ebegin "Compile testing ${dep}" + perl -Mblib="${S}" -M"${dep} ()" -e1 + eend $? || failed+=( "$dep" ) + done + if [[ ${failed[@]} ]]; then + echo + eerror "One or more modules failed compile:"; + for dep in "${failed[@]}"; do + eerror " ${dep}" + done + die "Failing due to module compilation errors"; + fi + perl-module_src_test +} diff --git a/dev-perl/Feed-Find/Manifest b/dev-perl/Feed-Find/Manifest index 4cbd2f98e6b5..76b660761326 100644 --- a/dev-perl/Feed-Find/Manifest +++ b/dev-perl/Feed-Find/Manifest @@ -1,3 +1,6 @@ +AUX Feed-Find-0.07-local-network.patch 3155 BLAKE2B 270f07393e073584d7a320b3fb5d8505b5f2cb2e473760c7b1b674e130a4697e935c8e45f40c4f7446f37e05373102007a0612fc1cfa8d879f098bbf204712fd SHA512 468d041b0a36e64cb5e799686919409a39e9dd61c67a2108b450e7443ac6ba5daa09b0582fa8ed93b1024bcd5143fda0f43e6eded2eb759358530c4f3ec8d62b +AUX Feed-Find-0.07-no-dot-inc.patch 473 BLAKE2B fa2bdd11f5c679a8b22d2a03b5033ae29ebd881eac6dce8b82e6c27e50b80b211f60163bba7470357929f48df02e7aecc67c3c8d875d2fed9b15969676e51bfc SHA512 8b82d2e76db3eed8b455765e26d5b1ff09ca27f582b4a7512814ac244e38b8434e42cdbc5967b866bf73bf492758e51ee7020cef948cacbe781c11a4c8413727 DIST Feed-Find-0.07.tar.gz 46380 BLAKE2B 9e2c7e446801decaf0f59cd1399b3a92195fbc174b3e65188367416167c9bf188402d7d995673602492cb0fe4c473dfd21848b7d00956d4f0ee66ccc037bccb2 SHA512 5ae62c0d5380d00bfae9f94d1d9ab7d024f3394ca7865d7a086668d84b0e4dfb18095468b966f7afd03f3b766f02822e9b19cfddf0f95ad7c0c3908e5a5806e9 EBUILD Feed-Find-0.70.0-r2.ebuild 1261 BLAKE2B 83dca1a1c14b4969b92ada521c220a0eb3f63e285f82697db2d2519d9f3aad12a24eba4d471728bdb5df2dd61695b4df7e0be69a2758b4f16a1e225e692ef48e SHA512 f69d7bf033e5afc9235d3c8e79f08b6bfa35d776b820f558d8fdfa684cb5fb02236efbada08d8bf8217292e97691a764350cbb38135266206852fb35540c1d3c +EBUILD Feed-Find-0.70.0-r3.ebuild 1204 BLAKE2B fc2f731d33097d6ac8fa5b22da7b43a3b519cac01a0764a069a9e58014865702fe701c0c181b161018b29a253a43e08c0819f6efa6857131c016f563e5342f19 SHA512 a3d68234929c2caff94360b1d375d51b72bd86a162c4ce4527eb55ab7fe120b3781d7feba66d9171d10667aca5d2a56864fdf13b1ee97c4a0c75fc0a2fa73102 MISC metadata.xml 390 BLAKE2B e0cc1521640b036ad04a52fcaf1e6c535da90ba2ac13c2cd0070e90c91f4f96e6cb6b3d319ea5e76d59bf68dc93d026b633c1fa5e6d8d50466409e8fefa094b7 SHA512 a497ea9db6857ac4c0363b9f6c9b57b81461a245db57ad238232616dfc4fc0c5b2dd480a422e3c06f298a07c7e69a7d4e81ff28fd303e4d210af01c3eb36f919 diff --git a/dev-perl/Feed-Find/files/Feed-Find-0.07-local-network.patch b/dev-perl/Feed-Find/files/Feed-Find-0.07-local-network.patch new file mode 100644 index 000000000000..4cf8f567547a --- /dev/null +++ b/dev-perl/Feed-Find/files/Feed-Find-0.07-local-network.patch @@ -0,0 +1,109 @@ +From bea092aae37300053b971a12b6e37b6104df41f9 Mon Sep 17 00:00:00 2001 +From: Nikolay Mishin <mi@ya.ru> +Date: Thu, 22 Oct 2015 02:59:04 +0400 +Subject: Rework 01-find.t + +Rework test to not rely on external web resources by mocking the setup +with a HTTP::Server::Simple derived webserver + +Bug: https://github.com/btrott/Feed-Find/pull/2 +Signed-off-by: Gary Greene <greeneg@tolharadys.net> +Signed-off-by: Kent Fredric <kentnl@gentoo.org> +--- + t/01-find.t | 57 ++++++++++++++++++++++++++++++++------ + t/htdocs/anchors-only.html | 9 ++++++ + 2 files changed, 58 insertions(+), 8 deletions(-) + create mode 100644 t/htdocs/anchors-only.html + +diff --git a/t/01-find.t b/t/01-find.t +index 58549b5..22d0048 100644 +--- a/t/01-find.t ++++ b/t/01-find.t +@@ -1,20 +1,61 @@ ++use CGI::Application::Server; ++use Test::HTTP::Server::Simple; ++ ++package My::WebServer { ++ use base qw/Test::HTTP::Server::Simple CGI::Application::Server/; ++} ++ ++package main; ++ + use strict; +-use Test::More tests => 4; ++use Test::More tests => 5; + use Feed::Find; + use LWP::UserAgent; + +-use constant BASE => 'http://stupidfool.org/perl/feeds/'; ++my $port = $ENV{CGI_APP_SERVER_TEST_PORT} || 40000 + int(rand(10000)); ++ ++my $s = My::WebServer->new($port); ++$s->document_root('./t/htdocs'); ++ ++my $url_root = $s->started_ok("start up my web server"); ++ ++# generate our anchors-only.html file to get the URL correct in the links ++my $anchor_html = <<"END"; ++<html> ++ <head> ++ <link rel="alternate" title="my feed" ++ href="$url_root/ok.xml" type="application/xml" /> ++ <head> ++ <body> ++ <a href="$url_root/ok.xml" type="application/xml">my feed</a> ++ </body> ++</html> ++END + +-my(@feeds); ++open(my $fh, ">./t/htdocs/anchors-only.html") or ++ die "Cannot open file\n"; ++print $fh <<"END"; ++<html> ++ <head> ++ <link rel="alternate" title="my feed" ++ href="$url_root/ok.xml" type="application/xml" /> ++ <head> ++ <body> ++ <a href="$url_root/ok.xml" type="application/xml">my feed</a> ++ </body> ++</html> ++END ++close $fh; + +-@feeds = Feed::Find->find(BASE . 'anchors-only.html'); ++my @feeds = (); ++@feeds = Feed::Find->find("$url_root/anchors-only.html"); + is(scalar @feeds, 1); +-is($feeds[0], BASE . 'ok.xml'); ++is($feeds[0], "$url_root/ok.xml"); + + my $ua = LWP::UserAgent->new; + $ua->env_proxy; +-my $req = HTTP::Request->new(GET => BASE . 'anchors-only.html'); ++my $req = HTTP::Request->new(GET => "$url_root/anchors-only.html"); + my $res = $ua->request($req); +-@feeds = Feed::Find->find_in_html(\$res->content, BASE . 'anchors-only.html'); ++@feeds = Feed::Find->find_in_html(\$res->content, "$url_root/anchors-only.html"); + is(scalar @feeds, 1); +-is($feeds[0], BASE . 'ok.xml'); ++is($feeds[0], "$url_root/ok.xml"); +diff --git a/t/htdocs/anchors-only.html b/t/htdocs/anchors-only.html +new file mode 100644 +index 0000000..79f1df8 +--- /dev/null ++++ b/t/htdocs/anchors-only.html +@@ -0,0 +1,9 @@ ++<html> ++ <head> ++ <link rel="alternate" title="my feed" ++ href="http://localhost:45578/ok.xml" type="application/xml" /> ++ <head> ++ <body> ++ <a href="http://localhost:45578/ok.xml" type="application/xml">my feed</a> ++ </body> ++</html> +-- +2.28.0 + diff --git a/dev-perl/Feed-Find/files/Feed-Find-0.07-no-dot-inc.patch b/dev-perl/Feed-Find/files/Feed-Find-0.07-no-dot-inc.patch new file mode 100644 index 000000000000..ae60d0f1f7b1 --- /dev/null +++ b/dev-perl/Feed-Find/files/Feed-Find-0.07-no-dot-inc.patch @@ -0,0 +1,21 @@ +From b624dda904b26792464697a1c5e7b210be410eff Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Fri, 21 Aug 2020 21:06:23 +1200 +Subject: Include '.' in @INC for perl 5.26+ + +--- + Makefile.PL | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.PL b/Makefile.PL +index 64e091c..34b5c67 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -1,3 +1,4 @@ ++use lib q[.]; + use inc::Module::Install; + name 'Feed-Find'; + all_from 'lib/Feed/Find.pm'; +-- +2.28.0 + |