FreeBSD Bugzilla – Attachment 174195 Details for
Bug 212243
net/libmateweather: fix METAR functionality
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-fix-metar-functionality
libmateweather-fix-metar-functionality.diff (text/plain), 3.09 KB, created by
Carlos J. Puga Medina
on 2016-08-29 16:23:20 UTC
(
hide
)
Description:
patch-fix-metar-functionality
Filename:
MIME Type:
Creator:
Carlos J. Puga Medina
Created:
2016-08-29 16:23:20 UTC
Size:
3.09 KB
patch
obsolete
>Index: net/libmateweather/Makefile >=================================================================== >--- net/libmateweather/Makefile (revision 421037) >+++ net/libmateweather/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= libmateweather > PORTVERSION= 1.12.1 >+PORTREVISION= 1 > CATEGORIES= net mate > MASTER_SITES= MATE > DIST_SUBDIR= mate >@@ -10,13 +11,18 @@ > MAINTAINER= gnome@FreeBSD.org > COMMENT= Library to accessing online weather informations > >+LICENSE= LGPL21 >+LICENSE_FILE= ${WRKSRC}/COPYING >+ > BUILD_DEPENDS= itstool:textproc/itstool >-LIB_DEPENDS= libsoup-2.4.so:devel/libsoup >+LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ >+ libfreetype.so:print/freetype2 \ >+ libsoup-2.4.so:devel/libsoup > > PORTSCOUT= limitw:1,even > > USES= gettext gmake libtool pathfix pkgconfig tar:xz >-USE_GNOME= gtk20 libxml2 intlhack >+USE_GNOME= cairo gtk20 libxml2 intlhack > USE_LDCONFIG= yes > GNU_CONFIGURE= yes > CONFIGURE_ARGS= --disable-gtk-doc \ >Index: net/libmateweather/files/patch-libmateweather_weather-metar.c >=================================================================== >--- net/libmateweather/files/patch-libmateweather_weather-metar.c (nonexistent) >+++ net/libmateweather/files/patch-libmateweather_weather-metar.c (working copy) >@@ -0,0 +1,39 @@ >+--- libmateweather/weather-metar.c.orig 2016-08-29 15:53:19 UTC >++++ libmateweather/weather-metar.c >+@@ -510,7 +510,7 @@ metar_finish (SoupSession *session, Soup >+ >+ loc = info->location; >+ >+- searchkey = g_strdup_printf ("\n%s", loc->code); >++ searchkey = g_strdup_printf ("<raw_text>%s", loc->code); >+ p = strstr (msg->response_body->data, searchkey); >+ g_free (searchkey); >+ if (p) { >+@@ -522,8 +522,8 @@ metar_finish (SoupSession *session, Soup >+ metar = g_strdup (p); >+ success = metar_parse (metar, info); >+ g_free (metar); >+- } else if (!strstr (msg->response_body->data, "National Weather Service")) { >+- /* The response doesn't even seem to have come from NWS... >++ } else if (!strstr (msg->response_body->data, "aviationweather.gov")) { >++ /* The response doesn't even seem to have come from NOAA... >+ * most likely it is a wifi hotspot login page. Call that a >+ * network error. >+ */ >+@@ -550,8 +550,14 @@ metar_start_open (WeatherInfo *info) >+ } >+ >+ msg = soup_form_request_new ( >+- "GET", "http://weather.noaa.gov/mgetmetar.php", >+- "cccc", loc->code, >++ "GET", "https://www.aviationweather.gov/adds/dataserver_current/httpparam", >++ "dataSource", "metars", >++ "requestType", "retrieve", >++ "format", "xml", >++ "hoursBeforeNow", "3", >++ "mostRecent", "true", >++ "fields", "raw_text", >++ "stationString", loc->code, >+ NULL); >+ soup_session_queue_message (info->session, msg, metar_finish, info); >+ > >Property changes on: net/libmateweather/files/patch-libmateweather_weather-metar.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cpm
:
maintainer-approval?
(
gnome
)
Actions:
View
|
Diff
Attachments on
bug 212243
: 174195