From 25261e846bd3998fce9ccc804caaa22cdacc0fa6 Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Tue, 2 Dec 2025 00:50:56 +0000 Subject: [PATCH] fix(main/rapidjson): fix build with NDK r29 - Cherry-pick https://github.com/Tencent/rapidjson/pull/719 --- packages/rapidjson/build.sh | 2 +- packages/rapidjson/ndk-r29.patch | 45 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 packages/rapidjson/ndk-r29.patch diff --git a/packages/rapidjson/build.sh b/packages/rapidjson/build.sh index c3fb1732de..4fd3498845 100644 --- a/packages/rapidjson/build.sh +++ b/packages/rapidjson/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Fast JSON parser/generator for C++ with SAX/DOM style AP TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="1.1.0" -TERMUX_PKG_REVISION=6 +TERMUX_PKG_REVISION=7 TERMUX_PKG_SRCURL=https://github.com/Tencent/rapidjson/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e TERMUX_PKG_PLATFORM_INDEPENDENT=true diff --git a/packages/rapidjson/ndk-r29.patch b/packages/rapidjson/ndk-r29.patch new file mode 100644 index 0000000000..49552de617 --- /dev/null +++ b/packages/rapidjson/ndk-r29.patch @@ -0,0 +1,45 @@ +From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001 +From: Janusz Chorko +Date: Fri, 26 Aug 2016 21:17:38 +0200 +Subject: [PATCH 1/2] 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 +Date: Fri, 26 Aug 2016 21:26:50 +0200 +Subject: [PATCH 2/2] 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 + 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