Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
be0489d1c0 | ||
|
ad9248db4e | ||
|
cc8e3037f6 | ||
|
fa202d73f6 | ||
|
4b70a96102 | ||
|
df99d3e5fd | ||
|
a8942ef537 | ||
|
480faba4f2 | ||
|
5e0fe1c82d | ||
|
2b9f8c58f6 | ||
|
48402da9f1 | ||
|
55891bae63 | ||
|
d9bfbd7b10 | ||
|
cc73c98c75 | ||
|
12c31187cd | ||
|
7307cb7951 | ||
|
3e4e6f6eb3 | ||
|
6034fc03fb | ||
|
315daae4cf | ||
|
96642c6eaf | ||
|
e5f0e3d61b | ||
|
cadf1d22da |
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,5 +1 @@
|
||||
*~
|
||||
*.rpm
|
||||
*.tar*
|
||||
*.zip
|
||||
results_*/
|
||||
*.tar.gz
|
||||
|
31
rapidjson-1.1.0-c++20.patch
Normal file
31
rapidjson-1.1.0-c++20.patch
Normal file
@ -0,0 +1,31 @@
|
||||
commit c6c56d87ff12ba8100b261f371fdaa106f95fe14
|
||||
Author: Tom Hughes <tom@compton.nu>
|
||||
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 Const_> bool operator==(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ == that.ptr_; }
|
||||
+ template <bool Const_> bool operator!=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ != that.ptr_; }
|
||||
+ template <bool Const_> bool operator<=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <= that.ptr_; }
|
||||
+ template <bool Const_> bool operator>=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ >= that.ptr_; }
|
||||
+ template <bool Const_> bool operator< (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ < that.ptr_; }
|
||||
+ template <bool Const_> bool operator> (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ > that.ptr_; }
|
||||
//@}
|
||||
|
||||
//! @name dereference
|
256
rapidjson.spec
256
rapidjson.spec
@ -1,189 +1,165 @@
|
||||
# Conditional for release and snapshot builds. Uncomment for release-builds.
|
||||
%global rel_build 1
|
||||
|
||||
# Settings used for build from snapshots.
|
||||
%if 0%{?rel_build}
|
||||
%global gittar %{name}-%{version}.tar.gz
|
||||
%else # 0%%{?rel_build}
|
||||
%global commit 67143c2ba002604a510ba436a8ed0d785a9f7de6
|
||||
%global commit_date 20140801
|
||||
%global shortcommit %(c=%{commit};echo ${c:0:7})
|
||||
%global gitver git%{commit_date}-%{shortcommit}
|
||||
%global gitrel .git%{commit_date}.%{shortcommit}
|
||||
%global gittar %{name}-%{version}-%{gitver}.tar.gz
|
||||
%endif # 0%%{?rel_build}
|
||||
|
||||
# This is a header-only lib. There is no debuginfo generated.
|
||||
%global debug_package %{nil}
|
||||
|
||||
# Set %%_pkgdocdir-helper-macro if not defined.
|
||||
%if 0%{!?_pkgdocdir:1}
|
||||
%global _pkgdocdir %{_docdir}/%{name}-%{version}
|
||||
%endif # 0%%{!?_pkgdocdir:1}
|
||||
|
||||
# CMake-builds go out-of-tree. Tests are not run in %%{buildroot}.
|
||||
%global cmake_build_dir build-%{?__isa}%{?dist}
|
||||
|
||||
# Set %%giturl for later use.
|
||||
%global giturl https://github.com/miloyip/%{name}/archive
|
||||
|
||||
%global common_desc \
|
||||
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.
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: rapidjson
|
||||
Version: 1.1.0
|
||||
Release: 9%{?gitrel}%{?dist}
|
||||
Release: 22%{?dist}
|
||||
Summary: Fast JSON parser and generator for C++
|
||||
|
||||
License: MIT
|
||||
URL: http://miloyip.github.io/%{name}
|
||||
%if 0%{?rel_build}
|
||||
# Sources for release-builds.
|
||||
Source0: %{giturl}/v%{version}.tar.gz#/%{gittar}
|
||||
%else # 0%%{?rel_build}
|
||||
# Sources for snapshot-builds.
|
||||
Source0: %{giturl}/%{commit}.tar.gz#/%{gittar}
|
||||
%endif # 0%%{?rel_build}
|
||||
|
||||
# Downstream-patch for gtest.
|
||||
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: make
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gtest-devel
|
||||
BuildRequires: valgrind
|
||||
BuildRequires: doxygen
|
||||
|
||||
%description
|
||||
%{common_desc}
|
||||
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}
|
||||
BuildArch: noarch
|
||||
|
||||
Provides: %{name} == %{version}-%{release}
|
||||
Provides: %{name}-static == %{version}-%{release}
|
||||
Summary: %{summary}
|
||||
Provides: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: %{name}-static = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
%{common_desc}
|
||||
|
||||
%files devel
|
||||
%license license.txt
|
||||
%doc %dir %{_pkgdocdir}
|
||||
%doc %{_pkgdocdir}/CHANGELOG.md
|
||||
%doc %{_pkgdocdir}/readme*.md
|
||||
%{_datadir}/cmake
|
||||
%{_datadir}/pkgconfig/*
|
||||
%{_includedir}/%{name}
|
||||
%{description}
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation-files for %{name}
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
BuildArch: noarch
|
||||
%endif # 0%%{?fedora} || 0%%{?rhel} >= 8
|
||||
|
||||
BuildRequires: %{_sbindir}/hardlink
|
||||
BuildRequires: doxygen
|
||||
|
||||
%description doc
|
||||
This package contains the documentation-files for %{name}.
|
||||
|
||||
%files doc
|
||||
# Pickup license-files from main-pkg's license-dir.
|
||||
# If there's no license-dir they are picked up by %%doc previously.
|
||||
%{?_licensedir:%license %{_datadir}/licenses/%{name}*}
|
||||
%doc %{_pkgdocdir}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q%{!?rel_build:n %{name}-%{commit}}
|
||||
%patch0 -p1 -b .gtest
|
||||
%{__mkdir} -p %{cmake_build_dir}
|
||||
%autosetup -p 1 -n %{name}-%{version}
|
||||
|
||||
# Fix 'W: wrong-file-end-of-line-encoding'.
|
||||
for _file in "license.txt" $(%{_bindir}/find example -type f -name '*.c*')
|
||||
# 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 && \
|
||||
/bin/touch -r ${_file} ${_file}.new && \
|
||||
%{__mv} -f ${_file}.new ${_file}
|
||||
sed -e "s/\r$//g" < ${file} > ${file}.new && \
|
||||
touch -r ${file} ${file}.new && \
|
||||
mv -f ${file}.new ${file}
|
||||
done
|
||||
|
||||
# Create an uncluttered backup of examples for inclusion in %%doc.
|
||||
%{__cp} -a example examples
|
||||
|
||||
# Disable -Werror.
|
||||
%{_bindir}/find . -type f -name 'CMakeLists.txt' -print0 | \
|
||||
%{_bindir}/xargs -0 %{__sed} -i -e's![ \t]*-march=native!!g' -e's![ \t]*-Werror!!g'
|
||||
# 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
|
||||
pushd %{cmake_build_dir}
|
||||
%cmake \
|
||||
-DDOC_INSTALL_DIR=%{_pkgdocdir} \
|
||||
-DGTESTSRC_FOUND=TRUE \
|
||||
-DGTEST_SOURCE_DIR=. \
|
||||
..
|
||||
%{__make} %{?_smp_mflags}
|
||||
popd
|
||||
%cmake \
|
||||
-DDOC_INSTALL_DIR:PATH=%{_pkgdocdir} \
|
||||
-DRAPIDJSON_BUILD_CXX11:BOOL=OFF \
|
||||
-DGTESTSRC_FOUND:BOOL=ON \
|
||||
-DGTEST_SOURCE_DIR:PATH=.
|
||||
%cmake_build
|
||||
|
||||
|
||||
%install
|
||||
pushd %{cmake_build_dir}
|
||||
%{__make} install DESTDIR=%{buildroot}
|
||||
popd
|
||||
|
||||
# Move pkgconfig und CMake-stuff to generic datadir.
|
||||
%{__mv} -f %{buildroot}%{_libdir}/* %{buildroot}%{_datadir}
|
||||
|
||||
# Copy the documentation-files to final location.
|
||||
%{__cp} -a CHANGELOG.md readme*.md examples %{buildroot}%{_pkgdocdir}
|
||||
|
||||
# Find and purge build-sys files.
|
||||
%{_bindir}/find %{buildroot} -type f -name 'CMake*.txt' -print0 | \
|
||||
%{_bindir}/xargs -0 %{__rm} -fv
|
||||
|
||||
# Hardlink duplicated files to save space.
|
||||
%{_sbindir}/hardlink -v %{buildroot}%{_includedir}
|
||||
%{_sbindir}/hardlink -v %{buildroot}%{_pkgdocdir}
|
||||
%cmake_install
|
||||
install -pm 644 CHANGELOG.md readme*.md %{buildroot}%{_pkgdocdir}/
|
||||
find %{buildroot} -type f -name 'CMake*.txt' -delete
|
||||
|
||||
|
||||
%check
|
||||
# Valgrind fails on %%ix86 and ppc64le.
|
||||
%ifarch %{ix86} ppc64le
|
||||
CTEST_EXCLUDE=".*valgrind.*"
|
||||
%endif # arch %%{ix86}
|
||||
pushd %{cmake_build_dir}
|
||||
%{_bindir}/ctest -E "${CTEST_EXCLUDE}" -V .
|
||||
popd
|
||||
%ctest
|
||||
|
||||
|
||||
%files devel
|
||||
%license license.txt
|
||||
%dir %{_pkgdocdir}
|
||||
%{_pkgdocdir}/CHANGELOG.md
|
||||
%{_pkgdocdir}/readme*.md
|
||||
%{_libdir}/cmake/RapidJSON/
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_includedir}/%{name}/
|
||||
|
||||
|
||||
%files doc
|
||||
%license license.txt
|
||||
%{_pkgdocdir}/
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 30 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.0-22
|
||||
- Do not force C++11: gtest 1.13.0 requires at least C++14
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Sun Jan 16 2022 Antonio Trande <sagitter@fedoraproject.org> - 1.1.0-18
|
||||
- Build for EPEL9
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Sep 1 2020 Tom Hughes <tom@compton.nu> - 1.1.0-15
|
||||
- Add patch for C++20 support
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 14 2020 Tom Hughes <tom@compton.nu> - 1.1.0-13
|
||||
- Install pkg-config and cmake files to arched location
|
||||
- Build documentation as noarch
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Wed Jun 19 2019 Tom Hughes <tom@compton.nu> - 1.1.0-10
|
||||
- Fix FTBS due to hardlink location change
|
||||
- Tidy up spec file
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user