aboutsummaryrefslogtreecommitdiffstats
path: root/x11/temperature.app
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-12-26 20:33:16 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-12-26 20:33:16 +0800
commitcb95a3614d0110540a88eab7f796e2b195e03fd2 (patch)
tree28983cd548df999db531ab2bf56d0800e8077bf3 /x11/temperature.app
parenta270b53de0e84bb4e11aadca40d2016107181d53 (diff)
downloadfreebsd-ports-gnome-cb95a3614d0110540a88eab7f796e2b195e03fd2.tar.gz
freebsd-ports-gnome-cb95a3614d0110540a88eab7f796e2b195e03fd2.tar.zst
freebsd-ports-gnome-cb95a3614d0110540a88eab7f796e2b195e03fd2.zip
- Fix wget argument, --cache=off -> --no-cache
- Fix execlp call, terminate argument list with NULL instead of 0 (otherwise execve returns EFAULT) - Fix data url, as the previous one was discontinued PR: 212126 Submitted by: manny@computer.org
Diffstat (limited to 'x11/temperature.app')
-rw-r--r--x11/temperature.app/Makefile2
-rw-r--r--x11/temperature.app/files/patch-Temperature.cc13
-rw-r--r--x11/temperature.app/files/patch-Temperature.h12
3 files changed, 21 insertions, 6 deletions
diff --git a/x11/temperature.app/Makefile b/x11/temperature.app/Makefile
index 3e7ff6015530..7b16ebeaf8d9 100644
--- a/x11/temperature.app/Makefile
+++ b/x11/temperature.app/Makefile
@@ -3,7 +3,7 @@
PORTNAME= temperature.app
PORTVERSION= 1.4
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11 windowmaker
MASTER_SITES= http://www.fukt.bsnet.se/~per/temperature/
DISTNAME= Temperature.app-${PORTVERSION}
diff --git a/x11/temperature.app/files/patch-Temperature.cc b/x11/temperature.app/files/patch-Temperature.cc
index 284da6e92735..9d2d5149d421 100644
--- a/x11/temperature.app/files/patch-Temperature.cc
+++ b/x11/temperature.app/files/patch-Temperature.cc
@@ -1,5 +1,5 @@
---- Temperature.cc.bak 2002-04-06 08:44:09.000000000 +0900
-+++ Temperature.cc 2013-12-07 17:25:30.000000000 +0900
+--- Temperature.cc.bak 2016-08-24 21:28:41.551324000 -0400
++++ Temperature.cc 2016-08-24 21:26:25.860220000 -0400
@@ -20,24 +20,29 @@
//
@@ -39,3 +39,12 @@
volatile static ChildStatus childStatus;
static void catchBrokenPipe(int sig)
+@@ -415,7 +420,7 @@
+ const char* verbose = (mVerbose ? "--verbose" : "--quiet");
+ char* URL = new char[strlen(METAR_URL) + strlen(mStationId) + 1];
+ sprintf(URL, METAR_URL, mStationId);
+- execlp("wget", "wget", "--cache=off", "--tries=0", verbose, "-O", tmpFile, URL, 0);
++ execlp("wget", "wget", "--no-cache", "--tries=0", verbose, "-O", tmpFile, URL, NULL);
+ cerr << APPNAME << ": could not fetch temperature (wget not found in $PATH)" << endl;
+ remove(tmpFile);
+ exit(0);
diff --git a/x11/temperature.app/files/patch-Temperature.h b/x11/temperature.app/files/patch-Temperature.h
index e42c0aff16df..22cbfbe6f9f5 100644
--- a/x11/temperature.app/files/patch-Temperature.h
+++ b/x11/temperature.app/files/patch-Temperature.h
@@ -1,6 +1,6 @@
---- Temperature.h.bak 2002-04-06 08:44:17.000000000 +0900
-+++ Temperature.h 2013-12-07 17:24:28.000000000 +0900
-@@ -22,9 +22,11 @@
+--- Temperature.h.bak 2016-08-24 21:28:32.665119000 -0400
++++ Temperature.h 2016-08-24 21:26:20.577933000 -0400
+@@ -22,14 +22,16 @@
#ifndef _TEMPERATURE_H_
#define _TEMPERATURE_H_
@@ -13,3 +13,9 @@
#define APPNAME "Temperature.app"
#define VERSION "1.4"
#define INSTANCENAME "temperature_app"
+ #define CLASSNAME "Temperature_app"
+-#define METAR_URL "http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT"
++#define METAR_URL "ftp://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT"
+ #define UPDATE_INTERVAL 900
+ #define TIME_POS 22
+ #define TEMP_POS 35