View | Details | Raw Unified | Return to bug 212243
Collapse All | Expand All

(-)net/libmateweather/Makefile (-2 / +8 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	libmateweather
4
PORTNAME=	libmateweather
5
PORTVERSION=	1.12.1
5
PORTVERSION=	1.12.1
6
PORTREVISION=	1
6
CATEGORIES=	net mate
7
CATEGORIES=	net mate
7
MASTER_SITES=	MATE
8
MASTER_SITES=	MATE
8
DIST_SUBDIR=	mate
9
DIST_SUBDIR=	mate
Lines 10-22 Link Here
10
MAINTAINER=	gnome@FreeBSD.org
11
MAINTAINER=	gnome@FreeBSD.org
11
COMMENT=	Library to accessing online weather informations
12
COMMENT=	Library to accessing online weather informations
12
13
14
LICENSE=	LGPL21
15
LICENSE_FILE=	${WRKSRC}/COPYING
16
13
BUILD_DEPENDS=	itstool:textproc/itstool
17
BUILD_DEPENDS=	itstool:textproc/itstool
14
LIB_DEPENDS=	libsoup-2.4.so:devel/libsoup
18
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
19
		libfreetype.so:print/freetype2 \
20
		libsoup-2.4.so:devel/libsoup
15
21
16
PORTSCOUT=	limitw:1,even
22
PORTSCOUT=	limitw:1,even
17
23
18
USES=		gettext gmake libtool pathfix pkgconfig tar:xz
24
USES=		gettext gmake libtool pathfix pkgconfig tar:xz
19
USE_GNOME=	gtk20 libxml2 intlhack
25
USE_GNOME=	cairo gtk20 libxml2 intlhack
20
USE_LDCONFIG=	yes
26
USE_LDCONFIG=	yes
21
GNU_CONFIGURE=	yes
27
GNU_CONFIGURE=	yes
22
CONFIGURE_ARGS=	--disable-gtk-doc \
28
CONFIGURE_ARGS=	--disable-gtk-doc \
(-)net/libmateweather/files/patch-libmateweather_weather-metar.c (+39 lines)
Line 0 Link Here
1
--- libmateweather/weather-metar.c.orig	2016-08-29 15:53:19 UTC
2
+++ libmateweather/weather-metar.c
3
@@ -510,7 +510,7 @@ metar_finish (SoupSession *session, Soup
4
 
5
     loc = info->location;
6
 
7
-    searchkey = g_strdup_printf ("\n%s", loc->code);
8
+    searchkey = g_strdup_printf ("<raw_text>%s", loc->code);
9
     p = strstr (msg->response_body->data, searchkey);
10
     g_free (searchkey);
11
     if (p) {
12
@@ -522,8 +522,8 @@ metar_finish (SoupSession *session, Soup
13
 	    metar = g_strdup (p);
14
 	success = metar_parse (metar, info);
15
 	g_free (metar);
16
-    } else if (!strstr (msg->response_body->data, "National Weather Service")) {
17
-	/* The response doesn't even seem to have come from NWS...
18
+    } else if (!strstr (msg->response_body->data, "aviationweather.gov")) {
19
+	/* The response doesn't even seem to have come from NOAA...
20
 	 * most likely it is a wifi hotspot login page. Call that a
21
 	 * network error.
22
 	 */
23
@@ -550,8 +550,14 @@ metar_start_open (WeatherInfo *info)
24
     }
25
 
26
     msg = soup_form_request_new (
27
-	"GET", "http://weather.noaa.gov/mgetmetar.php",
28
-	"cccc", loc->code,
29
+	"GET", "https://www.aviationweather.gov/adds/dataserver_current/httpparam",
30
+        "dataSource", "metars",
31
+          "requestType", "retrieve",
32
+          "format", "xml",
33
+          "hoursBeforeNow", "3",
34
+          "mostRecent", "true",
35
+          "fields", "raw_text",
36
+	  "stationString", loc->code,
37
 	NULL);
38
     soup_session_queue_message (info->session, msg, metar_finish, info);
39
 

Return to bug 212243