[packages/rapidjson] add upstream fixes for compilation failure; rel 2

atler atler at pld-linux.org
Thu May 9 19:24:42 CEST 2024


commit 634b07938f9e6d8588d2e30f447559d2a1c471d5
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu May 9 19:01:57 2024 +0200

    add upstream fixes for compilation failure; rel 2
    
    /usr/include/rapidjson/document.h: In member function 'rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)':
    /usr/include/rapidjson/document.h:319:82: error: assignment of read-only member 'rapidjson::GenericStringRef<CharType>::length'

 git-fixes.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
 rapidjson.spec  |  4 +++-
 2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/rapidjson.spec b/rapidjson.spec
index 52e4dac..34cfcd9 100644
--- a/rapidjson.spec
+++ b/rapidjson.spec
@@ -2,13 +2,14 @@ Summary:	Fast JSON parser and generator for C++
 Summary(pl.UTF-8):	Szybki parser i generator JSON-a dla C++
 Name:		rapidjson
 Version:	1.1.0
-Release:	1
+Release:	2
 License:	MIT
 Group:		Libraries
 #Source0Download: https://github.com/Tencent/rapidjson/releases
 Source0:	https://github.com/miloyip/rapidjson/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	badd12c511e081fec6c89c43a7027bce
 Patch0:		%{name}-1.1.0-do_not_include_gtest_src_dir.patch
+Patch1:		git-fixes.patch
 URL:		http://miloyip.github.io/rapidjson
 BuildRequires:	cmake
 BuildRequires:	doxygen
@@ -102,6 +103,7 @@ Dokumentacja do biblioteki RapidJSON.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # Disable -Werror.
 find . -type f -name 'CMakeLists.txt' -print0 | \
diff --git a/git-fixes.patch b/git-fixes.patch
new file mode 100644
index 0000000..b8ce149
--- /dev/null
+++ b/git-fixes.patch
@@ -0,0 +1,44 @@
+From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001
+From: Janusz Chorko <janusz.chorko at apdu.pl>
+Date: Fri, 26 Aug 2016 21:17:38 +0200
+Subject: [PATCH] Removed non-compiling assignment operator. Fixed #718
+
+---
+ include/rapidjson/document.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
+index e3e20dfbd..b0f1f70be 100644
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -316,8 +316,6 @@ struct GenericStringRef {
+ 
+     GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
+ 
+-    GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+-
+     //! implicit conversion to plain CharType pointer
+     operator const Ch *() const { return s; }
+ 
+From 862c39be371278a45a88d4d1d75164be57bb7e2d Mon Sep 17 00:00:00 2001
+From: Janusz Chorko <janusz.chorko at apdu.pl>
+Date: Fri, 26 Aug 2016 21:26:50 +0200
+Subject: [PATCH] Explicitly disable copy assignment operator
+
+---
+ include/rapidjson/document.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
+index b0f1f70be..19f5a6a5f 100644
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -326,6 +326,8 @@ struct GenericStringRef {
+     //! Disallow construction from non-const array
+     template<SizeType N>
+     GenericStringRef(CharType (&str)[N]) /* = delete */;
++    //! Copy assignment operator not permitted - immutable type
++    GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
+ };
+ 
+ //! Mark a character pointer as constant string
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rapidjson.git/commitdiff/634b07938f9e6d8588d2e30f447559d2a1c471d5



More information about the pld-cvs-commit mailing list