# There are no files that we can get debug info from %global debug_package %{nil} Name: rapidjson Version: 1.1.0 Release: %mkrel 6 Summary: A fast JSON parser/generator for C++ Group: Development/C++ License: BSD URL: https://rapidjson.org/ Source0: https://github.com/Tencent/rapidjson/archive/v%{version}/%{name}-%{version}.tar.gz # # from git # rediff commits to fix the following bugs: # https://github.com/Tencent/rapidjson/issues/909 # https://github.com/Tencent/rapidjson/issues/1718 Patch1: 0001-Changed-error-code-for-invalid-special-ascii-chars-f-rediffed.patch Patch2: 0002-Fix-905-unable-to-set-writeFlags-for-PrettyWriter-rediffed.patch Patch3: 0003-Fixes-issue-1718-rediffed.patch # # Patch10: remove-Werror-cmakelist.patch # from fc Patch11: rapidjson-1.1.0-c++20.patch Patch12: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch # from deb Patch20: disable-valgrind_unittest.patch Patch21: gcc7.patch Patch22: 0001-Fix-Wclass-memaccess-warnings-errors.patch Patch23: 0002-Fix-Wsign-conversion-warnings-errors.patch Patch24: 0003-Suppress-Wformat-overflow-warning-error.patch Patch25: python3.patch # BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gtest-devel BuildRequires: valgrind %description RapidJSON is a JSON parser and generator for C++. It was inspired by RapidXml. - RapidJSON is small but complete. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code. - RapidJSON is fast. Its performance can be comparable to strlen(). It also optionally supports SSE2/SSE4.2 for acceleration. - RapidJSON is self-contained and header-only. It does not depend on external libraries such as BOOST. It even does not depend on STL. - RapidJSON is memory-friendly. Each JSON value occupies exactly 16 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing. - RapidJSON is Unicode-friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character) %prep %autosetup -p1 # Convert DOS line endings to unix for file in "license.txt" $(find ./example -type f -name '*.c*'); do sed -e "s/\r$//g" < ${file} > ${file}.new && \ touch -r ${file} ${file}.new && \ mv -f ${file}.new ${file} done # Remove -march=native and -Werror from compile commands find . -type f -name CMakeLists.txt -print0 | \ xargs -0r sed -i -e "s/-march=native/ /g" -e "s/-Werror//g" %build %cmake \ -DGTEST_SOURCE_DIR:PATH=. \ -DGTESTSRC_FOUND:BOOL=TRUE \ -DRAPIDJSON_BUILD_TESTS:BOOL=ON \ -DRAPIDJSON_BUILD_THIRDPARTY_GTEST:BOOL=OFF %cmake_build %install %cmake_install %check %ctest %files %doc %{_datadir}/doc/RapidJSON/ %{_includedir}/%{name}/ %{_libdir}/cmake/RapidJSON/ %{_libdir}/pkgconfig/RapidJSON.pc %changelog * Sat May 14 2022 ghibo <ghibo> 1.1.0-6.mga9 + Revision: 1858130 - Merge and rediff patches from git upstream to allow usage of prettywriter (useful for octave package). - Add %%check stage and add required BuildRequires (valgrind, gtest-devel). - Merge patches from fedora (add patch for c++20 support and exclude a gtest src dir). - Explicitily disable 3rdparty gtests. - Merge patches from debian to exclude failing tests. * Fri Mar 18 2022 umeabot <umeabot> 1.1.0-5.mga9 + Revision: 1798457 - Mageia 9 Mass Rebuild * Thu Feb 20 2020 umeabot <umeabot> 1.1.0-4.mga8 + Revision: 1546419 - Mageia 8 Mass Rebuild * Sun Feb 02 2020 wally <wally> 1.1.0-3.mga8 + Revision: 1486454 - tag docs as such - own unowned dir * Sun Sep 23 2018 umeabot <umeabot> 1.1.0-2.mga7 + Revision: 1300775 - Mageia 7 Mass Rebuild * Wed Jan 31 2018 kekepower <kekepower> 1.1.0-1.mga7 + Revision: 1198201 - imported package rapidjson