diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2009-11-10 15:58:41 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2009-11-10 15:58:41 +0000 |
commit | 1ba695caf13e9a3c148d3cea8593ef0ae2ea1cfd (patch) | |
tree | cc07185da48568bbbde75a2a0ca099f3851e9ed0 /media-plugins/mythweather | |
parent | Doesnot depend on Module-Build (diff) | |
download | gentoo-2-1ba695caf13e9a3c148d3cea8593ef0ae2ea1cfd.tar.gz gentoo-2-1ba695caf13e9a3c148d3cea8593ef0ae2ea1cfd.tar.bz2 gentoo-2-1ba695caf13e9a3c148d3cea8593ef0ae2ea1cfd.zip |
Patch from Jerry McDonald <gentoo@greatships.com> from bug #287001 fixing the parsing error in the NWS script in 0.21. Fixed permissions on the scripts in 0.21 and 0.22
(Portage version: 2.1.7.4/cvs/Linux x86_64)
Diffstat (limited to 'media-plugins/mythweather')
-rw-r--r-- | media-plugins/mythweather/ChangeLog | 13 | ||||
-rw-r--r-- | media-plugins/mythweather/files/mythweather-0.21_p20069-nws-parse-fix.patch | 64 | ||||
-rw-r--r-- | media-plugins/mythweather/mythweather-0.21_p20069-r1.ebuild | 28 | ||||
-rw-r--r-- | media-plugins/mythweather/mythweather-0.22_p22763-r1.ebuild (renamed from media-plugins/mythweather/mythweather-0.22_p22763.ebuild) | 9 |
4 files changed, 112 insertions, 2 deletions
diff --git a/media-plugins/mythweather/ChangeLog b/media-plugins/mythweather/ChangeLog index c14aea035d15..3e5720879a64 100644 --- a/media-plugins/mythweather/ChangeLog +++ b/media-plugins/mythweather/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for media-plugins/mythweather # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/mythweather/ChangeLog,v 1.57 2009/11/08 03:53:07 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/mythweather/ChangeLog,v 1.58 2009/11/10 15:58:40 cardoe Exp $ + +*mythweather-0.22_p22763-r1 (10 Nov 2009) +*mythweather-0.21_p20069-r1 (10 Nov 2009) + + 10 Nov 2009; Doug Goldstein <cardoe@gentoo.org> + +mythweather-0.21_p20069-r1.ebuild, + +files/mythweather-0.21_p20069-nws-parse-fix.patch, + -mythweather-0.22_p22763.ebuild, +mythweather-0.22_p22763-r1.ebuild: + Patch from Jerry McDonald <gentoo@greatships.com> from bug #287001 fixing + the parsing error in the NWS script in 0.21. Fixed permissions on the + scripts in 0.21 and 0.22 *mythweather-0.22_p22763 (08 Nov 2009) diff --git a/media-plugins/mythweather/files/mythweather-0.21_p20069-nws-parse-fix.patch b/media-plugins/mythweather/files/mythweather-0.21_p20069-nws-parse-fix.patch new file mode 100644 index 000000000000..8769b49ce0e1 --- /dev/null +++ b/media-plugins/mythweather/files/mythweather-0.21_p20069-nws-parse-fix.patch @@ -0,0 +1,64 @@ +diff -Burp a/mythweather/mythweather/scripts/us_nws/nwsxml.pl b/mythweather/mythweather/scripts/us_nws/nwsxml.pl +--- a/mythweather/mythweather/scripts/us_nws/nwsxml.pl 2008-02-11 11:38:20.000000000 -0500 ++++ b/mythweather/mythweather/scripts/us_nws/nwsxml.pl 2009-09-29 17:59:08.000000000 -0400 +@@ -99,11 +99,17 @@ foreach (@types) { + $xml->{$key} = int($xml->{'wind_mph'} * 1.609344 + .5); + } + } elsif (/wind_gust/) { +- if ($units =~ /ENG/ || $xml->{'wind_gust_mph'} eq 'NA') { +- $key = 'wind_gust_mph'; ++ if (defined($xml->{'wind_gust_mph'})) { ++ if ($units =~ /ENG/ || $xml->{'wind_gust_mph'} eq 'NA') { ++ $key = 'wind_gust_mph'; ++ } else { ++ $key = 'wind_gust_kph'; ++ $xml->{$key} = int($xml->{'wind_gust_mph'} * 1.609344 + .5); ++ } + } else { +- $key = 'wind_gust_kph'; +- $xml->{$key} = int($xml->{'wind_gust_mph'} * 1.609344 + .5); ++ $xml->{'wind_gust_mph'} = 'NA'; ++ $xml->{'wind_gust_kph'} = 'NA'; ++ $key = 'wind_gust'; + } + } elsif (/visibility/) { + if ($units =~ /ENG/) { +@@ -128,14 +134,17 @@ foreach (@types) { + } elsif (/cclocation/) { + $key = 'location'; + } elsif (/appt$/) { +- if ($xml->{windchill_f} eq 'NA') { +- $key = 'heat_index_f' if ($units =~ /ENG/); +- $key = 'heat_index_c' if ($units =~ /SI/); +- } else { +- $key = 'windchill_f' if ($units =~ /ENG/); +- $key = 'windchill_c' if ($units =~ /SI/); +- }; +- ++ if (defined($xml->{windchill_f})) { ++ if ($xml->{windchill_f} eq 'NA') { ++ $key = 'heat_index_f' if ($units =~ /ENG/); ++ $key = 'heat_index_c' if ($units =~ /SI/); ++ } else { ++ $key = 'windchill_f' if ($units =~ /ENG/); ++ $key = 'windchill_c' if ($units =~ /SI/); ++ }; ++ } else { ++ $key = 'appt'; ++ } + } elsif (/wind_spdgst/) { + # relying on this being after speed and gust + $key = "wind_spdgst"; +@@ -148,5 +157,11 @@ foreach (@types) { + } else { + $key = $label; + } +- printf $label . "::" . $xml->{$key}. "\n"; ++ print $label . "::"; ++ if (defined($xml->{$key})) { ++ print $xml->{$key}; ++ } else { ++ print "NA"; ++ } ++ print "\n"; + } diff --git a/media-plugins/mythweather/mythweather-0.21_p20069-r1.ebuild b/media-plugins/mythweather/mythweather-0.21_p20069-r1.ebuild new file mode 100644 index 000000000000..83819b213c57 --- /dev/null +++ b/media-plugins/mythweather/mythweather-0.21_p20069-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/mythweather/mythweather-0.21_p20069-r1.ebuild,v 1.1 2009/11/10 15:58:40 cardoe Exp $ + +EAPI=2 +inherit qt3 mythtv-plugins + +DESCRIPTION="Weather forecast module for MythTV." +IUSE="" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="dev-perl/DateManip + dev-perl/ImageSize + dev-perl/SOAP-Lite + dev-perl/XML-Simple + dev-perl/XML-Parser + dev-perl/XML-SAX" + +src_prepare() { + epatch "${FILESDIR}/${P}-nws-parse-fix.patch" +} + +src_install() { + mythtv-plugins_src_install + + # correct permissions so MythWeather is actually usable + fperms 755 /usr/share/mythtv/mythweather/scripts/*/*.pl +} diff --git a/media-plugins/mythweather/mythweather-0.22_p22763.ebuild b/media-plugins/mythweather/mythweather-0.22_p22763-r1.ebuild index fd8b6095b16b..2ebe3ee617b5 100644 --- a/media-plugins/mythweather/mythweather-0.22_p22763.ebuild +++ b/media-plugins/mythweather/mythweather-0.22_p22763-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/mythweather/mythweather-0.22_p22763.ebuild,v 1.1 2009/11/08 03:53:07 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/mythweather/mythweather-0.22_p22763-r1.ebuild,v 1.1 2009/11/10 15:58:40 cardoe Exp $ EAPI=2 inherit qt4 mythtv-plugins @@ -15,3 +15,10 @@ DEPEND="dev-perl/DateManip dev-perl/XML-Simple dev-perl/XML-Parser dev-perl/XML-SAX" + +src_install() { + mythtv-plugins_src_install + + # correct permissions so MythWeather is actually usable + fperms 755 /usr/share/mythtv/mythweather/scripts/*/*.pl +} |