textproc/jshon: Update to 20170302.1

- Take over MAINTAINER'ship.
- Sort variables.
- Remove the COMMIT_HASH variable. Use only GH_TAGNAME instead.
- Add ZSH to OPTIONS_DEFAULT as suggested by the handbook.
- Do not strip in post-install since INSTALL_PROGRAM is already used in
  do-install.
- Improve pkg-descr.

Reviewed by:	krion
Approved by:	krion (mentor)
Differential Revision:	https://reviews.freebsd.org/D18422
This commit is contained in:
Mateusz Piotrowski 2018-12-03 17:38:16 +00:00
parent cf6d28637b
commit bf6ac4b88b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=486525
3 changed files with 24 additions and 17 deletions

View File

@ -1,10 +1,10 @@
# $FreeBSD$
PORTNAME= jshon
DISTVERSION= 20160111.2
DISTVERSION= 20170302.1
CATEGORIES= textproc
MAINTAINER= ports@FreeBSD.org
MAINTAINER= 0mp@FreeBSD.org
COMMENT= JSON parser for the shell
LICENSE= MIT
@ -12,25 +12,23 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libjansson.so:devel/jansson
COMMIT_HASH= 783d3bf
GH_TAGNAME= ${COMMIT_HASH}
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= keenerd
OPTIONS_DEFINE= ZSH
OPTIONS_DEFAULT=
GH_TAGNAME= d919aea
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/jshon man/man1/jshon.1.gz
OPTIONS_DEFINE= ZSH
OPTIONS_DEFAULT=ZSH
ZSH_PLIST_FILES= share/zsh/site-functions/jshon_zsh_completion
pre-configure:
@${REINPLACE_CMD} -e 's|^\(#define JSHONVER \).*|\1"${PORTVERSION}-${COMMIT_HASH}"|' \
@${REINPLACE_CMD} -e 's|^\(#define JSHONVER \).*|\1"${PORTVERSION}-${GH_TAGNAME}"|' \
-e 's|\({printf("%\)i\(\\n", JSHONVER); exit(0);}\)|\1s\2|' \
${WRKSRC}/jshon.c
@ -38,9 +36,6 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
post-install-ZSH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/jshon_zsh_completion ${STAGEDIR}${PREFIX}/share/zsh/site-functions/

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1509170073
SHA256 (keenerd-jshon-20160111.2-783d3bf_GH0.tar.gz) = b50bcab22ff609bf54b09f580b2882a5aa2c1882205b6914d766495e2d4765e8
SIZE (keenerd-jshon-20160111.2-783d3bf_GH0.tar.gz) = 14123
TIMESTAMP = 1543855297
SHA256 (keenerd-jshon-20170302.1-d919aea_GH0.tar.gz) = a14521b9a0bf06e48949d6bd233403b754a8ac47b08f37244e589c34d8a4db0f
SIZE (keenerd-jshon-20170302.1-d919aea_GH0.tar.gz) = 14126

View File

@ -1,6 +1,18 @@
jshon parses, reads and creates JSON. It is designed to be as usable as
possible from within the shell and replaces fragile adhoc parsers made
Jshon parses, reads and creates JSON. It is designed to be as usable as
possible from within the shell and replaces fragile ad hoc parsers made
from grep/sed/awk as well as heavyweight one-line parsers made from
perl/python.
Jshon loads JSON text from stdin, performs actions, then displays the last
action on stdout. Some of the options output JSON, others output plain text
meta information. Because Bash has very poor nested data structures, Jshon does
not try to return a native bash data structure as a typical library would.
Instead, Jshon provides a history stack containing all the manipulations.
The big change in the latest release is switching the everything from
pass-by-value to pass-by-reference. In a typical use case (processing AUR
search results for 'python') by-ref is twice as fast and uses one sixth the
memory. If you are editing JSON, by-ref also makes your life a lot easier as
modifications do not need to be manually inserted through the entire stack.
WWW: http://kmkeen.com/jshon/