summaryrefslogtreecommitdiff
path: root/finance
diff options
context:
space:
mode:
authorobache <obache>2011-02-26 05:39:45 +0000
committerobache <obache>2011-02-26 05:39:45 +0000
commitfbb1709fc21104798b2ff5b231a31019a1058412 (patch)
tree970fa893015238e0c70845c68be068e78af79f19 /finance
parentcb6c5421787442745f6e822657c484b23aa48a8e (diff)
downloadpkgsrc-fbb1709fc21104798b2ff5b231a31019a1058412.tar.gz
Add an patch for changed page structure.
PR#44623 by Marko Schuetz Schmuck. Bump PKGREVISION. While here, set LICENSE=gnu-gpl-v2 (or later).
Diffstat (limited to 'finance')
-rw-r--r--finance/p5-Finance-Quote/Makefile9
-rw-r--r--finance/p5-Finance-Quote/distinfo3
-rw-r--r--finance/p5-Finance-Quote/patches/patch-lib_Finance_Quote_VWD.pm52
3 files changed, 61 insertions, 3 deletions
diff --git a/finance/p5-Finance-Quote/Makefile b/finance/p5-Finance-Quote/Makefile
index a26b369ffa8..8e87fe97644 100644
--- a/finance/p5-Finance-Quote/Makefile
+++ b/finance/p5-Finance-Quote/Makefile
@@ -1,14 +1,15 @@
-# $NetBSD: Makefile,v 1.14 2010/08/21 16:34:52 seb Exp $
+# $NetBSD: Makefile,v 1.15 2011/02/26 05:39:45 obache Exp $
DISTNAME= Finance-Quote-1.17
PKGNAME= p5-${DISTNAME}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= finance perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Finance/}
MAINTAINER= damon@brodiefamily.org
HOMEPAGE= http://finance-quote.sourceforge.net/
COMMENT= Perl module to get stock quotes from Yahoo
+LICENSE= gnu-gpl-v2 # or later
PKG_DESTDIR_SUPPORT= user-destdir
@@ -26,5 +27,9 @@ USE_LANGUAGES= # empty
PERL5_PACKLIST= auto/Finance/Quote/.packlist
+# for patchd file
+pre-configure:
+ ${RM} -f ${WRKSRC}/lib/Finance/Quote/VWD.pm.orig
+
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/finance/p5-Finance-Quote/distinfo b/finance/p5-Finance-Quote/distinfo
index 833894efcef..25736f343e7 100644
--- a/finance/p5-Finance-Quote/distinfo
+++ b/finance/p5-Finance-Quote/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.8 2009/10/31 01:59:20 wiz Exp $
+$NetBSD: distinfo,v 1.9 2011/02/26 05:39:45 obache Exp $
SHA1 (Finance-Quote-1.17.tar.gz) = a04482f539b06e14ec7984ca7c009daf93303968
RMD160 (Finance-Quote-1.17.tar.gz) = 724d331879b6b039746f16c7ede7e6959d28c429
Size (Finance-Quote-1.17.tar.gz) = 130686 bytes
+SHA1 (patch-lib_Finance_Quote_VWD.pm) = 95f3294c6acf64b6b9c8a58cd997ed3854cf3ae1
diff --git a/finance/p5-Finance-Quote/patches/patch-lib_Finance_Quote_VWD.pm b/finance/p5-Finance-Quote/patches/patch-lib_Finance_Quote_VWD.pm
new file mode 100644
index 00000000000..9c8b2e44958
--- /dev/null
+++ b/finance/p5-Finance-Quote/patches/patch-lib_Finance_Quote_VWD.pm
@@ -0,0 +1,52 @@
+$NetBSD: patch-lib_Finance_Quote_VWD.pm,v 1.1 2011/02/26 05:39:45 obache Exp $
+
+* http://rt.cpan.org/Public/Bug/Display.html?id=66041
+
+--- lib/Finance/Quote/VWD.pm.orig 2009-10-05 17:39:57.000000000 +0000
++++ lib/Finance/Quote/VWD.pm
+@@ -123,7 +123,10 @@ sub vwd
+ next if not $content;
+
+ # <h1> contains price, time, name, and symbol
+- my $head = $content->find("h1");
++ my $head = $content->look_down(
++ "_tag", "div",
++ "class", "wpHeadline"
++ );
+ next if not $head;
+
+ my $wpkurs = $head->look_down(
+@@ -148,21 +151,24 @@ sub vwd
+ $_->delete;
+ }
+
+- if ($head->as_trimmed_text =~ /^(.*) \((.+)\)$/) {
+- $info{$fund, "name"} = $1;
+- $info{$fund, "symbol"} = $2;
++ my $wpsymbol = $content->look_down(
++ "_tag", "ul",
++ "class", "wpInfo"
++ );
++ if ($wpsymbol) {
++ my @li = $wpsymbol->find("li");
++ if ($li[4]->as_text =~ /WKN:(\w+)/) {
++ $info{$fund, "symbol"} = $1;
++ }
+ }
+
+ # <ul> contains currency as 3rd <li>
+ my $wpinfo = $content->look_down(
+- "_tag", "ul",
+- "class", "wpInfo"
++ "_tag", "span",
++ "class", "whrg"
+ );
+ if ($wpinfo) {
+- my @li = $wpinfo->find("li");
+- if ($li[2]->as_text =~ /Währung:(\w+)/) {
+- $info{$fund, "currency"} = substr($1, 0, 3);
+- }
++ $info{$fund, "currency"} = substr($wpinfo->as_text, 0, 3);
+ }
+
+ # fund ok