package created using the webbuild interface [release 1.1.0-1mamba;Mon Mar 15 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 17:21:22 +01:00
parent 0b37500600
commit c6d52575fa
4 changed files with 136 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# rapidjson # rapidjson
A fast JSON parser/generator for C++ with both SAX/DOM style API.

View File

@ -0,0 +1,19 @@
commit e61866f098098422462e8bc220506443e76c3bb0
Author: Björn Esser <me@besser82.io>
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)

View 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

84
rapidjson.spec Normal file
View File

@ -0,0 +1,84 @@
Name: rapidjson
Version: 1.1.0
Release: 1mamba
Summary: A fast JSON parser/generator for C++ with both SAX/DOM style API
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/Tencent/rapidjson
Source: https://github.com/Tencent/rapidjson.git/v%{version}/rapidjson-%{version}.tar.bz2
Patch0: rapidjson-1.1.0-gcc-10.2.0.patch
Patch1: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch
License: MIT
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: cmake
%description
A fast JSON parser/generator for C++ with both SAX/DOM style API.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
%description -n lib%{name}-devel
This package contains header files for developing applications that use %{name}.
#% debug_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# From Fedora
# 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 -d build \
-DDOC_INSTALL_DIR=%{_docdir}/%{name} \
-DGTESTSRC_FOUND=TRUE \
-DGTEST_SOURCE_DIR=.
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/rapidjson
%{_includedir}/rapidjson/*.h
%dir %{_includedir}/rapidjson/error
%{_includedir}/rapidjson/error/*.h
%dir %{_includedir}/rapidjson/internal
%{_includedir}/rapidjson/internal/*.h
%dir %{_includedir}/rapidjson/msinttypes
%{_includedir}/rapidjson/msinttypes/*.h
%dir %{_libdir}/cmake/RapidJSON
%{_libdir}/cmake/RapidJSON/RapidJSON*.cmake
%{_libdir}/pkgconfig/RapidJSON.pc
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/*
%changelog
* Mon Mar 15 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.0-1mamba
- package created using the webbuild interface