1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

[NEW] textproc/misaka: CFFI binding for Hoedown, a markdown parsing library

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
This commit is contained in:
Kubilay Kocak 2019-09-06 11:55:56 +00:00
parent b90199844d
commit 3836fd5bf9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511307
5 changed files with 55 additions and 0 deletions

View File

@ -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

View File

@ -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>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1567764366
SHA256 (misaka-2.1.1.tar.gz) = 62f35254550095d899fc2ab8b33e156fc5e674176f074959cbca43cf7912ecd7
SIZE (misaka-2.1.1.tar.gz) = 125187

View File

@ -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)

View File

@ -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