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.
This commit is contained in:
Helmut Pozimski 2020-10-27 20:43:15 +01:00
parent c63cda8f53
commit 5b850a362e
2 changed files with 3 additions and 22 deletions

View File

@ -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<GenericValue*>(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<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
- std::memcpy(m, members, count * sizeof(Member));
+ *m = *members;
}
else
SetMembersPointer(0);

View File

@ -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 <egorenar-dev@posteo.net>"
@ -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