diff options
6 files changed, 289 insertions, 9 deletions
diff --git a/xfce-extra/xfce4-weather-plugin/ChangeLog b/xfce-extra/xfce4-weather-plugin/ChangeLog index 6673ef6710e4..edefc3668359 100644 --- a/xfce-extra/xfce4-weather-plugin/ChangeLog +++ b/xfce-extra/xfce4-weather-plugin/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for xfce-extra/xfce4-weather-plugin # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-weather-plugin/ChangeLog,v 1.38 2014/07/24 11:01:00 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-weather-plugin/ChangeLog,v 1.39 2014/10/29 17:06:08 ssuominen Exp $ + +*xfce4-weather-plugin-0.8.3-r2 (29 Oct 2014) + + 29 Oct 2014; Samuli Suominen <ssuominen@gentoo.org> +files/xfce4-weather-plugi + n-0.8.3-Fix-color-parsing-when-reading-config-file.patch, +files/xfce4-weather + -plugin-0.8.3-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch, +fil + es/xfce4-weather-plugin-0.8.3-Switch-to-met.no-locationforecastLTS-1.2-API-bug + -109.patch, +xfce4-weather-plugin-0.8.3-r2.ebuild: + Import upstream patches for fetching weather information wrt #524850 by + Christian Tietz, David W. Noon, "Yarda" and others. Commit to stable because + current stable is useless if it can't fetch the data. 24 Jul 2014; Samuli Suominen <ssuominen@gentoo.org> xfce4-weather-plugin-0.8.3-r1.ebuild: diff --git a/xfce-extra/xfce4-weather-plugin/Manifest b/xfce-extra/xfce4-weather-plugin/Manifest index 272752ed87a6..a3271caa909d 100644 --- a/xfce-extra/xfce4-weather-plugin/Manifest +++ b/xfce-extra/xfce4-weather-plugin/Manifest @@ -1,19 +1,23 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX xfce4-weather-plugin-0.8.3-Fix-color-parsing-when-reading-config-file.patch 951 SHA256 a3f00c0012e6f6aef678e2ecc2d683c2371e256d95681e31ec027207fbf7100c SHA512 81b0404069c931d57a394a7c92dcb2ea5a7ac1b37cb15dd62d39940344d3a760f428e601a3b26e046f4f006f809471223523e2fb9f8b65f1786e45948b0d40e7 WHIRLPOOL 816c08fb1940240a6cba9c044714b1c0ce0139b7a85ea0c35f6b33fca8d90994cf1b8b59805cc1d80eca8ae86f7a397731ae41803a20e2df44d67b15c2fe7fe8 +AUX xfce4-weather-plugin-0.8.3-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch 5943 SHA256 c38a095b40adbcc9239bbeae6c06e93f33a225e2ef167c460c84a0275ccb025c SHA512 a1a974fd440ac62685b44d512362a6ddd7c3ad0753b3645a8383a6601029353db2afc73f68a6ae39bf2902099b8d2a29458381ff023db2ea02280e84f63736f9 WHIRLPOOL 42622a154fcba5b492dc5780d91d565704ca29508dc055ec5eea5484edfbaeafe10f97442292fe38c30ea691d2d0b2d844144b59a696d0c7f0a52befab3a1fe4 +AUX xfce4-weather-plugin-0.8.3-Switch-to-met.no-locationforecastLTS-1.2-API-bug-109.patch 974 SHA256 76e465293a94c4992d629b6d5e54445b6ba5785ac2a35f85a19404d4947e5ca2 SHA512 960950c3c863c96d1b1e1676e238c4b271b344a302a2ec77c90025a843065d41ea114d0d0c1674f9bc44be31d3945035691a610ce4d5b6004967fa6ec8815b20 WHIRLPOOL f0724eb77eb4784c7f066bb9bfa69dc1a4ba94abc78f65ffc59dfb84e189eff9d7ece219902c0c27ff763b81baa582f6a5aadc93d205082a8037ded69c5c3c84 AUX xfce4-weather-plugin-0.8.3-upower-0.99.patch 1872 SHA256 eb79d02f4fa52b3716ce45ac1e65bc9f4c9db2fbc75731c853fd8dfd70da4860 SHA512 2d60ed41a4253dd0d6016e7cddf2b812218959f701e5a5369a9f5f0e2ad6a3530acd25b76a339cd95a07e333960733b75556a6b829a596eff9aaf6b50e792c83 WHIRLPOOL 434d7d298aa5f893c11bbb91838c78681c2d68e314b7e55e6894d41485e4eba1a42a931fa63892b0c90650544d5e72861fc98d45c682ea67c8d0605f80e0db5c DIST xfce4-weather-plugin-0.8.3.tar.bz2 2786473 SHA256 40a6a22be7653b15a47174a430da89040f178695b48e5e01e77990050f715ce4 SHA512 24b1f191e12fcd56a9149d2f0dd3d4449a31586503a28f96352b4dd25f795e3ebcb975997d580478840311c98e30d313458403814ca21d049f35865a5e75b687 WHIRLPOOL b857a236c39e9986ad6962cdc670fabb560ac32d1339d3c276fb8b512387a281c163cf66613a57c3858c98978acfdb8dd5c23ff97aec3dd70d8f6e57c954292a EBUILD xfce4-weather-plugin-0.8.3-r1.ebuild 1157 SHA256 00377477bcef416d1792240f604fc291daadb6e36f6827aa03b680f4eca48135 SHA512 4f51d132253211ade2d65823303d125b27e1d6eb974efb8646626e49f81b002340f10a04c3d9282a1a954c6ae0d505cdddcc84101715e5ecedd41d2a630baa5b WHIRLPOOL dbdd0e4b420f1d1ca19c0915ebfb50c19b450c3958430ecf16887bb79a4b91eca195442bb45c3fe690da24c76c5255e37c28c886a9cbcc08acc724ec5bfded69 -MISC ChangeLog 4123 SHA256 6a4091b483c34c7ee6c08d6006351bcf92de0922661daead649cafc97ffd48e9 SHA512 f822be5b95e9135d29a63536f1c5aeaf862d48cf5bbbb3ba514d16de8d178d82439328c8578f915aeb258e2fa8b0a5b23745852541163b6f12868266f6da3c65 WHIRLPOOL da0678750fc868148ca0847a6062a17561e54be11d3fe38ff9720b07def1d4d944cc5e6e0cb85c73de328d90b94662e9313019e6a50941a322314749ebcd502f +EBUILD xfce4-weather-plugin-0.8.3-r2.ebuild 1391 SHA256 4e4a55e4005a369559911baa3650e069be65aacf0dfe289b3ea4ce241c80dc1f SHA512 abebe618dbab582d1d7a996b776b0667823107465e593ad59ba1a6f63a5a62a5b516785ef6d2aa1d602c66501fd26424ba8372097653d08258296880f8ea7ef1 WHIRLPOOL 1347d95d395a85404cb7e1d6cbf29ecd86bfa7a20cf79481a58cd9531f00ec6451edaf3c25a2764f983dc77ffe52cf3bcb8d79da73698b13ba48576fc6b51ce8 +MISC ChangeLog 4757 SHA256 f67eb998823a403a1471a579e134b00b0d94b0c774ad0d37de7cba57f8001cac SHA512 efadc1722adae5871b748daf8d67669eaab93ae8402d8955f287080c0ed42d882d91f7928312b8ce139886c5b5676335b25fda41cbbc7d09f2806a93186e081b WHIRLPOOL c4709f932f59f8e4251b8b5a3a3b6689a55a1860c9a5a3e8ba42930072d912ea3fde9a580f431b4ca5f991eaa5eea653f16cf8de0a4894e09b6c895c70ed3c69 MISC metadata.xml 159 SHA256 900ea49b6703fce452e205b85226bf1f994725963e5840da501182e7487d0e63 SHA512 000eb10e453390fb27843585adf354d725e77d881553d97a1a242bf06578a402ee4a924d9d8205a3fa687a59e2402bc9f3e1c227e448e05026354c196cf0a4f3 WHIRLPOOL 6f01aa01b8124d752be8e6c550ffdfc9093d45b206771c924ce25ce3f0daf006a669721d1385ff1bc803df342322d1c264f2905d3ccc44686c937deae8308ec3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQEcBAEBCAAGBQJT0OdtAAoJEEdUh39IaPFNLIkH/RzjyR5BYm6TRuna3W0yT183 -bzNHKaT4IVV+ts0YZSg0H2i0RqalETpRX9SW09nzpJRaPS545zUBrE5/d1RkTns2 -UrmP97P+GjXGCZazz+Q+t0un6kjhOh7Ql+/qbJ9ALz1388vFIDxRlvbbgzm+A8Kg -tUjZ+MgaxK/dR1ONbK5egk1BvXbLvo95LhmiEWhfkgczsKsvd+pqjaF8+4WkhzTe -WfZA3EWsOUQzitQ9GqR4AZFP9SVr2uZNPZc8F9Zc/5RDJXbzBSIhFCh6T0fH+GxZ -Owosy84rLyFh1Ltp6p4GM7l5l2/Uj85kOWzU/MDEnsefSttP9ZLtW5+iGb8XOWA= -=HDJq +iQEcBAEBCAAGBQJUUR5cAAoJEEdUh39IaPFNLDEIAJot0RZ6rm5PymthtGcrTbGN +9laSLC1zf/2a/CkgXkl7upkVNJSP68VxI8qHMilZO6pnO8eGtIKHCZDthKhmNtRo +qVuQ3pmxh2WFjYuvRoexpIQEgnx7X5X5rwuM7ST/zFKSAkOEqP7B7tqBO04YBkSH +OtBlq7wkUexsDsh6BhW39X0ik3e3Ubni3Zg3gFTcbyhJuQIwyPyS8lWvhGhV0V6N +D4zEDyisdyTX6eQiEWMPhzB3bU+jXRQvXNs9OuVeg/jKa21neVofdyrlIX8XK0/h +Y/U8edFhMCe1b29efu293pyZcf/ft7Cmq7MYcWPo1hY0kOp2QnSq62DU6mLQ2Mw= +=2f8O -----END PGP SIGNATURE----- diff --git a/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Fix-color-parsing-when-reading-config-file.patch b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Fix-color-parsing-when-reading-config-file.patch new file mode 100644 index 000000000000..be936455a990 --- /dev/null +++ b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Fix-color-parsing-when-reading-config-file.patch @@ -0,0 +1,28 @@ +From 09a9a4fdec9ee709bd3da2be2ba1cf13e4e377e1 Mon Sep 17 00:00:00 2001 +From: Harald Judt <h.judt@gmx.at> +Date: Wed, 20 Feb 2013 15:25:09 +0100 +Subject: [PATCH] Fix color parsing when reading config file. + +This turned out to be a stupid copy & paste mistake. + +(cherry picked from commit 462e85dfd54e9a3bdf6c330c602a6545bccce585) +--- + panel-plugin/weather.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c +index 710c33c..4a2e3c3 100644 +--- a/panel-plugin/weather.c ++++ b/panel-plugin/weather.c +@@ -884,7 +884,7 @@ xfceweather_read_config(XfcePanelPlugin *plugin, + + value = xfce_rc_read_entry(rc, "scrollbox_color", NULL); + if (value) +- gdk_color_parse("#rrrrggggbbbb", &(data->scrollbox_color)); ++ gdk_color_parse(value, &(data->scrollbox_color)); + + data->scrollbox_use_color = + xfce_rc_read_bool_entry(rc, "scrollbox_use_color", FALSE); +-- +2.1.2 + diff --git a/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch new file mode 100644 index 000000000000..a19241c1ef2f --- /dev/null +++ b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch @@ -0,0 +1,164 @@ +http://bugs.gentoo.org/524850 + +From a17ed6d248135cedc645b0481c4ad01687386ed2 Mon Sep 17 00:00:00 2001 +From: Harald Judt <h.judt@gmx.at> +Date: Wed, 28 May 2014 20:08:02 +0200 +Subject: [PATCH] Make plugin ready for met.no locationforecast-1.2 API (bug + #10916). + +http://api.yr.no/weatherapi/locationforecastlts/1.1/documentation#version_1_2___2014_05_20 + +The updated API version uses CamelCase symbol names instead of UPPERCASE +ones and has added some new names (like 'Drizzle'), which unfortunately +have not been documented (yet?). + +What's more, the typo 'celcius' has been replaced by the fixed 'celsius', +but luckily the plugin will not be affected by that change. + +What's a bit more unfortunate is that the existing icon themes do not +cover the new symbol names, so one would have to create quite a lot of +new icons. Also, new translations would have to be added for the symbols, +and maybe existing ones would have to be altered. To prevent this, we're +simply going to map the new symbols to existing ones as good as possible. +This should be good enough for the time being. + +(cherry picked from commit 1ff71669644a0b824a8a5ba9b40771ee4fb8a76b) +--- + panel-plugin/weather-parsers.c | 3 +- + panel-plugin/weather-translate.c | 70 +++++++++++++++++++++++++++++++++++++++- + panel-plugin/weather-translate.h | 2 ++ + 3 files changed, 73 insertions(+), 2 deletions(-) + +diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c +index c380130..2c90c11 100644 +--- a/panel-plugin/weather-parsers.c ++++ b/panel-plugin/weather-parsers.c +@@ -28,6 +28,7 @@ + #define _XOPEN_SOURCE + #define _XOPEN_SOURCE_EXTENDED 1 + #include "weather-parsers.h" ++#include "weather-translate.h" + #include "weather-debug.h" + + #include <time.h> +@@ -196,8 +197,8 @@ parse_location(xmlNode *cur_node, + } + if (NODE_IS_TYPE(child_node, "symbol")) { + g_free(loc->symbol); +- loc->symbol = PROP(child_node, "id"); + loc->symbol_id = strtol(PROP(child_node, "number"), NULL, 10); ++ loc->symbol = g_strdup(get_symbol_for_id(loc->symbol_id)); + } + } + +diff --git a/panel-plugin/weather-translate.c b/panel-plugin/weather-translate.c +index 004eef1..cc97600 100644 +--- a/panel-plugin/weather-translate.c ++++ b/panel-plugin/weather-translate.c +@@ -29,6 +29,7 @@ + #include "weather-translate.h" + + #define DAY_LOC_N (sizeof(gchar) * 100) ++#define NODATA "NODATA" + + + static const gchar *wdirs[] = { +@@ -169,7 +170,7 @@ static const symbol_desc symbol_to_desc[] = { + + { 15, "FOG", N_("Fog"), N_("Fog") }, + +- /* Symbols 16-19 are used for polar days */ ++ /* Symbols 16-19 are used for polar days (unused beginning with API version 1.2) */ + { 16, "SUN", N_("Sunny"), N_("Clear") }, + { 17, "LIGHTCLOUD", N_("Lightly cloudy"), N_("Lightly cloudy") }, + { 18, "LIGHTRAINSUN", N_("Rain showers"), N_("Rain showers") }, +@@ -185,6 +186,73 @@ static const symbol_desc symbol_to_desc[] = { + #define NUM_SYMBOLS (sizeof(symbol_to_desc) / sizeof(symbol_to_desc[0])) + + ++/* ++ * API version 1.2, published in May 2014, introduced new symbols. We ++ * try to match these with existing symbols, in order to be compatible ++ * with existing icon themes and to maintain translation completeness. ++ * ++ * See http://api.met.no/weatherapi/weathericon/1.1/documentation ++ * for a list of symbols. For a list of symbols with descriptions, ++ * see http://om.yr.no/forklaring/symbol. ++ */ ++gint ++replace_symbol_id(gint id) ++{ ++ /* Symbol ids greater than 100 are used for indicating polar ++ * night. These ids are over the ordinary id + 100. Since we ++ * don't support polar icons, we can simply subtract 100 to ++ * get the non-polar symbol ids. ++ */ ++ if (id > 100) ++ id -= 100; ++ ++ switch (id) { ++ case 24: return 22; /* Light rain showers and thunder */ ++ case 25: return 6; /* Heavy rain showers and thunder */ ++ case 26: return 20; /* Light sleet showers and thunder */ ++ case 27: return 20; /* Heavy sleet showers and thunder */ ++ case 28: return 21; /* Light snow showers and thunder */ ++ case 29: return 21; /* Heavy snow showers and thunder */ ++ case 30: return 22; /* Light rain and thunder */ ++ case 31: return 23; /* Light sleet and thunder */ ++ case 32: return 23; /* Heavy sleet and thunder */ ++ case 33: return 14; /* Light snow and thunder */ ++ case 34: return 14; /* Heavy snow and thunder */ ++ ++ /* symbols 35-39 are unused */ ++ ++ case 40: return 5; /* Light rain showers */ ++ case 41: return 5; /* Heavy rain showers */ ++ case 42: return 7; /* Light sleet showers */ ++ case 43: return 7; /* Heavy sleet showers */ ++ case 44: return 8; /* Light snow showers */ ++ case 45: return 8; /* Heavy snow showers */ ++ case 46: return 9; /* Light rain */ ++ case 47: return 12; /* Light sleet */ ++ case 48: return 12; /* Heavy sleet */ ++ case 49: return 13; /* Light snow */ ++ case 50: return 13; /* Heavy snow */ ++ default: return id; ++ } ++} ++ ++ ++const gchar * ++get_symbol_for_id(gint id) ++{ ++ if (G_UNLIKELY(id < 1)) ++ return NODATA; ++ ++ if (id >= NUM_SYMBOLS) ++ id = replace_symbol_id(id); ++ ++ if (id < NUM_SYMBOLS) ++ return symbol_to_desc[id-1].symbol; ++ ++ return NODATA; ++} ++ ++ + const gchar * + translate_desc(const gchar *desc, + const gboolean nighttime) +diff --git a/panel-plugin/weather-translate.h b/panel-plugin/weather-translate.h +index 1538466..2926279 100644 +--- a/panel-plugin/weather-translate.h ++++ b/panel-plugin/weather-translate.h +@@ -24,6 +24,8 @@ + + G_BEGIN_DECLS + ++const gchar *get_symbol_for_id(gint id); ++ + const gchar *translate_desc(const gchar *desc, + gboolean nighttime); + +-- +2.1.2 + diff --git a/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Switch-to-met.no-locationforecastLTS-1.2-API-bug-109.patch b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Switch-to-met.no-locationforecastLTS-1.2-API-bug-109.patch new file mode 100644 index 000000000000..0b915804785f --- /dev/null +++ b/xfce-extra/xfce4-weather-plugin/files/xfce4-weather-plugin-0.8.3-Switch-to-met.no-locationforecastLTS-1.2-API-bug-109.patch @@ -0,0 +1,28 @@ +http://bugs.gentoo.org/524850 + +From 70024ad992bfd3845d885469e5eccfad76269465 Mon Sep 17 00:00:00 2001 +From: Harald Judt <h.judt@gmx.at> +Date: Tue, 3 Jun 2014 19:59:05 +0200 +Subject: [PATCH] Switch to met.no locationforecastLTS-1.2 API (bug #10916). + +(cherry picked from commit 7df303bc5fa649299e18efeb5d4b801614030488) +--- + panel-plugin/weather.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c +index 4a2e3c3..e5036ae 100644 +--- a/panel-plugin/weather.c ++++ b/panel-plugin/weather.c +@@ -638,7 +638,7 @@ update_handler(plugin_data *data) + /* build url */ + url = + g_strdup_printf("http://api.yr.no/weatherapi" +- "/locationforecastlts/1.1/?lat=%s;lon=%s;msl=%d", ++ "/locationforecastlts/1.2/?lat=%s;lon=%s;msl=%d", + data->lat, data->lon, data->msl); + + /* start receive thread */ +-- +2.1.2 + diff --git a/xfce-extra/xfce4-weather-plugin/xfce4-weather-plugin-0.8.3-r2.ebuild b/xfce-extra/xfce4-weather-plugin/xfce4-weather-plugin-0.8.3-r2.ebuild new file mode 100644 index 000000000000..10362c22079f --- /dev/null +++ b/xfce-extra/xfce4-weather-plugin/xfce4-weather-plugin-0.8.3-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-weather-plugin/xfce4-weather-plugin-0.8.3-r2.ebuild,v 1.1 2014/10/29 17:06:08 ssuominen Exp $ + +EAPI=5 +inherit xfconf + +DESCRIPTION="A weather plug-in for the Xfce desktop environment" +HOMEPAGE="http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin" +SRC_URI="mirror://xfce/src/panel-plugins/${PN}/${PV%.*}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86" +IUSE="debug upower" + +RDEPEND=">=dev-libs/glib-2.20 + dev-libs/libxml2 + >=net-libs/libsoup-2.26 + >=x11-libs/gtk+-2.14:2 + >=xfce-base/libxfce4ui-4.10 + >=xfce-base/libxfce4util-4.10 + >=xfce-base/xfce4-panel-4.10 + upower? ( || ( >=sys-power/upower-0.9.23 sys-power/upower-pm-utils ) )" +DEPEND="${RDEPEND} + dev-util/intltool + virtual/pkgconfig" + +pkg_setup() { + PATCHES=( + "${FILESDIR}"/${P}-upower-0.99.patch + "${FILESDIR}"/${P}-Fix-color-parsing-when-reading-config-file.patch + "${FILESDIR}"/${P}-Make-plugin-ready-for-met.no-locationforecast-1.2-AP.patch + "${FILESDIR}"/${P}-Switch-to-met.no-locationforecastLTS-1.2-API-bug-109.patch + ) + + # For GEONAMES_USERNAME, read README file and ask ssuominen@! + XFCONF=( + $(use_enable upower) + $(xfconf_use_debug) + GEONAMES_USERNAME=Gentoo + ) + + DOCS=( AUTHORS ChangeLog NEWS README TODO ) +} |