From d60937484ba402b3888087e0d177778766aa765b Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Apr 08 2023 11:15:08 +0000 Subject: Tweak regex to fix FTfunds.pm https://github.com/finance-quote/finance-quote/pull/262 --- diff --git a/Finance-Quote-1.54-FTfunds.patch b/Finance-Quote-1.54-FTfunds.patch new file mode 100644 index 0000000..811aba9 --- /dev/null +++ b/Finance-Quote-1.54-FTfunds.patch @@ -0,0 +1,19 @@ +commit 504fcc1ae35fd9c1e59949281e2939bda6a971a5 +Author: Paul Howarth +Date: Sat Apr 8 11:48:20 2023 +0100 + + Tweak regex to fix FTfunds.pm + +diff --git a/lib/Finance/Quote/FTfunds.pm b/lib/Finance/Quote/FTfunds.pm +index b113313..45b04ed 100644 +--- a/lib/Finance/Quote/FTfunds.pm ++++ b/lib/Finance/Quote/FTfunds.pm +@@ -182,7 +182,7 @@ DEBUG > 1 and print "\nCookie Jar = : \n",Dumper($cj),"\n\n"; + my $currency; + my $price; + if ($webdoc->content =~ +- m[Price [(]([A-Z]{3})[)]([\.\,0-9]*)] ) ++ m[]*>Price [(]([A-Z]{3})[)]([\.\,0-9]*)] ) + { + $currency = $1; + $price = $2; diff --git a/perl-Finance-Quote.spec b/perl-Finance-Quote.spec index 064f4ac..cc2d207 100644 --- a/perl-Finance-Quote.spec +++ b/perl-Finance-Quote.spec @@ -4,11 +4,12 @@ Name: perl-Finance-Quote Version: %{RPM_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Perl module that retrieves stock and mutual fund quotes License: GPL-2.0-or-later URL: https://metacpan.org/release/Finance-Quote Source0: https://cpan.metacpan.org/modules/by-module/Finance/Finance-Quote-%{module_version}.tar.gz +Patch0: Finance-Quote-1.54-FTfunds.patch BuildArch: noarch # Module Build BuildRequires: coreutils @@ -69,7 +70,7 @@ BuildRequires: perl(feature) BuildRequires: perl(File::Spec) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod::Coverage) -# Runtime +# Dependencies Requires: perl(LWP::Protocol::https) %description @@ -79,6 +80,10 @@ using various source. %prep %setup -q -n Finance-Quote-%{module_version} +# Tweak regex to fix FTfunds.pm +# https://github.com/finance-quote/finance-quote/pull/262 +%patch -P 0 -p 1 + # Remove redundant exec permissions find lib/ -type f -name '*.pm' -exec chmod -c -x {} \; @@ -155,6 +160,10 @@ make test %{_mandir}/man3/Finance::Quote::ZA.3* %changelog +* Sat Apr 8 2023 Paul Howarth - 1.5400-3 +- Tweak regex to fix FTfunds.pm + https://github.com/finance-quote/finance-quote/pull/262 + * Fri Jan 20 2023 Fedora Release Engineering - 1.5400-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild