mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
- Update to 0.8.4
- Rewrite OPTIONS flags - Remove unneeded patches
This commit is contained in:
parent
cee3595882
commit
83a98ed920
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=372117
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= xfce4-weather-plugin
|
||||
PORTVERSION= 0.8.3
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 0.8.4
|
||||
CATEGORIES= misc xfce geography
|
||||
MASTER_SITES= ${MASTER_SITE_XFCE}
|
||||
MASTER_SITE_SUBDIR=src/panel-plugins/${PORTNAME}/${PORTVERSION:R}
|
||||
@ -13,6 +12,7 @@ MAINTAINER= xfce@FreeBSD.org
|
||||
COMMENT= Weather plugin for the Xfce panel
|
||||
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libsoup-2.4.so:${PORTSDIR}/devel/libsoup
|
||||
|
||||
@ -26,13 +26,7 @@ USE_XFCE= configenv libmenu libutil panel
|
||||
OPTIONS_DEFINE= UPOWER
|
||||
UPOWER_DESC= Power management tasks
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MUPOWER}
|
||||
LIB_DEPENDS+= libupower-glib.so:${PORTSDIR}/sysutils/upower
|
||||
CONFIGURE_ARGS+=--enable-upower
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-upower
|
||||
.endif
|
||||
UPOWER_LIB_DEPENDS= libupower-glib.so:${PORTSDIR}/sysutils/upower
|
||||
UPOWER_CONFIGURE_ENABLE= upower
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (xfce4/xfce4-weather-plugin-0.8.3.tar.bz2) = 40a6a22be7653b15a47174a430da89040f178695b48e5e01e77990050f715ce4
|
||||
SIZE (xfce4/xfce4-weather-plugin-0.8.3.tar.bz2) = 2786473
|
||||
SHA256 (xfce4/xfce4-weather-plugin-0.8.4.tar.bz2) = 56f6883f7b0e61e4fced57086dfb5a714afbb3d4ec33b1c433186c9a7d86fe3f
|
||||
SIZE (xfce4/xfce4-weather-plugin-0.8.4.tar.bz2) = 2910251
|
||||
|
@ -1,45 +0,0 @@
|
||||
--- configure.orig 2012-08-06 11:16:36.000000000 +0000
|
||||
+++ configure 2012-08-12 14:57:44.000000000 +0000
|
||||
@@ -14468,13 +14468,13 @@
|
||||
fi
|
||||
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
|
||||
-$as_echo_n "checking for res_query in -lresolv... " >&6; }
|
||||
-if ${ac_cv_lib_resolv_res_query+:} false; then :
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lc" >&5
|
||||
+$as_echo_n "checking for res_query in -lc... " >&6; }
|
||||
+if ${ac_cv_lib_c_res_query+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lresolv $LIBS"
|
||||
+LIBS="-lc $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -14494,18 +14494,18 @@
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
- ac_cv_lib_resolv_res_query=yes
|
||||
+ ac_cv_lib_c_res_query=yes
|
||||
else
|
||||
- ac_cv_lib_resolv_res_query=no
|
||||
+ ac_cv_lib_c_res_query=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
|
||||
-$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
|
||||
-if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
|
||||
- LIBRESOLV=-lresolv
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_res_query" >&5
|
||||
+$as_echo "$ac_cv_lib_c_res_query" >&6; }
|
||||
+if test "x$ac_cv_lib_c_res_query" = xyes; then :
|
||||
+ LIBRESOLV=-lc
|
||||
fi
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
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 <time.h>
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -1,95 +0,0 @@
|
||||
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)
|
@ -1,13 +0,0 @@
|
||||
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);
|
||||
|
@ -1,13 +0,0 @@
|
||||
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 */
|
@ -3,11 +3,13 @@ share/icons/hicolor/48x48/apps/xfce4-weather.png
|
||||
share/locale/ar/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ast/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/be/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/bg/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ca/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/cs/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/da/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/de/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/el/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/en_AU/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/en_GB/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/es/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/eu/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
@ -18,14 +20,17 @@ share/locale/he/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/hr/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/hu/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/id/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/is/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/it/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ja/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ko/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/lt/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/lv/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ms/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/nb/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/nl/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/nn/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/oc/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/pa/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/pl/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/pt/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
@ -36,6 +41,7 @@ share/locale/sq/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/sr/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/sv/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/te/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/th/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/tr/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/ug/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
share/locale/uk/LC_MESSAGES/xfce4-weather-plugin.mo
|
||||
|
Loading…
Reference in New Issue
Block a user