From owner-svn-ports-branches@FreeBSD.ORG Sun Oct 12 06:57:20 2014 Return-Path: Delivered-To: svn-ports-branches@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3907EC3C; Sun, 12 Oct 2014 06:57:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19CDFE63; Sun, 12 Oct 2014 06:57:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9C6vJUE066351; Sun, 12 Oct 2014 06:57:19 GMT (envelope-from olivierd@FreeBSD.org) Received: (from olivierd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9C6vIFO066340; Sun, 12 Oct 2014 06:57:18 GMT (envelope-from olivierd@FreeBSD.org) Message-Id: <201410120657.s9C6vIFO066340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: olivierd set sender to olivierd@FreeBSD.org using -f From: Olivier Duchateau Date: Sun, 12 Oct 2014 06:57:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r370684 - in branches/2014Q4/misc/xfce4-weather-plugin: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 06:57:20 -0000 Author: olivierd Date: Sun Oct 12 06:57:17 2014 New Revision: 370684 URL: https://svnweb.freebsd.org/changeset/ports/370684 QAT: https://qat.redports.org/buildarchive/r370684/ Log: MFH: r370666 - Switch LocationforecastLTS to the new API (1.2), previous one is no longer available - Drop @dirm* in pkg-plist - Bump PORTREVISION Obtained from: Upstream repository ('trunk' branch) Approved by: portmgr (erwin@) Added: branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c - copied unchanged from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c - copied unchanged from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h - copied unchanged from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c - copied unchanged from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c Modified: branches/2014Q4/misc/xfce4-weather-plugin/Makefile branches/2014Q4/misc/xfce4-weather-plugin/pkg-plist Directory Properties: branches/2014Q4/ (props changed) Modified: branches/2014Q4/misc/xfce4-weather-plugin/Makefile ============================================================================== --- branches/2014Q4/misc/xfce4-weather-plugin/Makefile Sun Oct 12 06:37:05 2014 (r370683) +++ branches/2014Q4/misc/xfce4-weather-plugin/Makefile Sun Oct 12 06:57:17 2014 (r370684) @@ -3,7 +3,7 @@ PORTNAME= xfce4-weather-plugin PORTVERSION= 0.8.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= misc xfce geography MASTER_SITES= ${MASTER_SITE_XFCE} MASTER_SITE_SUBDIR=src/panel-plugins/${PORTNAME}/${PORTVERSION:R} @@ -16,7 +16,6 @@ LICENSE= GPLv2 LIB_DEPENDS= libsoup-2.4.so:${PORTSDIR}/devel/libsoup -SSP_UNSAFE= yes GNU_CONFIGURE= yes INSTALLS_ICONS= yes INSTALL_TARGET= install-strip Copied: branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c (from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c Sun Oct 12 06:57:17 2014 (r370684, copy of r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-parsers.c) @@ -0,0 +1,22 @@ +Make plugin ready for met.no locationforecast-1.2 API (bug #10916). + +--- panel-plugin/weather-parsers.c.orig 2013-02-01 15:18:50 UTC ++++ 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 +@@ -196,8 +197,8 @@ + } + 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)); + } + } + Copied: branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c (from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c Sun Oct 12 06:57:17 2014 (r370684, copy of r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.c) @@ -0,0 +1,95 @@ +Make plugin ready for met.no locationforecast-1.2 API (bug #10916). + +--- panel-plugin/weather-translate.c.orig 2013-01-24 14:45:10 UTC ++++ 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 @@ + + { 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 @@ + #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) Copied: branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h (from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h Sun Oct 12 06:57:17 2014 (r370684, copy of r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather-translate.h) @@ -0,0 +1,13 @@ +Make plugin ready for met.no locationforecast-1.2 API (bug #10916). + +--- panel-plugin/weather-translate.h.orig 2013-01-24 14:45:10 UTC ++++ 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); + Copied: branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c (from r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q4/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c Sun Oct 12 06:57:17 2014 (r370684, copy of r370666, head/misc/xfce4-weather-plugin/files/patch-panel-plugin__weather.c) @@ -0,0 +1,13 @@ +Make plugin ready for met.no locationforecast-1.2 API (bug #10916). + +--- panel-plugin/weather.c.orig 2013-02-18 10:21:00 UTC ++++ panel-plugin/weather.c +@@ -638,7 +638,7 @@ + /* 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 */ Modified: branches/2014Q4/misc/xfce4-weather-plugin/pkg-plist ============================================================================== --- branches/2014Q4/misc/xfce4-weather-plugin/pkg-plist Sun Oct 12 06:37:05 2014 (r370683) +++ branches/2014Q4/misc/xfce4-weather-plugin/pkg-plist Sun Oct 12 06:57:17 2014 (r370684) @@ -335,33 +335,3 @@ share/xfce4/weather/icons/simplistic/48/ share/xfce4/weather/icons/simplistic/48/sun-night.png share/xfce4/weather/icons/simplistic/48/sun.png share/xfce4/weather/icons/simplistic/theme.info -@dirrm share/xfce4/weather/icons/simplistic/48 -@dirrm share/xfce4/weather/icons/simplistic/22 -@dirrm share/xfce4/weather/icons/simplistic/128 -@dirrm share/xfce4/weather/icons/simplistic -@dirrm share/xfce4/weather/icons/liquid/48 -@dirrm share/xfce4/weather/icons/liquid/22 -@dirrm share/xfce4/weather/icons/liquid/128 -@dirrm share/xfce4/weather/icons/liquid-dark/48 -@dirrm share/xfce4/weather/icons/liquid-dark/22 -@dirrm share/xfce4/weather/icons/liquid-dark/128 -@dirrm share/xfce4/weather/icons/liquid-dark -@dirrm share/xfce4/weather/icons/liquid -@dirrm share/xfce4/weather/icons -@dirrm share/xfce4/weather -@dirrmtry share/xfce4/panel/plugins -@dirrmtry share/xfce4/panel -@dirrmtry share/xfce4 -@dirrmtry share/locale/ur_PK/LC_MESSAGES -@dirrmtry share/locale/ur_PK -@dirrmtry share/locale/ur/LC_MESSAGES -@dirrmtry share/locale/ur -@dirrmtry share/locale/ug/LC_MESSAGES -@dirrmtry share/locale/ug -@dirrmtry share/locale/te/LC_MESSAGES -@dirrmtry share/locale/te -@dirrmtry share/locale/ast/LC_MESSAGES -@dirrmtry share/locale/ast -@dirrmtry lib/xfce4/panel/plugins -@dirrmtry lib/xfce4/panel -@dirrmtry lib/xfce4