From 3e7160a7b1ad42396cdedad55100696ba2c593fc Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Fri, 9 Oct 2020 00:16:22 +0000 Subject: [PATCH 1/7] New branch setup --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From 4067a0cdbde761e1a00c82caf6f70d3060d6c914 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 14 Oct 2020 21:26:58 -0700 Subject: [PATCH 2/7] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/rapidjson#2b9f8c58f6c776b7e6444e30484f0cf682d676ad --- .gitignore | 1 + rapidjson-1.1.0-c++20.patch | 31 +++ ...n-1.1.0-do_not_include_gtest_src_dir.patch | 19 ++ rapidjson.spec | 179 ++++++++++++++++++ sources | 1 + 5 files changed, 231 insertions(+) create mode 100644 rapidjson-1.1.0-c++20.patch create mode 100644 rapidjson-1.1.0-do_not_include_gtest_src_dir.patch create mode 100644 rapidjson.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..335ec95 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +*.tar.gz diff --git a/rapidjson-1.1.0-c++20.patch b/rapidjson-1.1.0-c++20.patch new file mode 100644 index 0000000..9b10ae6 --- /dev/null +++ b/rapidjson-1.1.0-c++20.patch @@ -0,0 +1,31 @@ +commit c6c56d87ff12ba8100b261f371fdaa106f95fe14 +Author: Tom Hughes +Date: Tue Sep 1 19:24:03 2020 +0100 + + Avoid ambiguous operator errors in C++20 + + Derived from upstream commit ebcbd04484fcdaddbb9fd7798e76bbfb4ae8f840 + +diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h +index e3e20dfb..1485321d 100644 +--- a/include/rapidjson/document.h ++++ b/include/rapidjson/document.h +@@ -168,12 +168,12 @@ public: + + //! @name relations + //@{ +- bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; } +- bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; } +- bool operator<=(ConstIterator that) const { return ptr_ <= that.ptr_; } +- bool operator>=(ConstIterator that) const { return ptr_ >= that.ptr_; } +- bool operator< (ConstIterator that) const { return ptr_ < that.ptr_; } +- bool operator> (ConstIterator that) const { return ptr_ > that.ptr_; } ++ template bool operator==(const GenericMemberIterator& that) const { return ptr_ == that.ptr_; } ++ template bool operator!=(const GenericMemberIterator& that) const { return ptr_ != that.ptr_; } ++ template bool operator<=(const GenericMemberIterator& that) const { return ptr_ <= that.ptr_; } ++ template bool operator>=(const GenericMemberIterator& that) const { return ptr_ >= that.ptr_; } ++ template bool operator< (const GenericMemberIterator& that) const { return ptr_ < that.ptr_; } ++ template bool operator> (const GenericMemberIterator& that) const { return ptr_ > that.ptr_; } + //@} + + //! @name dereference diff --git a/rapidjson-1.1.0-do_not_include_gtest_src_dir.patch b/rapidjson-1.1.0-do_not_include_gtest_src_dir.patch new file mode 100644 index 0000000..18e8e80 --- /dev/null +++ b/rapidjson-1.1.0-do_not_include_gtest_src_dir.patch @@ -0,0 +1,19 @@ +commit e61866f098098422462e8bc220506443e76c3bb0 +Author: Björn Esser +Date: Sun Apr 3 11:21:47 2016 +0200 + + do not include gtest_src_dir + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 11c1b04..43377db 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -8,7 +8,7 @@ IF(GTESTSRC_FOUND) + set(gtest_force_shared_crt ON) + endif() + +- add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest) ++# add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest) + include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) + + set(TEST_LIBRARIES gtest gtest_main) diff --git a/rapidjson.spec b/rapidjson.spec new file mode 100644 index 0000000..7e1b91d --- /dev/null +++ b/rapidjson.spec @@ -0,0 +1,179 @@ +%global debug_package %{nil} + +Name: rapidjson +Version: 1.1.0 +Release: 15%{?dist} +Summary: Fast JSON parser and generator for C++ + +License: MIT +URL: http://rapidjson.org/ +Source0: https://github.com/Tencent/rapidjson/archive/v%{version}/%{name}-%{version}.tar.gz +# Downstream-patch for gtest +Patch0: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch +# Upstream derived patch for C++20 support +Patch1: rapidjson-1.1.0-c++20.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gtest-devel +BuildRequires: valgrind +BuildRequires: doxygen + +%description +RapidJSON is a fast 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.1 for acceleration. + + RapidJSON is self-contained. 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/20 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). + +JSON(JavaScript Object Notation) is a light-weight data exchange +format. RapidJSON should be in fully compliance with RFC4627/ECMA-404. + + +%package devel +Summary: %{summary} +Provides: %{name} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} + +%description devel +%{description} + + +%package doc +Summary: Documentation-files for %{name} +BuildArch: noarch + +%description doc +This package contains the documentation-files for %{name}. + + +%prep +%autosetup -p 1 -n %{name}-%{version} + +# Remove bundled code +rm -rf thirdparty + +# 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 -DDOC_INSTALL_DIR=%{_pkgdocdir} -DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=. +%cmake_build + + +%install +%cmake_install +cp -a CHANGELOG.md readme*.md %{buildroot}%{_pkgdocdir} +find %{buildroot} -type f -name 'CMake*.txt' -delete + + +%check +%ctest + + +%files devel +%license license.txt +%dir %{_pkgdocdir} +%{_pkgdocdir}/CHANGELOG.md +%{_pkgdocdir}/readme*.md +%{_libdir}/cmake +%{_libdir}/pkgconfig/* +%{_includedir}/%{name} + + +%files doc +%license license.txt +%{_pkgdocdir} + + +%changelog +* Tue Sep 1 2020 Tom Hughes - 1.1.0-15 +- Add patch for C++20 support + +* Wed Jul 29 2020 Fedora Release Engineering - 1.1.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 14 2020 Tom Hughes - 1.1.0-13 +- Install pkg-config and cmake files to arched location +- Build documentation as noarch + +* Thu Jan 30 2020 Fedora Release Engineering - 1.1.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 1.1.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jun 19 2019 Tom Hughes - 1.1.0-10 +- Fix FTBS due to hardlink location change +- Tidy up spec file + +* Sat Feb 02 2019 Fedora Release Engineering - 1.1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.1.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Mar 7 2018 Tom Hughes - 1.1.0-7 +- Require gcc-c++ + +* Fri Feb 09 2018 Fedora Release Engineering - 1.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 9 2017 Tom Hughes - 1.1.0-5 +- Update valgrind exclusions + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri May 05 2017 Björn Esser - 1.1.0-2 +- Doc-pkg must be build archful on RHEL <= 7 + +* Fri Feb 10 2017 Tom Hughes - 1.1.0-1 +- Update to 1.1.0 upstream release +- Drop -march=native as ppc64 doesn't recognise it +- Exclude valgrind on aarch64 due to unhandled instruction in libgcc + +* Sun Apr 03 2016 Björn Esser - 1.0.2-1 +- update to latest upstream-release (#1322941) + +* Thu Feb 04 2016 Fedora Release Engineering - 0.12-0.4.git20140801.67143c2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.12-0.3.git20140801.67143c2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 0.12-0.2.git20140801.67143c2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 06 2014 Björn Esser - 0.12-0.1.git20140801.67143c2 +- initial rpm release (#1127380) diff --git a/sources b/sources new file mode 100644 index 0000000..5ed0772 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rapidjson-1.1.0.tar.gz) = 2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff From 25f9ae8410b40168d114ee950398d7ff186ba4c2 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Sat, 30 Jan 2021 01:14:02 +0000 Subject: [PATCH 3/7] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/rapidjson.git#2b9f8c58f6c776b7e6444e30484f0cf682d676ad From b1b6b497c4dd75a23662fe21e57be115bd858327 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 3 Feb 2021 04:24:30 +0000 Subject: [PATCH 4/7] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/rapidjson.git#480faba4f2d33b45697d14b2a80802b9555c5528 --- rapidjson.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rapidjson.spec b/rapidjson.spec index 7e1b91d..8e255b4 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -2,7 +2,7 @@ Name: rapidjson Version: 1.1.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Fast JSON parser and generator for C++ License: MIT @@ -13,7 +13,7 @@ Patch0: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch # Upstream derived patch for C++20 support Patch1: rapidjson-1.1.0-c++20.patch -BuildRequires: cmake +BuildRequires: cmake make BuildRequires: gcc-c++ BuildRequires: gtest-devel BuildRequires: valgrind @@ -114,6 +114,9 @@ find %{buildroot} -type f -name 'CMake*.txt' -delete %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.1.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Sep 1 2020 Tom Hughes - 1.1.0-15 - Add patch for C++20 support From 8f82d181cd5c5fcd5fe83dc265ee43ce87982c7e Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Fri, 16 Apr 2021 05:06:32 +0000 Subject: [PATCH 5/7] - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 Signed-off-by: Mohan Boddu --- rapidjson.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rapidjson.spec b/rapidjson.spec index 8e255b4..3a47806 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -2,7 +2,7 @@ Name: rapidjson Version: 1.1.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Fast JSON parser and generator for C++ License: MIT @@ -114,6 +114,9 @@ find %{buildroot} -type f -name 'CMake*.txt' -delete %changelog +* Fri Apr 16 2021 Mohan Boddu - 1.1.0-17 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + * Wed Jan 27 2021 Fedora Release Engineering - 1.1.0-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From da3ee8174def8729636b2842ab7b319677dc070e Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Thu, 15 Jul 2021 15:42:04 +0200 Subject: [PATCH 6/7] Remove gtest dependency and turn off tests Resolves: #1977656 --- rapidjson.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rapidjson.spec b/rapidjson.spec index 3a47806..c25d941 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -1,8 +1,10 @@ %global debug_package %{nil} +%bcond_with gtest + Name: rapidjson Version: 1.1.0 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Fast JSON parser and generator for C++ License: MIT @@ -15,7 +17,9 @@ Patch1: rapidjson-1.1.0-c++20.patch BuildRequires: cmake make BuildRequires: gcc-c++ +%if %{with gtest} BuildRequires: gtest-devel +%endif BuildRequires: valgrind BuildRequires: doxygen @@ -84,7 +88,9 @@ find . -type f -name CMakeLists.txt -print0 | \ %build -%cmake -DDOC_INSTALL_DIR=%{_pkgdocdir} -DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=. +%cmake -DDOC_INSTALL_DIR=%{_pkgdocdir} \ + %{?with_gtest:-DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=.} \ + %{!?with_gtest:-DRAPIDJSON_BUILD_TESTS=OFF} %cmake_build @@ -94,8 +100,10 @@ cp -a CHANGELOG.md readme*.md %{buildroot}%{_pkgdocdir} find %{buildroot} -type f -name 'CMake*.txt' -delete +%if %{with gtest} %check %ctest +%endif %files devel @@ -114,6 +122,10 @@ find %{buildroot} -type f -name 'CMake*.txt' -delete %changelog +* Thu Jul 15 2021 Honza Horak - 1.1.0-18 +- Remove gtest dependency and turn off tests + Resolves: #1977656 + * Fri Apr 16 2021 Mohan Boddu - 1.1.0-17 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 From 9924f17a075dfc36004cb5f7809c2c0529b94058 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Tue, 10 Aug 2021 00:34:12 +0000 Subject: [PATCH 7/7] Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 Signed-off-by: Mohan Boddu --- rapidjson.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rapidjson.spec b/rapidjson.spec index c25d941..22ab7ff 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -4,7 +4,7 @@ Name: rapidjson Version: 1.1.0 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Fast JSON parser and generator for C++ License: MIT @@ -122,6 +122,10 @@ find %{buildroot} -type f -name 'CMake*.txt' -delete %changelog +* Tue Aug 10 2021 Mohan Boddu - 1.1.0-19 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + * Thu Jul 15 2021 Honza Horak - 1.1.0-18 - Remove gtest dependency and turn off tests Resolves: #1977656