pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/cmark



Module Name:    pkgsrc
Committed By:   adam
Date:           Sat Jul 17 16:29:31 UTC 2021

Modified Files:
        pkgsrc/textproc/cmark: Makefile PLIST distinfo
        pkgsrc/textproc/cmark/patches: patch-src_CMakeLists.txt

Log Message:
cmark: updated to 0.30.1

[0.30.1]

  * Properly indent block-level contents of list items in man.
    This handles nested lists as well as items with multiple paragraphs.
    The change requires addition of a new field block_number_in_list_item
    to cmark_renderer, but this does not change the public API.
  * Fix quadratic behavior when parsing emphasis (Nick
    Wellnhofer).  Delimiters can be deleted, so store delimiter positions
    instead of pointers in `openers_bottom`. Besides causing undefined
    behavior when reading a dangling pointer, this could also result
    in quadratic behavior when parsing emphasis.
  * Fix quadratic behavior when parsing smart quotes (Nick Wellnhofer).
    Remove matching smart quote delimiters.  Otherwise, the same opener
    could be found over and over, preventing the `openers_bottom`
    optimization from kicking in and leading to quadratic behavior when
    processing lots of quotes.
  * Modify CMake configuration so that the project can be built with
    older versions of CMake (Saleem Abdulrasool).  (In 0.30.0,
    some features were used that require CMake >= 3.3.) The cost of this
    backwards compatibility is that developers must now explicitly invoke
    `cmark_add_compile_options` when a new compilation target is added.
  * Remove a comma at the end of an enumerator list, which was flagged
    by clang as a C++11 extension.
  * make_man_page.py: use absolute path with CDLL. This avoids the error
    "file system relative paths not allowed in hardened programs."
  * Include cmark version in cmark(3) man page (instead of LOCAL).

[0.30.0]

  * Use official 0.30 spec.txt.
  * Add `cmark_get_default_mem_allocator()`.  API change: this
    adds a new exported function in cmark.h.
  * An optimization we used for emphasis parsing was
    too aggressive, causing us to miss some emphasis that was legal
    according to the spec.  We fix this by indexing the `openers_bottom`
    table not just by the type of delimiter and the length of the
    closing delimiter mod 3, but by whether the closing delimiter
    can also be an opener.  (The algorithm for determining emphasis
    matching depends on all these factors.)  Add regression test.
  * Fix quadratic behavior with inline HTML (Nick Wellnhofer).
    Repeated starting sequences like `<?`, `<!DECL ` or `<![CDATA[` could
    lead to quadratic behavior if no matching ending sequence was found.
    Separate the inline HTML scanners. Remember if scanning the whole input
    for a specific ending sequence failed and skip subsequent scans.
  * Speed up hierarchy check in tree manipulation API (Nick Wellnhofer).
    Skip hierarchy check in the common case that the inserted child has
    no children.
  * Fix quadratic behavior when parsing inlines (Nick Wellnhofer).
    The inline parsing code would call `cmark_node_append_child` to append
    nodes. This public function has a sanity check which is linear in the
    depth of the tree. Repeated calls could show quadratic behavior in
    degenerate trees. Use a special function to append nodes without this
    check.  (Issue found by OSS-Fuzz.)
  * Replace invalid characters in XML output (Nick wellnhofer).
    Control characters, U+FFFE and U+FFFF aren't allowed in XML 1.0, so
    replace them with U+FFFD (replacement character). This doesn't solve
    the problem how to roundtrip these characters, but at least we don't
    produce invalid XML.
  * Avoid quadratic output growth with reference links (Nick Wellnhofer).
    Keep track of the number bytes added through expansion of reference
    links and limit the total to the size of the input document. Always
    allow a minimum of 100KB.  Unfortunately, cmark has no error handling,
    so all we can do is to stop expanding reference links without returning
    an error. This should never be an issue in practice though. The 100KB
    minimum alone should cover all real-world cases.
  * Fix issue with type-7 HTML blocks interrupting paragraphs
    (see commonmark/commonmark.js).
  * Treat `textarea` like `script`, `style`, `pre` (type 1 HTML block),
    in accordance with spec change.
  * Define whitespace per spec (Asherah Conor).
  * Add `MAX_INDENT` for xml.  Otherwise we can get quadratic
    increase in size with deeply nested structures.
  * Fix handling of empty strings when creating XML/HTML output
    (Steffen Kieß).
  * Commonmark renderer: always use fences for code.
    This solves problems with adjacent code blocks being merged.
  * Improve rendering of commonmark code spans with spaces.
  * Cleaner approach to max digits for numeric entities.
    This modifies unescaping in `houdini_html_u.c` rather than
    the entity handling in `inlines.c`.  Unlike the other,
    this approach works also in e.g. link titles.
  * Fix entity parser (and api test) to respect length limit on
    numeric entities.
  * Don't allow link destinations with unbalanced unescaped parentheses.
    See commonmark/commonmark.js.
  * `print_usage()`: Minor grammar fix, swap two words (Øyvind A. Holm).
  * Don't call `memcpy` with `NULL` as first parameter.
    This is illegal according to the C standard, sec. 7.1.4.
    See <https://www.imperialviolet.org/2016/06/26/nonnull.html>.
  * Add needed include in `blocks.c`.
  * Fix unnecessary variable assignment.
  * Skip UTF-8 BOM if present at beginning of buffer.
  * Fix URL check in `is_autolink` (Nick Wellnhofer).  In a recent commit,
    the check was changed to `strcmp`, but we really have to use `strncmp`.
  * Fix null pointer deref in `is_autolink` (Nick Wellnhofer).
    Introduced by a recent commit. Found by OSS-Fuzz.
  * Rearrange struct cmark_node (Nick Wellnhofer).  Introduce multi-purpose
    data/len members in struct cmark_node. This is mainly used to store
    literal text for inlines, code and HTML blocks.
    Move the content strbuf for blocks from `cmark_node` to `cmark_parser`.
    When finalizing nodes that allow inlines (paragraphs and headings),
    detach the strbuf and store the block content in the node's data/len
    members. Free the block content after processing inlines.
    Reduces size of struct `cmark_node` by 8 bytes.
  * Improve packing of `struct cmark_list` (Nick Wellnhofer).
  * Use C string instead of chunk in a number of contexts (Nick Wellnhofer).
    The node struct never references memory of other nodes now.
    Node accessors don't have to check for delayed creation of C strings,
    so parsing and iterating all literals using the public API should
    actually be faster than before.  These changes also reduce the size
    of `struct cmark_node`.
  * Add casts for MSVC10 (from kivikakk in cmark-cfm).
  * commonmark renderer:  better escaping in smart mode.  When
    `CMARK_OPT_SMART` is enabled, we escape literal `-`, `.`, and quote
    characters when needed to avoid their being "smartified."
  * Add options field to `cmark_renderer`.
  * commonmark.c - use `size_t` instead of `int`.
  * Include `string.h` in `cmark-fuzz.c`.
  * Fix (hash collisions for references) (Vicent Marti via cmark-gfm).
    Reimplemented reference storage as follows:
    1. New references are always inserted at the end of a linked list. This
    is an O(1) operation, and does not check whether an existing (duplicate)
    reference with the same label already exists in the document.
    2. Upon the first call to `cmark_reference_lookup` (when it is expected
    that no further references will be added to the reference map), the
    linked list of references is written into a fixed-size array.
    3. The fixed size array can then be efficiently sorted in-place in O(n
    log n). This operation only happens once. We perform this sort in a
    _stable_ manner to ensure that the earliest link reference in the
    document always has preference, as the spec dictates. To accomplish
    this, every reference is tagged with a generation number when initially
    inserted in the linked list.
    4. The sorted array is then compacted in O(n). Since it was sorted in a
    stable way, the first reference for each label is preserved and the
    duplicates are removed, matching the spec.
    5. We can now simply perform a binary search for the current
    `cmark_reference_lookup` query in O(log n). Any further lookup calls
    will also be O(log n), since the sorted references table only needs to
    be generated once.
    The resulting implementation is notably simple (as it uses standard
    library builtins `qsort` and `bsearch`), whilst performing better than
    the fixed size hash table in documents that have a high number of
    references and never becoming pathological regardless of the input.
  * Comment out unused function `cmark_strbuf_cstr` in `buffer.h`.
  * Re-add `--safe` command-line option as a no-op, for backwards
    compatibility.
  * Update to Unicode 13.0
  * Generate and install cmake-config file (Reinhold Gschweicher).
    Add full cmake support. The project can either be used with
    `add_subdirectory` or be installed into the system (or some other
    directory) and be found with `find_package(cmark)`. In both cases the
    cmake target `cmark::cmark` and/or `cmark::cmark_static` is all that
    is needed to be linked.  Previously the `cmarkConfig.cmake` file
    was generated, but not installed.  As additional bonus of generation
    by cmake we get a generated `cmake-config-version.cmake` file for
    `find_package()` to search for the same major version.
    The generated config file is position independent, allowing the
    installed directory to be copied or moved and still work.
    The following four files are generated and installed:
    `lib/cmake/cmark/cmark-config.cmake`,
    `lib/cmake/cmark/cmark-config-version.cmake`,
    `lib/cmake/cmark/cmark-targets.cmake`,
    `lib/cmake/cmark/cmark-targets-release.cmake`.
  * Adjust the MinGW paths for MinGW64 (Daniil Baturin).
  * Fix CMake generator expression checking for MSVC (Nick Wellnhofer).
  * Fix `-Wconst-qual` warning (Saleem Abdulrasool).  This enables building
    with `/Zc:strictString` with MSVC as well.
  * Improve and modernize cmake build (Saleem Abdulrasool).
    + Build: add exports targets for build tree usage.
    + Uuse target properties for include paths.
    + Remove the unnecessary execute permission on CMakeLists.txt.
    + Reduce property computation in CMake.
    + Use `CMAKE_INCLUDE_CURRENT_DIRECTORY`.
    + Improve man page installation.
    + Only include `GNUInstallDirs` once.
    + Replace `add_compile_definitions` with `add_compile_options`
      since the former was introduced in 3.12.
    + Cleanup CMake.
    + Inline a variable.
    + Use `LINKER_LANGUAGE` property for C++ runtime.
    + Use CMake to control C standard.
    + Use the correct variable.
    + Loosen the compiler check
    + Hoist shared flags to top-level CMakeLists
    + Remove duplicated flags.
    + Use `add_compile_options` rather than modify `CMAKE_C_FLAGS`.
    + Hoist sanitizer flags to global state.
    + Hoist `-fvisibilty` flags to top-level.
    + Hoist the debug flag handling.
    + Hoist the profile flag handling.
    + Remove incorrect variable handling.
    + Remove unused CMake includes.
  * Remove "-rdynamic" flag for static builds (Eric Pruitt).
  * Fixed installation on other than Ubuntu GNU/Linux distributions
    (Vitaly Zaitsev).
  * Link executable with static or shared library (Nick Wellnhofer).
    If `CMARK_STATIC` is on (default), link the executable with the static
    library. This produces exactly the same result as compiling the library
    sources again and linking with the object files.
    If `CMARK_STATIC` is off, link the executable with the shared library.
    This wasn't supported before and should be the preferred way to
    package cmark on Linux distros.
    Building only a shared library and a statically linked executable
    isn't supported anymore but this doesn't seem useful.
  * Reintroduce version check for MSVC /TP flag (Nick Wellnhofer).
    The flag is only required for old MSVC versions.
  * normalize.py: use `html.escape` instead of `cgi.escape`.
  * Fix pathological_tests.py on Windows (Nick Wellnhofer).
    When using multiprocessing on Windows, the main program must be
    guarded with a `__name__` check.
  * Remove useless `__name__` check in test scripts (Nick Wellnhofer).
  * Add CIFuzz (Leo Neat).
  * cmark.1 - Document --unsafe instead of --safe.
  * cmark.1: remove docs for `--normalize` which no longer exists.
  * Add lint target to Makefile.
  * Add uninstall target to Makefile.
  * Update benchmarks.
  * Fix typo in documentation (Tim Gates).
  * Increase timeout for pathological tests to avoid CI failure.
  * Update the Racket wrapper with the safe -> unsafe flag change


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/textproc/cmark/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/cmark/PLIST
cvs rdiff -u -r1.6 -r1.7 pkgsrc/textproc/cmark/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/cmark/Makefile
diff -u pkgsrc/textproc/cmark/Makefile:1.8 pkgsrc/textproc/cmark/Makefile:1.9
--- pkgsrc/textproc/cmark/Makefile:1.8  Thu Apr 25 07:33:23 2019
+++ pkgsrc/textproc/cmark/Makefile      Sat Jul 17 16:29:31 2021
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2019/04/25 07:33:23 maya Exp $
+# $NetBSD: Makefile,v 1.9 2021/07/17 16:29:31 adam Exp $
 
-DISTNAME=      cmark-0.29.0
-PKGREVISION=   1
+DISTNAME=      cmark-0.30.1
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jgm/}
 

Index: pkgsrc/textproc/cmark/PLIST
diff -u pkgsrc/textproc/cmark/PLIST:1.2 pkgsrc/textproc/cmark/PLIST:1.3
--- pkgsrc/textproc/cmark/PLIST:1.2     Sat Sep 17 11:45:14 2016
+++ pkgsrc/textproc/cmark/PLIST Sat Jul 17 16:29:31 2021
@@ -1,10 +1,12 @@
-@comment $NetBSD: PLIST,v 1.2 2016/09/17 11:45:14 mef Exp $
+@comment $NetBSD: PLIST,v 1.3 2021/07/17 16:29:31 adam Exp $
 bin/cmark
 include/cmark.h
 include/cmark_export.h
 include/cmark_version.h
-lib/cmake/cmark-release.cmake
-lib/cmake/cmark.cmake
+lib/cmake/cmark/cmark-config-version.cmake
+lib/cmake/cmark/cmark-config.cmake
+lib/cmake/cmark/cmark-targets-release.cmake
+lib/cmake/cmark/cmark-targets.cmake
 lib/libcmark.a
 lib/libcmark.so
 lib/libcmark.so.${PKGVERSION}

Index: pkgsrc/textproc/cmark/distinfo
diff -u pkgsrc/textproc/cmark/distinfo:1.6 pkgsrc/textproc/cmark/distinfo:1.7
--- pkgsrc/textproc/cmark/distinfo:1.6  Sat Apr 11 10:55:05 2020
+++ pkgsrc/textproc/cmark/distinfo      Sat Jul 17 16:29:31 2021
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2020/04/11 10:55:05 adam Exp $
+$NetBSD: distinfo,v 1.7 2021/07/17 16:29:31 adam Exp $
 
-SHA1 (cmark-0.29.0.tar.gz) = d294240c6f889beb14936f75f8183a2bc19a1ab8
-RMD160 (cmark-0.29.0.tar.gz) = 1f6feada790727a924352edfefe80f83fc1be162
-SHA512 (cmark-0.29.0.tar.gz) = 06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112
-Size (cmark-0.29.0.tar.gz) = 234545 bytes
-SHA1 (patch-src_CMakeLists.txt) = 3adc765edeffbc51b672158dd1d6a0d00b57f78a
+SHA1 (cmark-0.30.1.tar.gz) = 8ce88f22bc99169657aaa66e00a81a6f7aa4fad8
+RMD160 (cmark-0.30.1.tar.gz) = 52f149cc0a9af0c28bb66d78f1b0103612f56ce2
+SHA512 (cmark-0.30.1.tar.gz) = 883bf559874f05af501de9dbce7e08c7297c09ebb26b3e08f55a8a5c43109e47ac14d129a2db31d7f105803e7259e3e104fe4241fd5c1248820a96e5228008f4
+Size (cmark-0.30.1.tar.gz) = 245126 bytes
+SHA1 (patch-src_CMakeLists.txt) = 6403931bb8c07738d4e8c0f1fc96db67c04addb4

Index: pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt
diff -u pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt:1.1 pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt:1.2
--- pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt:1.1  Sat Apr 11 10:55:05 2020
+++ pkgsrc/textproc/cmark/patches/patch-src_CMakeLists.txt      Sat Jul 17 16:29:31 2021
@@ -1,22 +1,23 @@
-$NetBSD: patch-src_CMakeLists.txt,v 1.1 2020/04/11 10:55:05 adam Exp $
+$NetBSD: patch-src_CMakeLists.txt,v 1.2 2021/07/17 16:29:31 adam Exp $
 
 Dynamically link the executable.
 
---- src/CMakeLists.txt.orig    2020-04-11 10:31:40.000000000 +0000
+--- src/CMakeLists.txt.orig    2021-07-17 01:45:36.000000000 +0000
 +++ src/CMakeLists.txt
-@@ -47,7 +47,6 @@ set(LIBRARY_SOURCES
+@@ -57,13 +57,13 @@ cmark_add_compile_options(${PROGRAM})
+ set_target_properties(${PROGRAM} PROPERTIES
+   OUTPUT_NAME "cmark")
  
- set(PROGRAM "cmark")
- set(PROGRAM_SOURCES
--  ${LIBRARY_SOURCES}
-   main.c
-   )
- 
-@@ -93,6 +92,7 @@ if (CMARK_SHARED)
-     BASE_NAME ${PROJECT_NAME})
- 
-   list(APPEND CMARK_INSTALL ${LIBRARY})
+-if (CMARK_STATIC)
++if (CMARK_SHARED)
 +  target_link_libraries(${PROGRAM} ${LIBRARY})
++elseif (CMARK_STATIC)
+   target_link_libraries(${PROGRAM} ${STATICLIBRARY})
+   # Disable the PUBLIC declarations when compiling the executable:
+   set_target_properties(${PROGRAM} PROPERTIES
+     COMPILE_FLAGS -DCMARK_STATIC_DEFINE)
+-elseif (CMARK_SHARED)
+-  target_link_libraries(${PROGRAM} ${LIBRARY})
  endif()
  
- if (CMARK_STATIC)
+ # -fvisibility=hidden



Home | Main Index | Thread Index | Old Index