2015-10-18 21:40:04 +00:00
|
|
|
#
|
|
|
|
# spec file for package cmark
|
|
|
|
#
|
2023-03-18 21:46:52 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2015-10-18 21:40:04 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-08-06 09:16:16 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-10-18 21:40:04 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
Accepting request 1163938 from home:Jianhua:branches:devel:libraries:c_c++
- update to 0.31.0
* Update to 0.31.2 spec.txt.
* Treat unicode Symbols like Punctuation, as per the 0.31 spec.
* Add a new function to `utf8.h`:
`int cmark_utf8proc_is_punctuation_or_symbol(int32_t uc)`.
The old `cmark_utf8proc_is_punctuation` has been kept for
now, but it is no longer used.
* Add new exported function `cmark_parser_new_with_mem_into_root`
(API change) (John Ericson).
* Avoid repeated `language-` in info string (commonmark/commonmark.js#277).
* Fix quadratic behavior in `S_insert_emph` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Fix quadratic behavior in `check_open_blocks` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Track underscore bottom separately mod 3, like asterisk (Michael
Howell). This was already implemented correctly for asterisks,
but not for underscore.
* Use `fwrite` instead of `printf` to print results in main (#523).
This avoids a massive slowdown in MSYS2.
* commonmark writer: less aggressive escaping for `!` (#131).
* Update libFuzzer build (Nick Wellnhofer):
+ Move fuzzing files into their own directory.
+ Use libFuzzer the modern way by compiling and linking with
`-fsanitize=fuzzer(-no-link)` without requiring `LIB_FUZZER_PATH`.
+ Update the `libFuzzer` rule in Makefile and the README.md.
* CMake build changes (Saleem Abdulrasool).
+ Inline multiple variables in CMake, following CMake recommendations.
+ Simplify the version computation.
+ Remove the `CMARK_STATIC` and `CMARK_SHARED` options as one of the two
must be enabled always as the cmark executable depends on the library.
Instead of having a custom flag to discern between the
library type, use the native CMake option `BUILD_SHARED_LIBS`,
allowing the user to control which library to build. This matches
CMake recommendations to only build a single copy of the library.
+ Introduce an author warning for the use of `CMARK_SHARED` and
`CMARK_STATIC` to redirect the author of the dependent package to
`BUILD_SHARED_LIBS`.
+ Permit incremental linking on Windows. Although incremental linking
does introduce padding in the binary for incremental links, that
should not matter for release mode builds in theory as `/OPT:REF`
and `/OPT:ICF` will trigger full links, which is the default in
release mode.
+ Hoist the CMake module inclusion to the top level.
+ Minor tweaks for speeding up the configure phase.
Restructure the file layout to place the custom modules into the
`cmake/modules` directory that is the common layout for CMake based
projects.
+ Squelch C4232 warnings on MSVC builds.
+ Remove check for `__builtin_expect`. Use `__has_builtin` to check
at compile time if the feature is supported.
This macro is supported by both clang and GCC (as of 10).
In the case that the compiler in use is not new enough, we still
provide the fallback so that the code will compile but without the
additional hints for the branch probability. `config.h` has been
removed from the code base as it is no longer needed.
+ Remove `/TP` usage on MSVC and replace `CMARK_INLINE` with `inline`.
These were workarounds for pre-VS2015 compilers, which are no longer
supported.
+ Hoist the C visibility settings to top level
+ Clean up C4267 warnings on MSVC builds.
+ Remove some compiler compatibility checks that are no longer
needed because VS 2013 is no longer supported (#498).
+ Adjust the policy to silence warnings on MSVC builds
CMake 3.15+ remove `/W3` from the language flags under MSVC with
CMP0092. Set the policy to new to avoid the D9025 warning.
+ Reflow some text to match CMake documentation style
+ Use generator expression for path computation.
+ Use CMake to propagate `CMARK_STATIC_DEFINE`.
+ Clean up an obsoleted variable (NFC).
+ Hoist the policy settings. Policy settings may impact how
`project` functions. They should be set immediately after
`cmake_minimum_required` (which implicitly sets policies).
Use the `POLICY` check to see if a policy is defined rather
than using a version check.
+ Replace `CMARK_TESTS` with CMake sanctioned `BUILD_TESTING`.
+ Correct typo and adjust command invocation. Use the proper
generator expression for the python interpreter and adjust
a typo in the component name.
+ Add an upgrade path for newer CMake.
CMake 3.12 deprecated `FindPythonInterp`, and with CMake 3.27, were
obsoleted with CMP0148. Add a version check and switch to the new
behaviour to allow building with newer releases.
* Fix regex syntax warnings in `pathological_tests.py` (Nick Wellnhofer).
* `test/cmark.py`: avoid star imports (Jakub Wilk).
* `spec_tests.py`: Add option to generate fuzz corpus (Nick Wellnhofer).
Add an option `--fuzz-corpus` that writes the test cases to separate
files including the options header, so they can be used as seed corpus
for fuzz testing.
* Fix some cmark.3 man rendering issues so we can do a clean regen
(John Ericson).
* Update Windows compilation instructions (Pomax, #525).
OBS-URL: https://build.opensuse.org/request/show/1163938
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=32
2024-04-14 07:34:01 +00:00
|
|
|
%define libname libcmark0_31_0
|
2015-10-18 21:40:04 +00:00
|
|
|
Name: cmark
|
Accepting request 1163938 from home:Jianhua:branches:devel:libraries:c_c++
- update to 0.31.0
* Update to 0.31.2 spec.txt.
* Treat unicode Symbols like Punctuation, as per the 0.31 spec.
* Add a new function to `utf8.h`:
`int cmark_utf8proc_is_punctuation_or_symbol(int32_t uc)`.
The old `cmark_utf8proc_is_punctuation` has been kept for
now, but it is no longer used.
* Add new exported function `cmark_parser_new_with_mem_into_root`
(API change) (John Ericson).
* Avoid repeated `language-` in info string (commonmark/commonmark.js#277).
* Fix quadratic behavior in `S_insert_emph` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Fix quadratic behavior in `check_open_blocks` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Track underscore bottom separately mod 3, like asterisk (Michael
Howell). This was already implemented correctly for asterisks,
but not for underscore.
* Use `fwrite` instead of `printf` to print results in main (#523).
This avoids a massive slowdown in MSYS2.
* commonmark writer: less aggressive escaping for `!` (#131).
* Update libFuzzer build (Nick Wellnhofer):
+ Move fuzzing files into their own directory.
+ Use libFuzzer the modern way by compiling and linking with
`-fsanitize=fuzzer(-no-link)` without requiring `LIB_FUZZER_PATH`.
+ Update the `libFuzzer` rule in Makefile and the README.md.
* CMake build changes (Saleem Abdulrasool).
+ Inline multiple variables in CMake, following CMake recommendations.
+ Simplify the version computation.
+ Remove the `CMARK_STATIC` and `CMARK_SHARED` options as one of the two
must be enabled always as the cmark executable depends on the library.
Instead of having a custom flag to discern between the
library type, use the native CMake option `BUILD_SHARED_LIBS`,
allowing the user to control which library to build. This matches
CMake recommendations to only build a single copy of the library.
+ Introduce an author warning for the use of `CMARK_SHARED` and
`CMARK_STATIC` to redirect the author of the dependent package to
`BUILD_SHARED_LIBS`.
+ Permit incremental linking on Windows. Although incremental linking
does introduce padding in the binary for incremental links, that
should not matter for release mode builds in theory as `/OPT:REF`
and `/OPT:ICF` will trigger full links, which is the default in
release mode.
+ Hoist the CMake module inclusion to the top level.
+ Minor tweaks for speeding up the configure phase.
Restructure the file layout to place the custom modules into the
`cmake/modules` directory that is the common layout for CMake based
projects.
+ Squelch C4232 warnings on MSVC builds.
+ Remove check for `__builtin_expect`. Use `__has_builtin` to check
at compile time if the feature is supported.
This macro is supported by both clang and GCC (as of 10).
In the case that the compiler in use is not new enough, we still
provide the fallback so that the code will compile but without the
additional hints for the branch probability. `config.h` has been
removed from the code base as it is no longer needed.
+ Remove `/TP` usage on MSVC and replace `CMARK_INLINE` with `inline`.
These were workarounds for pre-VS2015 compilers, which are no longer
supported.
+ Hoist the C visibility settings to top level
+ Clean up C4267 warnings on MSVC builds.
+ Remove some compiler compatibility checks that are no longer
needed because VS 2013 is no longer supported (#498).
+ Adjust the policy to silence warnings on MSVC builds
CMake 3.15+ remove `/W3` from the language flags under MSVC with
CMP0092. Set the policy to new to avoid the D9025 warning.
+ Reflow some text to match CMake documentation style
+ Use generator expression for path computation.
+ Use CMake to propagate `CMARK_STATIC_DEFINE`.
+ Clean up an obsoleted variable (NFC).
+ Hoist the policy settings. Policy settings may impact how
`project` functions. They should be set immediately after
`cmake_minimum_required` (which implicitly sets policies).
Use the `POLICY` check to see if a policy is defined rather
than using a version check.
+ Replace `CMARK_TESTS` with CMake sanctioned `BUILD_TESTING`.
+ Correct typo and adjust command invocation. Use the proper
generator expression for the python interpreter and adjust
a typo in the component name.
+ Add an upgrade path for newer CMake.
CMake 3.12 deprecated `FindPythonInterp`, and with CMake 3.27, were
obsoleted with CMP0148. Add a version check and switch to the new
behaviour to allow building with newer releases.
* Fix regex syntax warnings in `pathological_tests.py` (Nick Wellnhofer).
* `test/cmark.py`: avoid star imports (Jakub Wilk).
* `spec_tests.py`: Add option to generate fuzz corpus (Nick Wellnhofer).
Add an option `--fuzz-corpus` that writes the test cases to separate
files including the options header, so they can be used as seed corpus
for fuzz testing.
* Fix some cmark.3 man rendering issues so we can do a clean regen
(John Ericson).
* Update Windows compilation instructions (Pomax, #525).
OBS-URL: https://build.opensuse.org/request/show/1163938
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=32
2024-04-14 07:34:01 +00:00
|
|
|
Version: 0.31.0
|
2015-10-18 21:40:04 +00:00
|
|
|
Release: 0
|
2016-03-29 12:47:57 +00:00
|
|
|
Summary: CommonMark parsing and rendering library and program in C
|
2017-09-21 20:45:13 +00:00
|
|
|
License: BSD-2-Clause AND MIT AND CC-BY-SA-4.0
|
2016-03-29 12:47:57 +00:00
|
|
|
Group: Productivity/Text/Utilities
|
2019-08-06 09:16:16 +00:00
|
|
|
URL: https://github.com/jgm/cmark
|
2016-03-29 12:47:57 +00:00
|
|
|
Source: https://github.com/jgm/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Accepting request 924169 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.30.2
* Fix parsing of emphasis before links (#424, Nick Wellnhofer).
Fixes a regression introduced with commit ed0a4bf.
* Update to Unicode 14.0 (data-man).
* Add `~` to safe href character set (#394, frogtile).
* Update CMakeLists.txt (Saleem Abdulrasool). Bump the minimum required
CMake to 3.7. Imperatively define output name for static library.
* Fix install paths in libcmark.pc (Sebastián Mancilla).
`CMAKE_INSTALL_<dir>` can be relative or absolute path, so it is wrong to
prefix CMAKE_INSTALL_PREFIX because if CMAKE_INSTALL_<dir> is set to an
absolute path it will result in a malformed path with two absolute paths
joined together. Instead, use `CMAKE_INSTALL_FULL_<dir>` from
GNUInstallDirs.
* Properly indent block-level contents of list items in man (#258).
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 (#389, 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 (#388, 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 (#384, Saleem Abdulrasool). (In 0.30.0,
some features were used that require CMake >= 3.3.) The cost of this
OBS-URL: https://build.opensuse.org/request/show/924169
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=28
2021-10-08 09:09:10 +00:00
|
|
|
BuildRequires: cmake >= 3.7
|
2016-03-29 12:47:57 +00:00
|
|
|
BuildRequires: gcc-c++
|
2016-07-16 14:53:04 +00:00
|
|
|
BuildRequires: pkgconfig
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%description
|
2016-03-29 12:47:57 +00:00
|
|
|
`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
|
2015-10-18 21:40:04 +00:00
|
|
|
documents.
|
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%package -n %{libname}
|
|
|
|
Summary: CmmonMark parsing and rendering library
|
2015-10-18 21:40:04 +00:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%description -n %{libname}
|
|
|
|
It provides a shared library (`libcmark`) with functions for parsing
|
2015-10-18 21:40:04 +00:00
|
|
|
CommonMark documents to an abstract syntax tree (AST), manipulating
|
|
|
|
the AST, and rendering the document to HTML, groff man, LaTeX,
|
2016-03-29 12:47:57 +00:00
|
|
|
CommonMark, or an XML representation of the AST. It also provides a
|
|
|
|
command-line program (`cmark`) for parsing and rendering CommonMark
|
|
|
|
documents.
|
2015-10-18 21:40:04 +00:00
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for cmark library
|
2016-07-16 14:53:04 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2016-03-29 12:47:57 +00:00
|
|
|
Requires: %{libname} = %{version}-%{release}
|
2021-12-08 09:41:21 +00:00
|
|
|
# The CMake config files define a target for the executable.
|
|
|
|
Requires: %{name} = %{version}
|
2015-10-18 21:40:04 +00:00
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%description devel
|
|
|
|
This package provides the development files for cmark.
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2017-09-21 20:45:13 +00:00
|
|
|
%cmake -DCMARK_TESTS=OFF -DCMARK_STATIC=OFF
|
2021-06-01 10:32:09 +00:00
|
|
|
%cmake_build
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%install
|
2016-10-16 16:26:24 +00:00
|
|
|
%cmake_install
|
2015-10-18 21:40:04 +00:00
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%files
|
2019-08-06 09:16:16 +00:00
|
|
|
%license COPYING
|
2016-03-29 12:47:57 +00:00
|
|
|
%{_bindir}/cmark
|
|
|
|
%{_mandir}/man1/cmark.1%{?ext_man}
|
2015-10-18 21:40:04 +00:00
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%files -n %{libname}
|
2019-08-06 09:16:16 +00:00
|
|
|
%license COPYING
|
2016-03-29 12:47:57 +00:00
|
|
|
%{_libdir}/libcmark.so.%{version}
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%files devel
|
2023-03-18 21:46:52 +00:00
|
|
|
%license COPYING
|
2016-03-29 12:47:57 +00:00
|
|
|
%{_includedir}/cmark.h
|
|
|
|
%{_includedir}/cmark_export.h
|
|
|
|
%{_includedir}/cmark_version.h
|
|
|
|
%{_libdir}/libcmark.so
|
|
|
|
%{_libdir}/pkgconfig/libcmark.pc
|
|
|
|
%{_mandir}/man3/cmark.3%{?ext_man}
|
2021-06-21 06:47:03 +00:00
|
|
|
%dir %{_libdir}/cmake/cmark
|
|
|
|
%{_libdir}/cmake/cmark/cmark*.cmake
|
2016-07-16 14:53:04 +00:00
|
|
|
|
2016-03-29 12:47:57 +00:00
|
|
|
%doc README.md
|
2015-10-18 21:40:04 +00:00
|
|
|
|
|
|
|
%changelog
|