gnu: rapidjson: Update to 1.1.0-1.949c771.
* gnu/packages/patches/rapidjson-gcc-compat.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/web.scm (rapidjson): Update to 1.1.0-1.949c771. [source]: Remove obsolete patch.
This commit is contained in:
parent
abda97b645
commit
00cf71df80
3 changed files with 34 additions and 99 deletions
gnu
|
@ -1827,7 +1827,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/ragel-char-signedness.patch \
|
%D%/packages/patches/ragel-char-signedness.patch \
|
||||||
%D%/packages/patches/randomjungle-disable-static-build.patch \
|
%D%/packages/patches/randomjungle-disable-static-build.patch \
|
||||||
%D%/packages/patches/range-v3-build-with-gcc10.patch \
|
%D%/packages/patches/range-v3-build-with-gcc10.patch \
|
||||||
%D%/packages/patches/rapidjson-gcc-compat.patch \
|
|
||||||
%D%/packages/patches/raptor2-heap-overflow.patch \
|
%D%/packages/patches/raptor2-heap-overflow.patch \
|
||||||
%D%/packages/patches/ratpoints-sturm_and_rp_private.patch \
|
%D%/packages/patches/ratpoints-sturm_and_rp_private.patch \
|
||||||
%D%/packages/patches/ratpoison-shell.patch \
|
%D%/packages/patches/ratpoison-shell.patch \
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
Disable -Werror=implicit-fallthrough on GCC7 and later. Taken from upstream:
|
|
||||||
https://github.com/Tencent/rapidjson/commit/fe19b7b6016d446722621fb407738209d1a911e8
|
|
||||||
https://github.com/Tencent/rapidjson/commit/cba45fe9de6923b858edb0780e257b7257aa4f7b
|
|
||||||
|
|
||||||
diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h
|
|
||||||
index 422a5240..d4039716 100644
|
|
||||||
--- a/include/rapidjson/internal/regex.h
|
|
||||||
+++ b/include/rapidjson/internal/regex.h
|
|
||||||
@@ -29,6 +29,9 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough)
|
|
||||||
#ifdef __GNUC__
|
|
||||||
RAPIDJSON_DIAG_PUSH
|
|
||||||
RAPIDJSON_DIAG_OFF(effc++)
|
|
||||||
+#if __GNUC__ >= 7
|
|
||||||
+RAPIDJSON_DIAG_OFF(implicit-fallthrough)
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
|
|
||||||
Cast destination pointers to avoid a GCC error about memmove writing to
|
|
||||||
a different type.
|
|
||||||
|
|
||||||
Adapted from this upstream commit:
|
|
||||||
https://github.com/Tencent/rapidjson/commit/fa5963a2f5b231ee2babff771f169ccca22870ed
|
|
||||||
|
|
||||||
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
|
|
||||||
--- a/include/rapidjson/document.h
|
|
||||||
+++ b/include/rapidjson/document.h
|
|
||||||
@@ -1425,7 +1425,7 @@ public:
|
|
||||||
MemberIterator pos = MemberBegin() + (first - MemberBegin());
|
|
||||||
for (MemberIterator itr = pos; itr != last; ++itr)
|
|
||||||
itr->~Member();
|
|
||||||
- std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
|
|
||||||
+ std::memmove(static_cast<void*>(&*pos), &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
|
|
||||||
data_.o.size -= static_cast<SizeType>(last - first);
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
@@ -1628,8 +1628,8 @@ public:
|
|
||||||
RAPIDJSON_ASSERT(last <= End());
|
|
||||||
ValueIterator pos = Begin() + (first - Begin());
|
|
||||||
for (ValueIterator itr = pos; itr != last; ++itr)
|
|
||||||
- itr->~GenericValue();
|
|
||||||
- std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
|
|
||||||
+ itr->~GenericValue();
|
|
||||||
+ std::memmove(static_cast<void*>(pos), last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
|
|
||||||
data_.a.size -= static_cast<SizeType>(last - first);
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
@@ -1936,7 +1936,7 @@ private:
|
|
||||||
if (count) {
|
|
||||||
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
|
|
||||||
SetElementsPointer(e);
|
|
||||||
- std::memcpy(e, values, count * sizeof(GenericValue));
|
|
||||||
+ std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
SetElementsPointer(0);
|
|
||||||
@@ -1949,7 +1949,7 @@ private:
|
|
||||||
if (count) {
|
|
||||||
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
|
|
||||||
SetMembersPointer(m);
|
|
||||||
- std::memcpy(m, members, count * sizeof(Member));
|
|
||||||
+ std::memcpy(static_cast<void*>(m), members, count * sizeof(Member));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
SetMembersPointer(0);
|
|
|
@ -1428,39 +1428,41 @@ current version of any major web browser.")
|
||||||
(license license:bsd-3)))
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public rapidjson
|
(define-public rapidjson
|
||||||
(package
|
;; Last release was in 2016, but this commit is from 2023.
|
||||||
(name "rapidjson")
|
(let ((commit "949c771b03de448bdedea80c44a4a5f65284bfeb")
|
||||||
(version "1.1.0")
|
(revision "1"))
|
||||||
(source (origin
|
(package
|
||||||
(method git-fetch)
|
(name "rapidjson")
|
||||||
(uri (git-reference
|
(version (git-version "1.1.0" revision commit))
|
||||||
(url "https://github.com/Tencent/rapidjson")
|
(source (origin
|
||||||
(commit (string-append "v" version))))
|
(method git-fetch)
|
||||||
(file-name (git-file-name name version))
|
(uri (git-reference
|
||||||
(sha256
|
(url "https://github.com/Tencent/rapidjson")
|
||||||
(base32
|
(commit commit)))
|
||||||
"1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab"))
|
(file-name (git-file-name name version))
|
||||||
(patches (search-patches "rapidjson-gcc-compat.patch"))
|
(sha256
|
||||||
(modules '((guix build utils)))
|
(base32
|
||||||
(snippet
|
"1xlj0cj88ls3avwmlhd2gf5757fjpfbqx6qf49z1mzi381gcl72m"))
|
||||||
'(begin
|
(modules '((guix build utils)))
|
||||||
;; Remove code using the problematic JSON license (see
|
(snippet
|
||||||
;; <https://www.gnu.org/licenses/license-list.html#JSON>).
|
'(begin
|
||||||
(delete-file-recursively "bin/jsonchecker")))))
|
;; Remove code using the problematic JSON license (see
|
||||||
(build-system cmake-build-system)
|
;; <https://www.gnu.org/licenses/license-list.html#JSON>).
|
||||||
(arguments
|
(delete-file-recursively "bin/jsonchecker")))))
|
||||||
'(#:phases
|
(build-system cmake-build-system)
|
||||||
(modify-phases %standard-phases
|
(arguments
|
||||||
(add-after 'unpack 'fix-march=native
|
'(#:phases
|
||||||
(lambda _
|
(modify-phases %standard-phases
|
||||||
(substitute* "CMakeLists.txt"
|
(add-after 'unpack 'fix-march=native
|
||||||
(("-m[^-]*=native") "")))))))
|
(lambda _
|
||||||
(home-page "https://github.com/Tencent/rapidjson")
|
(substitute* "CMakeLists.txt"
|
||||||
(synopsis "JSON parser/generator for C++ with both SAX/DOM style API")
|
(("-m[^-]*=native") "")))))))
|
||||||
(description
|
(home-page "https://github.com/Tencent/rapidjson")
|
||||||
"RapidJSON is a fast JSON parser/generator for C++ with both SAX/DOM
|
(synopsis "JSON parser/generator for C++ with both SAX/DOM style API")
|
||||||
|
(description
|
||||||
|
"RapidJSON is a fast JSON parser/generator for C++ with both SAX/DOM
|
||||||
style API.")
|
style API.")
|
||||||
(license license:expat)))
|
(license license:expat))))
|
||||||
|
|
||||||
(define-public yajl
|
(define-public yajl
|
||||||
(package
|
(package
|
||||||
|
|
Reference in a new issue