Date: Wed, 24 Feb 2016 01:05:40 +0000 (UTC) From: Wen Heping <wen@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409449 - in head/misc/ansiweather: . files Message-ID: <201602240105.u1O15e1g005355@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wen Date: Wed Feb 24 01:05:40 2016 New Revision: 409449 URL: https://svnweb.freebsd.org/changeset/ports/409449 Log: - Update to 1.07 PR: 207403 Submitted by: dereckson@espace-win.org Approved by: maintainer Modified: head/misc/ansiweather/Makefile head/misc/ansiweather/distinfo head/misc/ansiweather/files/patch-ansiweather Modified: head/misc/ansiweather/Makefile ============================================================================== --- head/misc/ansiweather/Makefile Wed Feb 24 00:16:39 2016 (r409448) +++ head/misc/ansiweather/Makefile Wed Feb 24 01:05:40 2016 (r409449) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= ansiweather -PORTVERSION= 1.02 +PORTVERSION= 1.07 CATEGORIES= misc MAINTAINER= dbaio@bsd.com.br Modified: head/misc/ansiweather/distinfo ============================================================================== --- head/misc/ansiweather/distinfo Wed Feb 24 00:16:39 2016 (r409448) +++ head/misc/ansiweather/distinfo Wed Feb 24 01:05:40 2016 (r409449) @@ -1,2 +1,2 @@ -SHA256 (fcambus-ansiweather-1.02_GH0.tar.gz) = 6b65ba86a0a3af7ac0fbfea3c0e871371c519d0fafd79e4a517909128bf7ca5f -SIZE (fcambus-ansiweather-1.02_GH0.tar.gz) = 5763 +SHA256 (fcambus-ansiweather-1.07_GH0.tar.gz) = f9b377b23ecc9c2d3567424b300b8e370eb0959c9b1cd0828ba07ce38f2ef0a0 +SIZE (fcambus-ansiweather-1.07_GH0.tar.gz) = 17041 Modified: head/misc/ansiweather/files/patch-ansiweather ============================================================================== --- head/misc/ansiweather/files/patch-ansiweather Wed Feb 24 00:16:39 2016 (r409448) +++ head/misc/ansiweather/files/patch-ansiweather Wed Feb 24 01:05:40 2016 (r409449) @@ -1,38 +1,59 @@ ---- ansiweather.orig 2015-07-03 01:51:59 UTC +--- ansiweather.orig 2016-01-19 22:01:25 UTC +++ ansiweather -@@ -203,8 +203,8 @@ then - do - days+=("$(echo $weather | jq ".list[$i]")") - dates+=("$(epoch_to_date $(echo ${days[$i]} | jq -r '.dt'))") -- lows+=("$(printf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.min'))") -- highs+=("$(printf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.max'))") -+ lows+=("$(gprintf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.min'))") -+ highs+=("$(gprintf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.max'))") - humidity+=("$(echo ${days[$i]} | jq -r '.humidity')") - pressure+=("$(echo ${days[$i]} | jq -r '.pressure')") - sky+=("$(echo ${days[$i]} | jq -r '.weather[0].main')") -@@ -213,7 +213,7 @@ then - done +@@ -66,7 +66,7 @@ done + + if [ "$usage" = true ] + then +- printf "%s\n" \ ++ gprintf "%s\n" \ + "" \ + "AnsiWeather 1.07" \ + "Copyright (c) 2013-2016, Frederic Cambus" \ +@@ -223,7 +223,7 @@ then + forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast") else - city=$(echo $weather | jq -r '.name') -- temperature=$(printf '%.0f' $(echo $weather | jq '.main.temp')) -+ temperature=$(gprintf '%.0f' $(echo $weather | jq '.main.temp')) - humidity=$(echo $weather | jq '.main.humidity') - pressure=$(echo $weather | jq '.main.pressure') - sky=$(echo $weather | jq -r '.weather[0].main') -@@ -293,13 +293,13 @@ case $units in + city=$(echo "$weather" | jq -r '.name') +- temperature=$(echo "$weather" | jq '.main.temp' | xargs printf "%.0f") ++ temperature=$(echo "$weather" | jq '.main.temp' | xargs gprintf "%.0f") + humidity=$(echo "$weather" | jq '.main.humidity') + pressure=$(echo "$weather" | jq '.main.pressure') + sky=$(echo "$weather" | jq -r '.weather[0].main') +@@ -303,7 +303,7 @@ case $units in scale="°C" speed_unit="m/s" pressure_unit="hPa" -- pressure=$(printf '%.0f' $pressure) -+ pressure=$(gprintf '%.0f' $pressure) +- pressure=$(echo "$pressure" | xargs printf "%.0f") ++ pressure=$(echo "$pressure" | xargs gprintf "%.0f") ;; imperial) scale="°F" - speed_unit="mph" +@@ -311,7 +311,7 @@ case $units in pressure_unit="inHg" -- pressure=$(printf '%.2f' $(echo "$pressure*0.0295" | bc)) -+ pressure=$(gprintf '%.2f' $(echo "$pressure*0.0295" | bc)) + if [ "$forecast" = 0 ] + then +- pressure=$(echo "$pressure*0.0295" | bc | xargs printf "%.2f") ++ pressure=$(echo "$pressure*0.0295" | bc | xargs gprintf "%.2f") + fi ;; esac +@@ -367,8 +367,8 @@ then + do + day=$(echo "$weather" | jq ".list[$i]") + date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')") +- low=$(echo "$day" | jq -r '.temp.min' | xargs printf "%.0f") +- high=$(echo "$day" | jq -r '.temp.max' | xargs printf "%.0f") ++ low=$(echo "$day" | jq -r '.temp.min' | xargs gprintf "%.0f") ++ high=$(echo "$day" | jq -r '.temp.max' | xargs gprintf "%.0f") + icon="" + if [ "$symbols" = true ] +@@ -400,7 +400,7 @@ fi + + if [ "$ansi" = true ] + then +- /usr/bin/printf "$output\033[0m\n" ++ /usr/local/bin/gprintf "$output\033[0m\n" + else +- /usr/bin/printf "$output\n" | sed "s/$(printf '\033')\[[0-9;]*m//g" ++ /usr/local/bin/gprintf "$output\n" | sed "s/$(gprintf '\033')\[[0-9;]*m//g" + fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602240105.u1O15e1g005355>