diff options
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/py-misaka/Makefile | 31 | ||||
-rw-r--r-- | textproc/py-misaka/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-misaka/files/patch-tests_utils.py | 15 | ||||
-rw-r--r-- | textproc/py-misaka/pkg-descr | 5 |
5 files changed, 55 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index 699fe81de823..0198354d47b9 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1299,6 +1299,7 @@ SUBDIR += py-markdown-math SUBDIR += py-markdown2 SUBDIR += py-markups + SUBDIR += py-misaka SUBDIR += py-mistune SUBDIR += py-mkdocs SUBDIR += py-mkdocs-nature diff --git a/textproc/py-misaka/Makefile b/textproc/py-misaka/Makefile new file mode 100644 index 000000000000..ffc24b91fe70 --- /dev/null +++ b/textproc/py-misaka/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PORTNAME= misaka +PORTVERSION= 2.1.1 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= CFFI binding for Hoedown, a markdown parsing library + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR} +TEST_DEPENDS= tidy5:www/tidy-html5 + +# Actually 2.7,3.4+ +USES= python +USE_PYTHON= autoplist concurrent distutils + +PYDISTUTILS_BUILDARGS= build_ext -i + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/misaka/*.so + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} tests/run_tests.py + +.include <bsd.port.mk> diff --git a/textproc/py-misaka/distinfo b/textproc/py-misaka/distinfo new file mode 100644 index 000000000000..6b34d9c15170 --- /dev/null +++ b/textproc/py-misaka/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1567764366 +SHA256 (misaka-2.1.1.tar.gz) = 62f35254550095d899fc2ab8b33e156fc5e674176f074959cbca43cf7912ecd7 +SIZE (misaka-2.1.1.tar.gz) = 125187 diff --git a/textproc/py-misaka/files/patch-tests_utils.py b/textproc/py-misaka/files/patch-tests_utils.py new file mode 100644 index 000000000000..a9c9d5209ca8 --- /dev/null +++ b/textproc/py-misaka/files/patch-tests_utils.py @@ -0,0 +1,15 @@ +# textproc/html5-tidy doesn't provide a 'tidy' binary +# and BINARY_ALIAS doesn't work at test: time +# TODO: Ask upstream to support a TIDY_BIN variable + +--- tests/utils.py.orig 2019-09-06 11:18:46 UTC ++++ tests/utils.py +@@ -5,7 +5,7 @@ from subprocess import Popen, PIPE, STDOUT + + def clean_html(dirty_html): + input_html = dirty_html.encode('utf-8') +- p = Popen(['tidy', '--show-body-only', '1', '--quiet', '1', '--show-warnings', '0', '-utf8'], ++ p = Popen(['tidy5', '--show-body-only', '1', '--quiet', '1', '--show-warnings', '0', '-utf8'], + stdout=PIPE, stdin=PIPE, stderr=STDOUT) + stdout, stderr = p.communicate(input=input_html) + diff --git a/textproc/py-misaka/pkg-descr b/textproc/py-misaka/pkg-descr new file mode 100644 index 000000000000..508f3ba6728a --- /dev/null +++ b/textproc/py-misaka/pkg-descr @@ -0,0 +1,5 @@ +Misaka is a CFFI-based binding for Hoedown, a fast markdown processing +library written in C. It features a fast HTML renderer and functionality +to make custom renderers (e.g. man pages or LaTeX). + +WWW: https://github.com/FSX/misaka |