From 5b850a362ec99bdfa8c6a7bc260bb82bed7ad44a Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Tue, 27 Oct 2020 20:43:15 +0100 Subject: [PATCH] rapidjson: remove faulty patch and ignore errors for now the patch intended to fix compilation broke rapidjson as documented in https://github.com/void-linux/void-packages/issues/25912 I verified this by compiling and running the test suite with and without the patch applied. There is a proposed fix in https://github.com/Tencent/rapidjson/pull/1698 which seemingly was rejected by the upstream developers, the issue is documented at https://github.com/Tencent/rapidjson/issues/1700. Since upstream insists that what they are doing is correct, make the compiler ignore the errors for now. Alternatively, we could still apply the proposed patch to our package. --- .../patches/0002-gcc81-copy-assignment.patch | 20 ------------------- srcpkgs/rapidjson/template | 5 +++-- 2 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 srcpkgs/rapidjson/patches/0002-gcc81-copy-assignment.patch diff --git a/srcpkgs/rapidjson/patches/0002-gcc81-copy-assignment.patch b/srcpkgs/rapidjson/patches/0002-gcc81-copy-assignment.patch deleted file mode 100644 index c4ddd8a0a3..0000000000 --- a/srcpkgs/rapidjson/patches/0002-gcc81-copy-assignment.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- include/rapidjson/document.h 2016-08-25 09:59:05.000000000 +0200 -+++ include/rapidjson/document.h 2018-05-30 09:55:35.028135241 +0200 -@@ -1936,7 +1936,7 @@ - if (count) { - GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); - SetElementsPointer(e); -- std::memcpy(e, values, count * sizeof(GenericValue)); -+ *e = *values; - } - else - SetElementsPointer(0); -@@ -1949,7 +1949,7 @@ - if (count) { - Member* m = static_cast(allocator.Malloc(count * sizeof(Member))); - SetMembersPointer(m); -- std::memcpy(m, members, count * sizeof(Member)); -+ *m = *members; - } - else - SetMembersPointer(0); diff --git a/srcpkgs/rapidjson/template b/srcpkgs/rapidjson/template index 84a5e60877..8597f8fb27 100644 --- a/srcpkgs/rapidjson/template +++ b/srcpkgs/rapidjson/template @@ -1,7 +1,7 @@ # Template file for 'rapidjson' pkgname=rapidjson version=1.1.0 -revision=3 +revision=4 build_style=cmake short_desc="Fast JSON parser/generator for C++ with both SAX/DOM style API" maintainer="Alexander Egorenkov " @@ -10,7 +10,8 @@ homepage="https://github.com/miloyip/rapidjson" distfiles="https://github.com/miloyip/${pkgname}/archive/v${version}.tar.gz" checksum=bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e -CXXFLAGS="-Wno-type-limits" +# class-memaccess is required by https://github.com/Tencent/rapidjson/issues/1700 +CXXFLAGS="-Wno-type-limits -Wno-error=class-memaccess" post_patch() { # Remove bin/jsonchecker, which is the JSON licensed files