1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

- Update to version 1.08 [1]

- Update LICENSE and set LICENSE_FILE [1]
- Port is architecture neutral
- Split install target to conditional installation of files
  depending on options set

Changelog:
- Use env printf instead of hardcoding printf path
- Added a $forecast_text variable allowing to customize forecast text
- Relicensed under the BSD 2-Clause license

PR:		211384 [1]
Submitted by:	Danilo G. Baio (maintainer) [1]
This commit is contained in:
Pawel Pekala 2016-07-27 20:01:46 +00:00
parent c2507d99e8
commit 65ef97d294
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419195
3 changed files with 25 additions and 19 deletions

View File

@ -1,13 +1,14 @@
# $FreeBSD$
PORTNAME= ansiweather
PORTVERSION= 1.07
PORTVERSION= 1.08
CATEGORIES= misc
MAINTAINER= dbaio@bsd.com.br
COMMENT= Shell script for displaying the current weather in your terminal
LICENSE= BSD3CLAUSE
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= jq:textproc/jq \
curl:ftp/curl \
@ -18,6 +19,7 @@ USE_GITHUB= yes
GH_ACCOUNT= fcambus
NO_BUILD= yes
NO_ARCH= yes
SUB_FILES= pkg-message
@ -25,12 +27,15 @@ OPTIONS_DEFINE= DOCS EXAMPLES
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/ansiweather ${STAGEDIR}${PREFIX}/bin/ansiweather
${INSTALL_SCRIPT} ${WRKSRC}/ansiweather ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/ansiweather.plugin.zsh ${STAGEDIR}${DATADIR}
do-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/ansiweatherrc.example ${STAGEDIR}${EXAMPLESDIR}
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/AUTHORS ${STAGEDIR}${DOCSDIR}

View File

@ -1,2 +1,3 @@
SHA256 (fcambus-ansiweather-1.07_GH0.tar.gz) = f9b377b23ecc9c2d3567424b300b8e370eb0959c9b1cd0828ba07ce38f2ef0a0
SIZE (fcambus-ansiweather-1.07_GH0.tar.gz) = 17041
TIMESTAMP = 1469537228
SHA256 (fcambus-ansiweather-1.08_GH0.tar.gz) = 22dd814ef158df13b3fdbe72ca39e820874e710a4d341d1a2367aa771609665d
SIZE (fcambus-ansiweather-1.08_GH0.tar.gz) = 16991

View File

@ -1,4 +1,4 @@
--- ansiweather.orig 2016-01-19 22:01:25 UTC
--- ansiweather.orig 2016-07-26 11:16:31 UTC
+++ ansiweather
@@ -66,7 +66,7 @@ done
@ -7,9 +7,9 @@
- printf "%s\n" \
+ gprintf "%s\n" \
"" \
"AnsiWeather 1.07" \
"AnsiWeather 1.08" \
"Copyright (c) 2013-2016, Frederic Cambus" \
@@ -223,7 +223,7 @@ then
@@ -224,7 +224,7 @@ then
forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast")
else
city=$(echo "$weather" | jq -r '.name')
@ -18,7 +18,7 @@
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
@@ -304,7 +304,7 @@ case $units in
scale="°C"
speed_unit="m/s"
pressure_unit="hPa"
@ -27,7 +27,7 @@
;;
imperial)
scale="°F"
@@ -311,7 +311,7 @@ case $units in
@@ -312,7 +312,7 @@ case $units in
pressure_unit="inHg"
if [ "$forecast" = 0 ]
then
@ -36,7 +36,7 @@
fi
;;
esac
@@ -367,8 +367,8 @@ then
@@ -368,8 +368,8 @@ then
do
day=$(echo "$weather" | jq ".list[$i]")
date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')")
@ -47,13 +47,13 @@
icon=""
if [ "$symbols" = true ]
@@ -400,7 +400,7 @@ fi
@@ -401,7 +401,7 @@ fi
if [ "$ansi" = true ]
then
- /usr/bin/printf "$output\033[0m\n"
+ /usr/local/bin/gprintf "$output\033[0m\n"
- env printf "$output\033[0m\n"
+ env 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"
- env printf "$output\n" | sed "s/$(printf '\033')\[[0-9;]*m//g"
+ env gprintf "$output\n" | sed "s/$(gprintf '\033')\[[0-9;]*m//g"
fi