From owner-svn-ports-all@freebsd.org Thu Sep 29 12:08:50 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6114DC02782; Thu, 29 Sep 2016 12:08:50 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3B48F959; Thu, 29 Sep 2016 12:08:50 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TC8nko079697; Thu, 29 Sep 2016 12:08:49 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TC8nPx079694; Thu, 29 Sep 2016 12:08:49 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201609291208.u8TC8nPx079694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Thu, 29 Sep 2016 12:08:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422914 - in head/net/libmateweather: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 12:08:50 -0000 Author: kwm Date: Thu Sep 29 12:08:49 2016 New Revision: 422914 URL: https://svnweb.freebsd.org/changeset/ports/422914 Log: Fix weather data fetching [1]. * Add license block * record missing dependencies * replace CPPFLAGS/LDFLAGS with USES=localbase PR: 212243 Submitted by: cpm@ Obtained from: libmateweather upstream [1] Added: head/net/libmateweather/files/ head/net/libmateweather/files/patch-libmateweather_weather-iwin.c (contents, props changed) head/net/libmateweather/files/patch-libmateweather_weather-metar.c (contents, props changed) Modified: head/net/libmateweather/Makefile Modified: head/net/libmateweather/Makefile ============================================================================== --- head/net/libmateweather/Makefile Thu Sep 29 11:57:14 2016 (r422913) +++ head/net/libmateweather/Makefile Thu Sep 29 12:08:49 2016 (r422914) @@ -3,6 +3,7 @@ PORTNAME= libmateweather PORTVERSION= 1.12.1 +PORTREVISION= 1 CATEGORIES= net mate MASTER_SITES= MATE DIST_SUBDIR= mate @@ -10,21 +11,24 @@ DIST_SUBDIR= mate 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= libsoup-2.4.so:devel/libsoup \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 PORTSCOUT= limitw:1,even -USES= gettext gmake libtool pathfix pkgconfig tar:xz -USE_GNOME= gtk20 libxml2 intlhack +USES= gettext gmake libtool localbase pathfix pkgconfig tar:xz +USE_GNOME= cairo gtk20 libxml2 intlhack USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-gtk-doc \ --with-gtk=2.0 \ --with-html-dir=${PREFIX}/share/doc INSTALLS_ICONS= yes -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib INSTALL_TARGET= install-strip GLIB_SCHEMAS= org.mate.weather.gschema.xml Added: head/net/libmateweather/files/patch-libmateweather_weather-iwin.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/libmateweather/files/patch-libmateweather_weather-iwin.c Thu Sep 29 12:08:49 2016 (r422914) @@ -0,0 +1,11 @@ +--- libmateweather/weather-iwin.c.orig 2016-09-29 14:03:12.143111000 +0200 ++++ libmateweather/weather-iwin.c 2016-09-29 14:03:35.883636000 +0200 +@@ -462,7 +462,7 @@ iwin_start_open (WeatherInfo *info) + zone = g_ascii_strdown (loc->zone, -1); + state = g_strndup (zone, 2); + +- url = g_strdup_printf ("http://weather.noaa.gov/pub/data/forecasts/zone/%s/%s.txt", state, zone); ++ url = g_strdup_printf ("http://tgftp.nws.noaa.gov/data/forecasts/zone/%s/%s.txt", state, zone); + + g_free (zone); + g_free (state); Added: head/net/libmateweather/files/patch-libmateweather_weather-metar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/libmateweather/files/patch-libmateweather_weather-metar.c Thu Sep 29 12:08:49 2016 (r422914) @@ -0,0 +1,39 @@ +--- libmateweather/weather-metar.c.orig 2016-09-29 14:03:25.503926000 +0200 ++++ libmateweather/weather-metar.c 2016-09-29 14:03:40.232655000 +0200 +@@ -510,7 +510,7 @@ metar_finish (SoupSession *session, Soup + + loc = info->location; + +- searchkey = g_strdup_printf ("\n%s", loc->code); ++ searchkey = g_strdup_printf ("%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); +