summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2014-09-21 10:25:35 +0000
committerPacho Ramos <pacho@gentoo.org>2014-09-21 10:25:35 +0000
commitf0a1796c98bcff2473dad95a4be1464e972f7c2a (patch)
tree4b8ad4693a05ec7fe275709fbe4f335416b0633f /dev-libs
parentNoved to github; also add in masked 2.4 series (diff)
downloadgentoo-2-f0a1796c98bcff2473dad95a4be1464e972f7c2a.tar.gz
gentoo-2-f0a1796c98bcff2473dad95a4be1464e972f7c2a.tar.bz2
gentoo-2-f0a1796c98bcff2473dad95a4be1464e972f7c2a.zip
Update api for Yr.no (#522718 by poncho and Evgeny Bobkin)
(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libgweather/ChangeLog8
-rw-r--r--dev-libs/libgweather/files/libgweather-3.12.2-yr_no-api.patch119
-rw-r--r--dev-libs/libgweather/libgweather-3.12.2-r1.ebuild58
3 files changed, 184 insertions, 1 deletions
diff --git a/dev-libs/libgweather/ChangeLog b/dev-libs/libgweather/ChangeLog
index b7984c4ccdf8..337fa4848f08 100644
--- a/dev-libs/libgweather/ChangeLog
+++ b/dev-libs/libgweather/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/libgweather
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgweather/ChangeLog,v 1.112 2014/08/02 09:58:54 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgweather/ChangeLog,v 1.113 2014/09/21 10:25:35 pacho Exp $
+
+*libgweather-3.12.2-r1 (21 Sep 2014)
+
+ 21 Sep 2014; Pacho Ramos <pacho@gentoo.org>
+ +files/libgweather-3.12.2-yr_no-api.patch, +libgweather-3.12.2-r1.ebuild:
+ Update api for Yr.no (#522718 by poncho and Evgeny Bobkin)
02 Aug 2014; Pacho Ramos <pacho@gentoo.org> -libgweather-3.12.1.ebuild,
libgweather-3.10.2.ebuild, libgweather-3.12.2.ebuild:
diff --git a/dev-libs/libgweather/files/libgweather-3.12.2-yr_no-api.patch b/dev-libs/libgweather/files/libgweather-3.12.2-yr_no-api.patch
new file mode 100644
index 000000000000..ee93d19d25e7
--- /dev/null
+++ b/dev-libs/libgweather/files/libgweather-3.12.2-yr_no-api.patch
@@ -0,0 +1,119 @@
+From 89de9f95660f2fcdaf8ffc4ebe3c7c192d42f464 Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna@src.gnome.org>
+Date: Tue, 9 Sep 2014 14:15:43 -0700
+Subject: Yr.no: update to version 1.9 of the online API
+
+The old version has been discontinued (without notice), start
+using the new one.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=736334
+
+diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
+index f7db931..af47861 100644
+--- a/libgweather/weather-yrno.c
++++ b/libgweather/weather-yrno.c
+@@ -44,25 +44,46 @@ static struct {
+ GWeatherSky sky;
+ GWeatherConditions condition;
+ } symbols[] = {
+- { GWEATHER_SKY_CLEAR, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* Sun / clear sky */
+- { GWEATHER_SKY_BROKEN, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* Fair */
+- { GWEATHER_SKY_SCATTERED, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* Partly cloudy */
++ { GWEATHER_SKY_CLEAR, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* Sun */
++ { GWEATHER_SKY_BROKEN, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* LightCloud */
++ { GWEATHER_SKY_SCATTERED, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* PartlyCloudy */
+ { GWEATHER_SKY_OVERCAST, { FALSE, GWEATHER_PHENOMENON_NONE, GWEATHER_QUALIFIER_NONE } }, /* Cloudy */
+- { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_SHOWERS } }, /* Rain showers */
+- { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* Rain showers with thunder */
+- { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_SHOWERS } }, /* Sleet showers */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_SHOWERS } }, /* Snow showers */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_LIGHT } }, /* LightRainSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* LightRainThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_NONE } }, /* SleetSun */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_NONE } }, /* SnowSun */
+ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_NONE } }, /* Rain */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_HEAVY } }, /* Heavy rain */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* Rain and thunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* RainThunder */
+ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_NONE } }, /* Sleet */
+ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_NONE } }, /* Snow */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* Snow and thunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* SnowThunder */
+ { GWEATHER_SKY_CLEAR, { TRUE, GWEATHER_PHENOMENON_FOG, GWEATHER_QUALIFIER_NONE } }, /* Fog */
+- { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* Sleet showers and thunder */
+- { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* Snow showers and thunder */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_HEAVY } }, /* Rain and thunder */
+- { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_HEAVY } } /* Sleet and thunder */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* SleetSunThunder */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* SnowSunThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* LightRainThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* SleetThunder */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_DRIZZLE, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* DrizzleThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* RainThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_LIGHT } }, /* LightSleetThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySleetThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_LIGHT } }, /* LightSnowThunderSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySnowThunderSun */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_DRIZZLE, GWEATHER_QUALIFIER_THUNDERSTORM } }, /* DrizzleThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_LIGHT } }, /* LightSleetThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySleetThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_LIGHT } }, /* LightSnowThunder */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySnowThunder */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_DRIZZLE, GWEATHER_QUALIFIER_NONE } }, /* DrizzleSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_RAIN, GWEATHER_QUALIFIER_NONE } }, /* RainSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_LIGHT } }, /* LightSleetSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySleetSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_LIGHT } }, /* LightSnowSun */
++ { GWEATHER_SKY_BROKEN, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySnowSun */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_DRIZZLE, GWEATHER_QUALIFIER_NONE } }, /* Drizzle */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_LIGHT } }, /* LightSleet */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_ICE_PELLETS, GWEATHER_QUALIFIER_HEAVY } }, /* HeavySleet */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_LIGHT } }, /* LightSnow */
++ { GWEATHER_SKY_OVERCAST, { TRUE, GWEATHER_PHENOMENON_SNOW, GWEATHER_QUALIFIER_HEAVY } } /* HeavySnow */
+ };
+
+ static struct {
+@@ -207,6 +228,22 @@ read_pressure (GWeatherInfo *info,
+ }
+
+ static inline void
++read_humidity (GWeatherInfo *info,
++ xmlNodePtr node)
++{
++ xmlChar *val;
++ double percent;
++
++ val = xmlGetProp (node, XC("value"));
++ if (val == NULL)
++ return;
++
++ percent = g_ascii_strtod ((char*) val, NULL);
++ info->priv->humidity = percent;
++ info->priv->hasHumidity = TRUE;
++}
++
++static inline void
+ read_child_node (GWeatherInfo *info,
+ xmlNodePtr node)
+ {
+@@ -220,6 +257,8 @@ read_child_node (GWeatherInfo *info,
+ read_temperature (info, node);
+ else if (strcmp ((char*) node->name, "pressure") == 0)
+ read_pressure (info, node);
++ else if (strcmp ((char*) node->name, "humidity") == 0)
++ read_humidity (info, node);
+ }
+
+ static inline void
+@@ -532,7 +571,7 @@ yrno_start_open_new (GWeatherInfo *info)
+ g_ascii_dtostr (latstr, sizeof(latstr), RADIANS_TO_DEGREES (loc->latitude));
+ g_ascii_dtostr (lonstr, sizeof(lonstr), RADIANS_TO_DEGREES (loc->longitude));
+
+- url = g_strdup_printf("http://api.yr.no/weatherapi/locationforecast/1.8/?lat=%s;lon=%s", latstr, lonstr);
++ url = g_strdup_printf("http://api.yr.no/weatherapi/locationforecast/1.9/?lat=%s;lon=%s", latstr, lonstr);
+
+ message = soup_message_new ("GET", url);
+ _gweather_info_begin_request (info, message);
+--
+cgit v0.10.1
+
diff --git a/dev-libs/libgweather/libgweather-3.12.2-r1.ebuild b/dev-libs/libgweather/libgweather-3.12.2-r1.ebuild
new file mode 100644
index 000000000000..afd22f24f15d
--- /dev/null
+++ b/dev-libs/libgweather/libgweather-3.12.2-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgweather/libgweather-3.12.2-r1.ebuild,v 1.1 2014/09/21 10:25:35 pacho Exp $
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+inherit eutils gnome2 vala
+
+DESCRIPTION="Library to access weather information from online services"
+HOMEPAGE="https://wiki.gnome.org/Projects/LibGWeather"
+
+LICENSE="GPL-2+"
+SLOT="2/3-6" # subslot = 3-(libgweather-3 soname suffix)
+IUSE="glade +introspection vala"
+REQUIRED_USE="vala? ( introspection )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+
+COMMON_DEPEND="
+ >=x11-libs/gtk+-3.5.6:3[introspection?]
+ >=dev-libs/glib-2.35.1:2
+ >=net-libs/libsoup-2.34:2.4
+ >=dev-libs/libxml2-2.6.0
+ >=sys-libs/timezone-data-2010k
+
+ glade? ( >=dev-util/glade-3.16:3.10 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gnome-applets-2.22.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.11
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.18
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+src_prepare() {
+ # Yr.no: update to version 1.9 of the online API (from 3.12 branch)
+ epatch "${FILESDIR}"/${P}-yr_no-api.patch
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS"
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable glade glade-catalog) \
+ $(use_enable introspection) \
+ $(use_enable vala)
+}