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

(-)Makefile (-2 / +3 lines)
Lines 1-13 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	ansiweather
3
PORTNAME=	ansiweather
4
PORTVERSION=	1.07
4
PORTVERSION=	1.08
5
CATEGORIES=	misc
5
CATEGORIES=	misc
6
6
7
MAINTAINER=	dbaio@bsd.com.br
7
MAINTAINER=	dbaio@bsd.com.br
8
COMMENT=	Shell script for displaying the current weather in your terminal
8
COMMENT=	Shell script for displaying the current weather in your terminal
9
9
10
LICENSE=	BSD3CLAUSE
10
LICENSE=	BSD2CLAUSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
11
12
12
RUN_DEPENDS=	jq:textproc/jq \
13
RUN_DEPENDS=	jq:textproc/jq \
13
		curl:ftp/curl \
14
		curl:ftp/curl \
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (fcambus-ansiweather-1.07_GH0.tar.gz) = f9b377b23ecc9c2d3567424b300b8e370eb0959c9b1cd0828ba07ce38f2ef0a0
1
TIMESTAMP = 1469537228
2
SIZE (fcambus-ansiweather-1.07_GH0.tar.gz) = 17041
2
SHA256 (fcambus-ansiweather-1.08_GH0.tar.gz) = 22dd814ef158df13b3fdbe72ca39e820874e710a4d341d1a2367aa771609665d
3
SIZE (fcambus-ansiweather-1.08_GH0.tar.gz) = 16991
(-)files/patch-ansiweather (-11 / +11 lines)
Lines 1-4 Link Here
1
--- ansiweather.orig	2016-01-19 22:01:25 UTC
1
--- ansiweather.orig	2016-07-26 11:16:31 UTC
2
+++ ansiweather
2
+++ ansiweather
3
@@ -66,7 +66,7 @@ done
3
@@ -66,7 +66,7 @@ done
4
 
4
 
Lines 7-15 Link Here
7
-	printf "%s\n" \
7
-	printf "%s\n" \
8
+	gprintf "%s\n" \
8
+	gprintf "%s\n" \
9
 		"" \
9
 		"" \
10
 		"AnsiWeather 1.07" \
10
 		"AnsiWeather 1.08" \
11
 		"Copyright (c) 2013-2016, Frederic Cambus" \
11
 		"Copyright (c) 2013-2016, Frederic Cambus" \
12
@@ -223,7 +223,7 @@ then
12
@@ -224,7 +224,7 @@ then
13
 	forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast")
13
 	forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast")
14
 else
14
 else
15
 	city=$(echo "$weather" | jq -r '.name')
15
 	city=$(echo "$weather" | jq -r '.name')
Lines 18-24 Link Here
18
 	humidity=$(echo "$weather" | jq '.main.humidity')
18
 	humidity=$(echo "$weather" | jq '.main.humidity')
19
 	pressure=$(echo "$weather" | jq '.main.pressure')
19
 	pressure=$(echo "$weather" | jq '.main.pressure')
20
 	sky=$(echo "$weather" | jq -r '.weather[0].main')
20
 	sky=$(echo "$weather" | jq -r '.weather[0].main')
21
@@ -303,7 +303,7 @@ case $units in
21
@@ -304,7 +304,7 @@ case $units in
22
 		scale="°C"
22
 		scale="°C"
23
 		speed_unit="m/s"
23
 		speed_unit="m/s"
24
 		pressure_unit="hPa"
24
 		pressure_unit="hPa"
Lines 27-33 Link Here
27
 		;;
27
 		;;
28
 	imperial)
28
 	imperial)
29
 		scale="°F"
29
 		scale="°F"
30
@@ -311,7 +311,7 @@ case $units in
30
@@ -312,7 +312,7 @@ case $units in
31
 		pressure_unit="inHg"
31
 		pressure_unit="inHg"
32
 		if [ "$forecast" = 0 ]
32
 		if [ "$forecast" = 0 ]
33
 		then
33
 		then
Lines 36-42 Link Here
36
 		fi
36
 		fi
37
 		;;
37
 		;;
38
 esac
38
 esac
39
@@ -367,8 +367,8 @@ then
39
@@ -368,8 +368,8 @@ then
40
 	do
40
 	do
41
 		day=$(echo "$weather" | jq ".list[$i]")
41
 		day=$(echo "$weather" | jq ".list[$i]")
42
 		date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')")
42
 		date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')")
Lines 47-59 Link Here
47
 
47
 
48
 		icon=""
48
 		icon=""
49
 		if [ "$symbols" = true ]
49
 		if [ "$symbols" = true ]
50
@@ -400,7 +400,7 @@ fi
50
@@ -401,7 +401,7 @@ fi
51
 
51
 
52
 if [ "$ansi" = true ]
52
 if [ "$ansi" = true ]
53
 then
53
 then
54
-	/usr/bin/printf "$output\033[0m\n"
54
-	env printf "$output\033[0m\n"
55
+	/usr/local/bin/gprintf "$output\033[0m\n"
55
+	env gprintf "$output\033[0m\n"
56
 else
56
 else
57
-	/usr/bin/printf "$output\n" | sed "s/$(printf '\033')\[[0-9;]*m//g"
57
-	env printf "$output\n" | sed "s/$(printf '\033')\[[0-9;]*m//g"
58
+	/usr/local/bin/gprintf "$output\n" | sed "s/$(gprintf '\033')\[[0-9;]*m//g"
58
+	env gprintf "$output\n" | sed "s/$(gprintf '\033')\[[0-9;]*m//g"
59
 fi
59
 fi

Return to bug 211384