svn commit: r536352 - in head/textproc: . py-jc py-jc/files
Emanuel Haupt
ehaupt at FreeBSD.org
Sat May 23 21:13:47 UTC 2020
Author: ehaupt
Date: Sat May 23 21:13:46 2020
New Revision: 536352
URL: https://svnweb.freebsd.org/changeset/ports/536352
Log:
JSONifies the output of many CLI tools and file-types
for easier parsing in scripts.
WWW: https://pypi.python.org/pypi/jc
PR: 246679
Submitted by: vulcan at wired.sh
Added:
head/textproc/py-jc/
head/textproc/py-jc/Makefile (contents, props changed)
head/textproc/py-jc/distinfo (contents, props changed)
head/textproc/py-jc/files/
head/textproc/py-jc/files/patch-jc_utils.py (contents, props changed)
head/textproc/py-jc/pkg-descr (contents, props changed)
Modified:
head/textproc/Makefile
Modified: head/textproc/Makefile
==============================================================================
--- head/textproc/Makefile Sat May 23 21:07:57 2020 (r536351)
+++ head/textproc/Makefile Sat May 23 21:13:46 2020 (r536352)
@@ -1264,6 +1264,7 @@
SUBDIR += py-isbnlib
SUBDIR += py-isbntools
SUBDIR += py-iso-639
+ SUBDIR += py-jc
SUBDIR += py-jinja2-cli
SUBDIR += py-jsonslicer
SUBDIR += py-jsx-lexer
Added: head/textproc/py-jc/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/py-jc/Makefile Sat May 23 21:13:46 2020 (r536352)
@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+PORTNAME= jc
+DISTVERSION= 1.11.0
+CATEGORIES= textproc python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= vulcan at wired.sh
+COMMENT= Converts output of popular command-line tools and file-types to JSON
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>=2.4.2:textproc/py-pygments@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.0:devel/py-ruamel.yaml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.12.0:devel/py-xmltodict@${PY_FLAVOR}
+
+USES= python:3.6+
+USE_PYTHON= autoplist distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
Added: head/textproc/py-jc/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/py-jc/distinfo Sat May 23 21:13:46 2020 (r536352)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1590246208
+SHA256 (jc-1.11.0.tar.gz) = b754e3e34b0b29db629d4340a13e09f4f50f74a932ba0a5203d42bfbd49f46a4
+SIZE (jc-1.11.0.tar.gz) = 86873
Added: head/textproc/py-jc/files/patch-jc_utils.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/py-jc/files/patch-jc_utils.py Sat May 23 21:13:46 2020 (r536352)
@@ -0,0 +1,26 @@
+Platform check fails as sys.platform returns 'freebsd' plus
+the release version e.g., 'freebsd12' and so forth where the string
+'freebsd' is only listed as compatible.
+
+--- jc/utils.py.orig 2020-05-23 14:53:34 UTC
++++ jc/utils.py
+@@ -1,8 +1,8 @@
+ """jc - JSON CLI output utility utils"""
+ import textwrap
+ import sys
++import re
+
+-
+ def warning_message(message):
+ """
+ Prints a warning message for non-fatal issues
+@@ -56,7 +56,8 @@ def compatibility(mod_name, compatible):
+
+ no return, just prints output to STDERR
+ """
+- if sys.platform not in compatible:
++ platform = re.sub(r'\d+', '', sys.platform)
++ if platform not in compatible:
+ mod = mod_name.split('.')[-1]
+ compat_list = ', '.join(compatible)
+ warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n Compatible platforms: {compat_list}')
Added: head/textproc/py-jc/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/py-jc/pkg-descr Sat May 23 21:13:46 2020 (r536352)
@@ -0,0 +1,4 @@
+JSONifies the output of many CLI tools and file-types
+for easier parsing in scripts.
+
+WWW: https://pypi.python.org/pypi/jc
More information about the svn-ports-all
mailing list