diff options
author | kamil <kamil> | 2016-02-28 13:33:58 +0000 |
---|---|---|
committer | kamil <kamil> | 2016-02-28 13:33:58 +0000 |
commit | 972c14373171052eb276f67227f88c86d161a49a (patch) | |
tree | 44d245c02e121a92f3fafca665b26cdbf69f86d2 /textproc | |
parent | 6901e5f399fc651999a5abdda222db5204a2921b (diff) | |
download | pkgsrc-972c14373171052eb276f67227f88c86d161a49a.tar.gz |
Import cmark-0.24.1 as textproc/cmark
cmark is the C reference implementation of CommonMark, a rationalized version
of Markdown syntax with a spec.
It provides a shared library (libcmark) with functions for parsing CommonMark
documents to an abstract syntax tree (AST), manipulating the AST, and rendering
the document to HTML, groff man, LaTeX, CommonMark, or an XML representation of
the AST. It also provides a command-line program (cmark) for parsing and
rendering CommonMark documents.
Originally packages in pkgsrc-wip/cmark by Kamil Rytarowski
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/cmark/DESCR | 8 | ||||
-rw-r--r-- | textproc/cmark/Makefile | 32 | ||||
-rw-r--r-- | textproc/cmark/PLIST | 11 | ||||
-rw-r--r-- | textproc/cmark/distinfo | 8 | ||||
-rw-r--r-- | textproc/cmark/patches/patch-man_CMakeLists.txt | 22 | ||||
-rw-r--r-- | textproc/cmark/patches/patch-src_commonmark.c | 19 |
6 files changed, 100 insertions, 0 deletions
diff --git a/textproc/cmark/DESCR b/textproc/cmark/DESCR new file mode 100644 index 00000000000..0f304edb12e --- /dev/null +++ b/textproc/cmark/DESCR @@ -0,0 +1,8 @@ +cmark is the C reference implementation of CommonMark, a rationalized version +of Markdown syntax with a spec. + +It provides a shared library (libcmark) with functions for parsing CommonMark +documents to an abstract syntax tree (AST), manipulating the AST, and rendering +the document to HTML, groff man, LaTeX, CommonMark, or an XML representation of +the AST. It also provides a command-line program (cmark) for parsing and +rendering CommonMark documents. diff --git a/textproc/cmark/Makefile b/textproc/cmark/Makefile new file mode 100644 index 00000000000..1552dd48368 --- /dev/null +++ b/textproc/cmark/Makefile @@ -0,0 +1,32 @@ +# $NetBSD: Makefile,v 1.1 2016/02/28 13:33:58 kamil Exp $ + +DISTNAME= cmark-0.24.1 +CATEGORIES= textproc +MASTER_SITES= ${MASTER_SITE_GITHUB:=jgm/} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= ${MASTER_SITE_GITHUB:=jgm/cmark/} +COMMENT= CommonMark parsing and rendering library and program in C +LICENSE= 2-clause-bsd + +USE_CMAKE= yes +USE_TOOLS+= pkg-config +USE_LANGUAGES= c c++ + +PYTHON_FOR_BUILD_ONLY= yes + +PYTHON_VERSIONS_INCOMPATIBLE= 27 + +PKGCONFIG_OVERRIDE+= src/libcmark.pc.in + +CONFIGURE_DIRS= ${WRKDIR}/build +CMAKE_ARG_PATH= ${WRKSRC} + +TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/src +TEST_TARGET= test + +post-extract: + ${RUN} mkdir -p ${WRKDIR}/build + +.include "../../lang/python/tool.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/cmark/PLIST b/textproc/cmark/PLIST new file mode 100644 index 00000000000..48257e17372 --- /dev/null +++ b/textproc/cmark/PLIST @@ -0,0 +1,11 @@ +@comment $NetBSD: PLIST,v 1.1 2016/02/28 13:33:58 kamil Exp $ +bin/cmark +include/cmark.h +include/cmark_export.h +include/cmark_version.h +lib/libcmark.a +lib/libcmark.so +lib/libcmark.so.${PKGVERSION} +lib/pkgconfig/libcmark.pc +man/man1/cmark.1 +man/man3/cmark.3 diff --git a/textproc/cmark/distinfo b/textproc/cmark/distinfo new file mode 100644 index 00000000000..3ca3767bfcd --- /dev/null +++ b/textproc/cmark/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2016/02/28 13:33:58 kamil Exp $ + +SHA1 (cmark-0.24.1.tar.gz) = bfd17ef9cae14a74a7b2d1c3f171ced3ce9a5c8a +RMD160 (cmark-0.24.1.tar.gz) = 70dbf24b47c9f9b8b4c8e2d55bcfa92d636056a6 +SHA512 (cmark-0.24.1.tar.gz) = ad6381b0a876472d85fa68e538caeebe3ee2f042c7cd479da1e025164f1ada7ee25ccbdb2d97cc2198de8c903950ba1648f39cef868f9c4f3ccd37db3c9c33b9 +Size (cmark-0.24.1.tar.gz) = 205568 bytes +SHA1 (patch-man_CMakeLists.txt) = 2b6e1ce1a7a95fb026d9344628be7b8583e6378d +SHA1 (patch-src_commonmark.c) = 1b60ecbeba5fa173264ff765730e66bde78a04c7 diff --git a/textproc/cmark/patches/patch-man_CMakeLists.txt b/textproc/cmark/patches/patch-man_CMakeLists.txt new file mode 100644 index 00000000000..b56aa3c6d74 --- /dev/null +++ b/textproc/cmark/patches/patch-man_CMakeLists.txt @@ -0,0 +1,22 @@ +$NetBSD: patch-man_CMakeLists.txt,v 1.1 2016/02/28 13:33:58 kamil Exp $ + +Patch accepted upstream. + +Fix installation of man-pages. + +--- man/CMakeLists.txt.orig 2016-01-18 05:53:29.000000000 +0000 ++++ man/CMakeLists.txt +@@ -1,8 +1,10 @@ + if (NOT MSVC) ++ ++include(GNUInstallDirs) ++ + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 +- DESTINATION share/man/man1) ++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3 +- DESTINATION share/man/man3) ++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) + endif(NOT MSVC) +- diff --git a/textproc/cmark/patches/patch-src_commonmark.c b/textproc/cmark/patches/patch-src_commonmark.c new file mode 100644 index 00000000000..0f3f42e6989 --- /dev/null +++ b/textproc/cmark/patches/patch-src_commonmark.c @@ -0,0 +1,19 @@ +$NetBSD: patch-src_commonmark.c,v 1.1 2016/02/28 13:33:58 kamil Exp $ + +Patch accepted upstream. + +Fix usage of ctype(3) functions. + +--- src/commonmark.c.orig 2016-01-18 05:53:29.000000000 +0000 ++++ src/commonmark.c +@@ -270,8 +270,8 @@ static int S_render_node(cmark_renderer + // begin or end with a blank line, and code isn't + // first thing in a list item + if (info_len == 0 && +- (code_len > 2 && !isspace(code[0]) && +- !(isspace(code[code_len - 1]) && isspace(code[code_len - 2]))) && ++ (code_len > 2 && !isspace((unsigned char)code[0]) && ++ !(isspace((unsigned char)code[code_len - 1]) && isspace((unsigned char)code[code_len - 2]))) && + !(node->prev == NULL && node->parent && + node->parent->type == CMARK_NODE_ITEM)) { + LIT(" "); |