[neon/backports-noble/rapidjson/Neon/unstable] debian: initial imoprt

Carlos De Maine null at kde.org
Wed Mar 19 04:24:42 GMT 2025


Git commit 2f3f8e2ac247ed5fb066ad83a7584d16fb4aedcf by Carlos De Maine.
Committed on 19/03/2025 at 04:10.
Pushed by carlosdem into branch 'Neon/unstable'.

initial imoprt

A  +175  -0    debian/changelog
A  +45   -0    debian/control
A  +76   -0    debian/copyright
A  +1    -0    debian/docs
A  +42   -0    debian/patches/0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
A  +57   -0    debian/patches/0001-Fix-Wclass-memaccess-warnings-errors.patch
A  +57   -0    debian/patches/0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch
A  +55   -0    debian/patches/0002-Fix-Wsign-conversion-warnings-errors.patch
A  +41   -0    debian/patches/0003-Suppress-Wformat-overflow-warning-error.patch
A  +25   -0    debian/patches/deal-with-Werror-type-limits.patch
A  +17   -0    debian/patches/disable-valgrind_unittest.diff
A  +65   -0    debian/patches/fix-privacy-breach.patch
A  +22   -0    debian/patches/gcc12_encdedstreamtest.patch
A  +34   -0    debian/patches/gcc12_valuetest.patch
A  +24   -0    debian/patches/gcc7.diff
A  +118  -0    debian/patches/no-jsoncheckertest.diff
A  +10   -0    debian/patches/python3.diff
A  +14   -0    debian/patches/series
A  +11   -0    debian/patches/set-doc-dir.diff
A  +1    -0    debian/rapidjson-dev.dirs
A  +3    -0    debian/rapidjson-dev.install
A  +1    -0    debian/rapidjson-doc.install
A  +14   -0    debian/rules
A  +4    -0    debian/source.lintian-overrides
A  +1    -0    debian/source/format
A  +3    -0    debian/watch

https://invent.kde.org/neon/backports-noble/rapidjson/-/commit/2f3f8e2ac247ed5fb066ad83a7584d16fb4aedcf

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a759b35
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,175 @@
+rapidjson (1.1.0+git-0neon) noble; urgency=medium
+
+  * Non-maintainer upload.
+  * package git master as opentimelineio requires newer version
+
+ -- KDE neon <neon at kde.org>  Wed, 19 Mar 2025 14:08:21 +1000
+
+rapidjson (1.1.0+dfsg2-7.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/rules: Switch to C++ 14 to fix FTBFS with googletest >= 1.13.0
+    (Closes: #1041027)
+
+ -- Micha Lenk <micha at debian.org>  Sun, 21 Apr 2024 15:12:21 +0200
+
+rapidjson (1.1.0+dfsg2-7.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS with GCC 12. (Closes: #1016229)
+
+ -- Reiner Herrmann <reiner at reiner-h.de>  Sat, 15 Oct 2022 18:10:14 +0200
+
+rapidjson (1.1.0+dfsg2-7) unstable; urgency=medium
+
+  * Do not use -arch=native on ppc64 and cross-compilation:
+    Add 0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch and
+    0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
+    (Closes: #976944).
+  * Add deal-with-Werror-type-limits.patch:
+    Disable -Werror=type-limits on archs other then amd64. (Closes: #976536)
+
+ -- Alexander GQ Gerasiov <gq at debian.org>  Thu, 07 Jan 2021 16:45:27 +0300
+
+rapidjson (1.1.0+dfsg2-6) unstable; urgency=medium
+
+  [ Matthias Klose ]
+  * Build using python3 (Closes: #943192).
+
+  [ Alexander GQ Gerasiov ]
+  * d/control: Bump debhelper's compatibility.
+  * d/control: Suggests doc package.
+  * d/control: Bump Standards-Version (no changes needed).
+  * Add fix-privacy-breach.patch: removes external images from docs.
+  * d/rapidjson-dev.install: Install pkg-config and cmake files to arch-independent dir.
+
+ -- Alexander GQ Gerasiov <gq at debian.org>  Wed, 06 May 2020 10:26:30 +0300
+
+rapidjson (1.1.0+dfsg2-5) unstable; urgency=medium
+
+  [ Ondřej Nový ]
+  * d/copyright: Use https protocol in Format field
+  * d/changelog: Remove trailing whitespaces
+  * d/control: Remove trailing whitespaces
+  * d/rules: Remove trailing whitespaces
+
+  [ Alexander GQ Gerasiov ]
+  * d/watch: Fix dversionmangle.
+
+ -- Alexander GQ Gerasiov <gq at debian.org>  Thu, 31 Jan 2019 23:23:56 +0300
+
+rapidjson (1.1.0+dfsg2-4) unstable; urgency=medium
+
+  * Add patches to deal with gcc 8.0 errors. Fixes FTBFS (Closes: #906406)
+
+ -- Alexander GQ Gerasiov <gq at debian.org>  Wed, 12 Sep 2018 02:55:49 +0300
+
+rapidjson (1.1.0+dfsg2-3) unstable; urgency=medium
+
+  * Remove outdated debian/source/include-binaries.
+  * Add debian/patches/set-doc-dir.diff: Install docs to
+    /usr/share/doc/rapidjson-doc.
+  * debian/rules: Totally simplify rules file.
+  * debian/control: Remove outdated gcc dependence.
+  * Increase dh compatibility level.
+  * Bump Standards-Version to 4.1.3 (no additional changes needed).
+  * debian/control: Take package ownership (Closes: #893199.)
+  * debian/control: Mark packages as Multi-Arch: foreign.
+
+ -- Alexander GQ Gerasiov <gq at debian.org>  Tue, 27 Mar 2018 12:47:14 +0300
+
+rapidjson (1.1.0+dfsg2-2) unstable; urgency=medium
+
+  * upload to unstable
+
+  * move Maintainer: to Debian QA Group <packages at qa.debian.org>
+  * add Vcs-* (salsa)
+
+ -- Rene Engelhard <rene at debian.org>  Sat, 17 Mar 2018 08:30:29 +0000
+
+rapidjson (1.1.0+dfsg2-1) experimental; urgency=medium
+
+  * (really) remove bin/jsonchecker/* (again) (closes: #884078)
+
+ -- Rene Engelhard <rene at debian.org>  Mon, 08 Jan 2018 08:47:38 +0100
+
+rapidjson (1.1.0+dfsg-3) experimental; urgency=medium
+
+  * add upstream patches to fix build with gcc 7 (closes: #873231)
+
+ -- Rene Engelhard <rene at debian.org>  Sat, 26 Aug 2017 16:49:27 +0000
+
+rapidjson (1.1.0+dfsg-2) experimental; urgency=medium
+
+  * make .install even more strict to not install bogus /usr/include/gtest
+    (closes: #846568)
+
+ -- Rene Engelhard <rene at debian.org>  Sat, 03 Dec 2016 01:05:45 +0100
+
+rapidjson (1.1.0+dfsg-1) experimental; urgency=medium
+
+  * remove bin/jsonchecker/* (closes: #840333) and disable the unit test
+    using it
+  * don't bogusly install usr/lib/libgtest*.a
+
+ -- Rene Engelhard <rene at debian.org>  Wed, 30 Nov 2016 22:42:45 +0100
+
+rapidjson (1.1.0-1) experimental; urgency=medium
+
+  * New upstream release
+
+  * add debian/watch
+
+ -- Rene Engelhard <rene at debian.org>  Tue, 30 Aug 2016 22:54:00 +0200
+
+rapidjson (1.0.2-2) experimental; urgency=medium
+
+  * add missing python to Build-Depends
+
+  * run the $(MAKE)s in build and run manual $(MAKE) install - no idea
+    why it worked here locally...
+
+ -- Rene Engelhard <rene at debian.org>  Thu, 24 Sep 2015 21:54:16 +0000
+
+rapidjson (1.0.2-1) experimental; urgency=medium
+
+  * New upstream release (closes: #799899)
+
+  * remove jquery.js link in rapidjson-doc.
+
+ -- Rene Engelhard <rene at debian.org>  Thu, 24 Sep 2015 17:48:39 +0200
+
+rapidjson (0.12~git20141031-3) unstable; urgency=medium
+
+  * oops, g++ has an epoch..
+
+ -- Rene Engelhard <rene at debian.org>  Sun, 02 Aug 2015 17:58:25 +0200
+
+rapidjson (0.12~git20141031-2) unstable; urgency=medium
+
+  * build-depend on g++ (>= 5) to work around segfault in the tests
+    (closes: #792070)
+
+ -- Rene Engelhard <rene at debian.org>  Sun, 02 Aug 2015 11:45:01 +0000
+
+rapidjson (0.12~git20141031-1) unstable; urgency=low
+
+  * new upstream snapshot
+
+  [Philipp A. Hartmann]
+  * install only doc/html
+  * remove obsolete/unintended include-binaries
+  * update debian/copyight and debian/control
+  * remove unndeeded libjson and libyajl from Build-Depends
+  * add libgtest-dev as build dependency and add `use-system-gtest.diff' patch
+    to point to system-wide Google test sources
+  * drop SSE4.2 hack
+  * run tests on all platforms
+
+ -- Rene Engelhard <rene at debian.org>  Sun, 02 Nov 2014 12:47:05 +0100
+
+rapidjson (0.12~git20140926-1) unstable; urgency=low
+
+  * Initial release (Closes: #763453)
+
+ -- Rene Engelhard <rene at debian.org>  Sun, 26 Oct 2014 18:49:47 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6a17283
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,45 @@
+Source: rapidjson
+Priority: optional
+Maintainer: Alexander GQ Gerasiov <gq at debian.org>
+Build-Depends: debhelper-compat (= 12), cmake, doxygen, libgtest-dev, python3
+Standards-Version: 4.5.0
+Section: libs
+Homepage: https://miloyip.github.io/rapidjson
+Vcs-Git: https://salsa.debian.org/debian/rapidjson.git
+Vcs-Browser: https://salsa.debian.org/debian/rapidjson
+
+Package: rapidjson-dev
+Section: libdevel
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Suggests: rapidjson-doc
+Description: fast JSON parser/generator for C++ with SAX/DOM style API
+ RapidJSON is an attempt to create the fastest JSON parser and generator.
+ .
+  - Small but complete. Supports both SAX and DOM style API. SAX parser only a
+    few hundred lines of code.
+  - Fast. In the order of magnitude of strlen(). Optionally supports
+    SSE2/SSE4.2 for acceleration.
+  - Self-contained. Minimal dependency on standard libraries. No BOOST, not
+    even STL.
+  - Compact. Each JSON value is 16 or 20 bytes for 32 or 64-bit machines
+    respectively (excluding text string storage). With the custom memory
+    allocator, parser allocates memory compactly during parsing.
+  - Full RFC7159 compliance. Supports UTF-8, UTF-16 and UTF-32.
+  - Support both in-situ parsing (directly decode strings into the source JSON
+    text) and non-destructive parsing (decode strings into new buffers).
+  - Parse number to int/unsigned/int64_t/uint64_t/double depending on input
+  - Support custom memory allocation. Also, the default memory pool allocator
+    can also be supplied with a user buffer (such as a buffer allocated on
+    user's heap or programme stack) to minimize allocation.
+
+Package: rapidjson-doc
+Section: doc
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: fast JSON parser/generator for C++ (API documentation)
+ This package contains the documentation for RapidJSON, a fast JSON
+ parser/generator for C++ with both SAX/DOM style APIs.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e76cef3
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,76 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: rapidjson
+Source: https://github.com/miloyip/rapidjson
+Files-Excluded: bin/jsonchecker/*
+
+Files: *
+Copyright: Copyright (C) 2011-2014 Milo Yip
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+Files: include/rapidjson/msinttypes/*
+Copyright: Copyright (c) 2006-2013 Alexander Chemeris
+License: BSD-3-clause
+ Copyright (c) 2006-2013 Alexander Chemeris
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+ .
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+ .
+    3. Neither the name of the product nor the names of its contributors may
+       be used to endorse or promote products derived from this software
+       without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: 2014 Rene Engelhard <rene at debian.org>
+           2014 Philipp A. Hartmann <pah at qo.cx>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..cdb5f04
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+readme.md
diff --git a/debian/patches/0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch b/debian/patches/0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
new file mode 100644
index 0000000..b86c7ef
--- /dev/null
+++ b/debian/patches/0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
@@ -0,0 +1,42 @@
+From 4c9a28a28e078ef7e1eb7e98cdb2dfabd4b378ca Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer <eb at emlix.com>
+Date: Fri, 24 Nov 2017 15:48:43 +0100
+Subject: [PATCH] CMake: do not pass -march=native or -mcpu=native when
+ crosscompiling
+
+---
+ CMakeLists.txt | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,12 +50,14 @@
+ endif(CCACHE_FOUND)
+ 
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
++    if(NOT CMAKE_CROSSCOMPILING)
+     if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
+     else()
+       #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+     endif()
++    endif()
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
+     if (RAPIDJSON_BUILD_CXX11)
+         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
+@@ -79,12 +81,14 @@
+         endif()
+     endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
++    if(NOT CMAKE_CROSSCOMPILING)
+     if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
+     else()
+       #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+     endif()
++    endif()
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
+     if (RAPIDJSON_BUILD_CXX11)
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
diff --git a/debian/patches/0001-Fix-Wclass-memaccess-warnings-errors.patch b/debian/patches/0001-Fix-Wclass-memaccess-warnings-errors.patch
new file mode 100644
index 0000000..ee14248
--- /dev/null
+++ b/debian/patches/0001-Fix-Wclass-memaccess-warnings-errors.patch
@@ -0,0 +1,57 @@
+From fa5963a2f5b231ee2babff771f169ccca22870ed Mon Sep 17 00:00:00 2001
+From: Philipp A Hartmann <pah at qo.cx>
+Date: Sun, 15 Jul 2018 14:17:14 +0200
+Subject: [PATCH 1/3] Fix -Wclass-memaccess warnings/errors
+
+Recent GCC versions warn about using memcpy/memmove to
+write to a class pointer (-Wclass-memaccess).
+
+Avoid the warnings by casting to void* first.
+
+Closes #1086.
+Closes #1205.
+Closes #1246.
+---
+ include/rapidjson/document.h | 20 +++++---------------
+ 1 file changed, 5 insertions(+), 15 deletions(-)
+
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -1425,7 +1425,7 @@
+         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 @@
+         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 @@
+         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 @@
+         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);
diff --git a/debian/patches/0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch b/debian/patches/0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch
new file mode 100644
index 0000000..ed33326
--- /dev/null
+++ b/debian/patches/0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch
@@ -0,0 +1,57 @@
+From c4db88a3142548ea342e1fd971bf2a08aa70c7eb Mon Sep 17 00:00:00 2001
+From: Wu Zhao <wuzhaozju at gmail.com>
+Date: Wed, 26 Oct 2016 17:27:54 +0800
+Subject: [PATCH] support IBM PowerPC / ppc64 / ppc64le and XL compiler
+
+Avoid POWER platform compiling error and support IBM XL C++ compiler on
+Linux / AIX.
+---
+ CMakeLists.txt | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ceda71b1..8ccda4be 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,7 +50,13 @@ if(CCACHE_FOUND)
+ endif(CCACHE_FOUND)
+ 
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
++    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
++      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
++    else()
++      #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
++      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
++    endif()
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
+     if (RAPIDJSON_BUILD_CXX11)
+         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
+             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+@@ -73,7 +79,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+         endif()
+     endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers")
++    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
++      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
++    else()
++      #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
++      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
++    endif()
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
+     if (RAPIDJSON_BUILD_CXX11)
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+     endif()
+@@ -90,6 +102,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+     add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
++elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qarch=auto")
+ endif()
+ 
+ #add extra search paths for libraries and includes
+-- 
+2.29.2
+
diff --git a/debian/patches/0002-Fix-Wsign-conversion-warnings-errors.patch b/debian/patches/0002-Fix-Wsign-conversion-warnings-errors.patch
new file mode 100644
index 0000000..5c5d3d4
--- /dev/null
+++ b/debian/patches/0002-Fix-Wsign-conversion-warnings-errors.patch
@@ -0,0 +1,55 @@
+From a26267d16dcdc22a15722917a51dc50cdc8aaac0 Mon Sep 17 00:00:00 2001
+From: Philipp A Hartmann <pah at qo.cx>
+Date: Sun, 15 Jul 2018 16:01:02 +0200
+Subject: [PATCH 2/3] Fix -Wsign-conversion warnings/errors
+
+GCC 8 (incorrectly) warns about sign conversions in (constant)
+array size expressions:
+
+error: conversion to 'long unsigned int' from 'int' may
+change the sign of the result [-Werror=sign-conversion]
+     char schemaBuffer_[128 * 1024];
+
+Make these expressions unsigned by adding a 'u' suffix to
+the first operands.
+---
+ include/rapidjson/schema.h   | 2 +-
+ test/unittest/schematest.cpp | 2 +-
+ test/unittest/simdtest.cpp   | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/include/rapidjson/schema.h
++++ b/include/rapidjson/schema.h
+@@ -400,7 +400,7 @@
+                 enum_ = static_cast<uint64_t*>(allocator_->Malloc(sizeof(uint64_t) * v->Size()));
+                 for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) {
+                     typedef Hasher<EncodingType, MemoryPoolAllocator<> > EnumHasherType;
+-                    char buffer[256 + 24];
++                    char buffer[256u + 24];
+                     MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer));
+                     EnumHasherType h(&hasherAllocator, 256);
+                     itr->Accept(h);
+--- a/test/unittest/schematest.cpp
++++ b/test/unittest/schematest.cpp
+@@ -1117,7 +1117,7 @@
+     typename DocumentType::AllocatorType documentAllocator_;
+     typename SchemaDocumentType::AllocatorType schemaAllocator_;
+     char documentBuffer_[16384];
+-    char schemaBuffer_[128 * 1024];
++    char schemaBuffer_[128u * 1024];
+ };
+ 
+ TEST(SchemaValidator, TestSuite) {
+--- a/test/unittest/simdtest.cpp
++++ b/test/unittest/simdtest.cpp
+@@ -105,8 +105,8 @@
+ 
+ template <unsigned parseFlags, typename StreamType>
+ void TestScanCopyUnescapedString() {
+-    char buffer[1024 + 5 + 32];
+-    char backup[1024 + 5 + 32];
++    char buffer[1024u + 5 + 32];
++    char backup[1024u + 5 + 32];
+ 
+     // Test "ABCDABCD...\\"
+     for (size_t offset = 0; offset < 32; offset++) {
diff --git a/debian/patches/0003-Suppress-Wformat-overflow-warning-error.patch b/debian/patches/0003-Suppress-Wformat-overflow-warning-error.patch
new file mode 100644
index 0000000..54c9e5c
--- /dev/null
+++ b/debian/patches/0003-Suppress-Wformat-overflow-warning-error.patch
@@ -0,0 +1,41 @@
+From 152511689bd9b9cdeed6a580479698e13df056b6 Mon Sep 17 00:00:00 2001
+From: Philipp A Hartmann <pah at qo.cx>
+Date: Sun, 15 Jul 2018 16:02:03 +0200
+Subject: [PATCH 3/3] Suppress -Wformat-overflow warning/error
+
+GCC 7 and later warn about overflow/truncation when using
+sprintf and related functions with fixed-size buffers.
+
+Suppress the warning in schematest.cpp.
+---
+ test/perftest/schematest.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/test/perftest/schematest.cpp b/test/perftest/schematest.cpp
+index 468f5fe6..7d27344b 100644
+--- a/test/perftest/schematest.cpp
++++ b/test/perftest/schematest.cpp
+@@ -11,6 +11,11 @@
+ 
+ using namespace rapidjson;
+ 
++RAPIDJSON_DIAG_PUSH
++#if defined(__GNUC__) && __GNUC__ >= 7
++RAPIDJSON_DIAG_OFF(format-overflow)
++#endif
++
+ template <typename Allocator>
+ static char* ReadFile(const char* filename, Allocator& allocator) {
+     const char *paths[] = {
+@@ -42,6 +47,8 @@ static char* ReadFile(const char* filename, Allocator& allocator) {
+     return json;
+ }
+ 
++RAPIDJSON_DIAG_POP
++
+ class Schema : public PerfTest {
+ public:
+     Schema() {}
+-- 
+2.18.0
+
diff --git a/debian/patches/deal-with-Werror-type-limits.patch b/debian/patches/deal-with-Werror-type-limits.patch
new file mode 100644
index 0000000..a6989f5
--- /dev/null
+++ b/debian/patches/deal-with-Werror-type-limits.patch
@@ -0,0 +1,25 @@
+--- a/example/CMakeLists.txt
++++ b/example/CMakeLists.txt
+@@ -31,6 +31,10 @@
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
+ endif()
+ 
++if (NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=type-limits")
++endif()
++
+ foreach (example ${EXAMPLES})
+     add_executable(${example} ${example}/${example}.cpp)
+ endforeach()
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ find_package(GTestSrc)
+ 
++if (NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=type-limits")
++endif()
++
+ IF(GTESTSRC_FOUND)
+     enable_testing()
+ 
diff --git a/debian/patches/disable-valgrind_unittest.diff b/debian/patches/disable-valgrind_unittest.diff
new file mode 100644
index 0000000..cd410a9
--- /dev/null
+++ b/debian/patches/disable-valgrind_unittest.diff
@@ -0,0 +1,17 @@
+--- rapidjson-1.0.2.orig/test/unittest/CMakeLists.txt
++++ rapidjson-1.0.2/test/unittest/CMakeLists.txt
+@@ -37,10 +37,10 @@ add_test(NAME unittest
+     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+ 
+ if(NOT MSVC)
+-    # Not running SIMD.* unit test cases for Valgrind
+-    add_test(NAME valgrind_unittest
+-        COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
+-        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
++#    # Not running SIMD.* unit test cases for Valgrind
++#    add_test(NAME valgrind_unittest
++#        COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
++#        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+ 
+     if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+         add_test(NAME symbol_check
diff --git a/debian/patches/fix-privacy-breach.patch b/debian/patches/fix-privacy-breach.patch
new file mode 100644
index 0000000..ea6737b
--- /dev/null
+++ b/debian/patches/fix-privacy-breach.patch
@@ -0,0 +1,65 @@
+--- a/readme.md
++++ b/readme.md
+@@ -1,7 +1,5 @@
+ ![](doc/logo/rapidjson.png)
+ 
+-![](https://img.shields.io/badge/release-v1.1.0-blue.png)
+-
+ ## A fast JSON parser/generator for C++ with both SAX/DOM style API 
+ 
+ Tencent is pleased to support the open source community by making RapidJSON available.
+@@ -14,18 +12,6 @@
+   * [简体中文](http://rapidjson.org/zh-cn/)
+   * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/) with downloadable PDF/EPUB/MOBI, without API reference.
+ 
+-## Build status
+-
+-| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] |
+-| :---------------: | :-----------------: | :-------------------: |
+-| ![lin-badge]      | ![win-badge]        | ![cov-badge]          |
+-
+-[lin-badge]: https://travis-ci.org/miloyip/rapidjson.png?branch=master "Travis build status"
+-[lin-link]:  https://travis-ci.org/miloyip/rapidjson "Travis build status"
+-[win-badge]: https://ci.appveyor.com/api/projects/status/u658dcuwxo14a8m9/branch/master "AppVeyor build status"
+-[win-link]:  https://ci.appveyor.com/project/miloyip/rapidjson/branch/master "AppVeyor build status"
+-[cov-badge]: https://coveralls.io/repos/miloyip/rapidjson/badge.png?branch=master
+-[cov-link]:  https://coveralls.io/r/miloyip/rapidjson?branch=master
+ 
+ ## Introduction
+ 
+--- a/readme.zh-cn.md
++++ b/readme.zh-cn.md
+@@ -1,7 +1,5 @@
+ ![](doc/logo/rapidjson.png)
+ 
+-![](https://img.shields.io/badge/release-v1.1.0-blue.png)
+-
+ ## 高效的 C++ JSON 解析/生成器,提供 SAX 及 DOM 风格 API
+ 
+ Tencent is pleased to support the open source community by making RapidJSON available.
+@@ -14,18 +12,6 @@
+   * [简体中文](http://rapidjson.org/zh-cn/)
+   * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/) 可下载 PDF/EPUB/MOBI,但不含 API 参考手册。
+ 
+-## Build 状态
+-
+-| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] |
+-| :---------------: | :-----------------: | :-------------------: |
+-| ![lin-badge]      | ![win-badge]        | ![cov-badge]          |
+-
+-[lin-badge]: https://travis-ci.org/miloyip/rapidjson.png?branch=master "Travis build status"
+-[lin-link]:  https://travis-ci.org/miloyip/rapidjson "Travis build status"
+-[win-badge]: https://ci.appveyor.com/api/projects/status/u658dcuwxo14a8m9/branch/master "AppVeyor build status"
+-[win-link]:  https://ci.appveyor.com/project/miloyip/rapidjson/branch/master "AppVeyor build status"
+-[cov-badge]: https://coveralls.io/repos/miloyip/rapidjson/badge.png?branch=master
+-[cov-link]:  https://coveralls.io/r/miloyip/rapidjson?branch=master
+ 
+ ## 简介
+ 
+@@ -149,4 +135,4 @@
+  * [prettyauto](https://github.com/miloyip/rapidjson/blob/master/example/prettyauto/prettyauto.cpp): [pretty](https://github.com/miloyip/rapidjson/blob/master/example/pretty/pretty.cpp) 的修改版本,可自动处理任何 UTF 编码的 JSON。
+  * [parsebyparts](https://github.com/miloyip/rapidjson/blob/master/example/parsebyparts/parsebyparts.cpp): 这例子中的 `AsyncDocumentParser` 类使用 C++ 线程来逐段解析 JSON。
+  * [filterkey](https://github.com/miloyip/rapidjson/blob/master/example/filterkey/filterkey.cpp): 移取使用者指定的键值的命令行工具。
+- * [filterkeydom](https://github.com/miloyip/rapidjson/blob/master/example/filterkey/filterkey.cpp): 如上的工具,但展示如何使用生成器(generator)去填充一个 `Document`。
+\ No newline at end of file
++ * [filterkeydom](https://github.com/miloyip/rapidjson/blob/master/example/filterkey/filterkey.cpp): 如上的工具,但展示如何使用生成器(generator)去填充一个 `Document`。
diff --git a/debian/patches/gcc12_encdedstreamtest.patch b/debian/patches/gcc12_encdedstreamtest.patch
new file mode 100644
index 0000000..e585491
--- /dev/null
+++ b/debian/patches/gcc12_encdedstreamtest.patch
@@ -0,0 +1,22 @@
+From 2b2c80450031028439ba2a17a09ef5aa10f2159b Mon Sep 17 00:00:00 2001
+From: Tom Briden <tom at decompile.me.uk>
+Date: Sun, 15 May 2022 10:20:21 +0100
+Subject: [PATCH] encdedstreamtest: fix use-after-free compile error with
+ gcc-12
+
+---
+ test/unittest/encodedstreamtest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/test/unittest/encodedstreamtest.cpp
++++ b/test/unittest/encodedstreamtest.cpp
+@@ -113,8 +113,8 @@
+                 EXPECT_EQ(expected, actual);
+             }
+             EXPECT_EQ('\0', s.Peek());
+-            free(data);
+             EXPECT_EQ(size, eis.Tell());
++            free(data);
+         }
+     }
+ 
diff --git a/debian/patches/gcc12_valuetest.patch b/debian/patches/gcc12_valuetest.patch
new file mode 100644
index 0000000..dc77db5
--- /dev/null
+++ b/debian/patches/gcc12_valuetest.patch
@@ -0,0 +1,34 @@
+From 1f59c69cd18cd508395fe0bb5c2f8ee909e3c48d Mon Sep 17 00:00:00 2001
+From: Tom Briden <tom at decompile.me.uk>
+Date: Sun, 15 May 2022 10:15:26 +0100
+Subject: [PATCH] valuetest: fix potential write of terminating nul past the
+ end of the destination
+
+Fixes 2 compile errors with gcc-12, eg:
+
+tesunittest/valuetest.cpp:1516:30: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
+test/unittest/valuetest.cpp:1516:20: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10
+---
+ test/unittest/valuetest.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/test/unittest/valuetest.cpp
++++ b/test/unittest/valuetest.cpp
+@@ -1512,7 +1512,7 @@
+     {
+         int i = 0;
+         for (auto& m : x.GetObject()) {
+-            char name[10];
++            char name[11];
+             sprintf(name, "%d", i);
+             EXPECT_STREQ(name, m.name.GetString());
+             EXPECT_EQ(i, m.value.GetInt());
+@@ -1523,7 +1523,7 @@
+     {
+         int i = 0;
+         for (const auto& m : const_cast<const Value&>(x).GetObject()) {
+-            char name[10];
++            char name[11];
+             sprintf(name, "%d", i);
+             EXPECT_STREQ(name, m.name.GetString());
+             EXPECT_EQ(i, m.value.GetInt());
diff --git a/debian/patches/gcc7.diff b/debian/patches/gcc7.diff
new file mode 100644
index 0000000..f753552
--- /dev/null
+++ b/debian/patches/gcc7.diff
@@ -0,0 +1,24 @@
+Description: fix build with gcc7
+ From
+ https://github.com/miloyip/rapidjson/commit/fe19b7b6016d446722621fb407738209d1a911e8 
+and
+ https://github.com/miloyip/rapidjson/commit/cba45fe9de6923b858edb0780e257b7257aa4f7b
+Bug-Debian: https://bugs.debian.org/846568
+
+---
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2017-08-26
+
+--- rapidjson-1.1.0+dfsg.orig/include/rapidjson/internal/regex.h
++++ rapidjson-1.1.0+dfsg/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
diff --git a/debian/patches/no-jsoncheckertest.diff b/debian/patches/no-jsoncheckertest.diff
new file mode 100644
index 0000000..196bcb9
--- /dev/null
+++ b/debian/patches/no-jsoncheckertest.diff
@@ -0,0 +1,118 @@
+Description: remove the unittest using bin/jsonchecker/*
+ as that one is removed from the tarball due to having this insane
+ 'good not evil' "license
+Author: Rene Engelhard <rene at debian.org>
+Bug-Debian: https://bugs.debian.org/840333
+
+--- rapidjson-0.12~git20141031+dfsg.orig/test/unittest/jsoncheckertest.cpp
++++ /dev/null
+@@ -1,99 +0,0 @@
+-// Tencent is pleased to support the open source community by making RapidJSON available.
+-// 
+-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+-//
+-// Licensed under the MIT License (the "License"); you may not use this file except
+-// in compliance with the License. You may obtain a copy of the License at
+-//
+-// http://opensource.org/licenses/MIT
+-//
+-// Unless required by applicable law or agreed to in writing, software distributed 
+-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
+-// CONDITIONS OF ANY KIND, either express or implied. See the License for the 
+-// specific language governing permissions and limitations under the License.
+-
+-#include "unittest.h"
+-
+-#include "rapidjson/document.h"
+-
+-using namespace rapidjson;
+-
+-static char* ReadFile(const char* filename, size_t& length) {
+-    const char *paths[] = {
+-        "jsonchecker",
+-        "bin/jsonchecker",
+-        "../bin/jsonchecker",
+-        "../../bin/jsonchecker",
+-        "../../../bin/jsonchecker"
+-    };
+-    char buffer[1024];
+-    FILE *fp = 0;
+-    for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
+-        sprintf(buffer, "%s/%s", paths[i], filename);
+-        fp = fopen(buffer, "rb");
+-        if (fp)
+-            break;
+-    }
+-
+-    if (!fp)
+-        return 0;
+-
+-    fseek(fp, 0, SEEK_END);
+-    length = static_cast<size_t>(ftell(fp));
+-    fseek(fp, 0, SEEK_SET);
+-    char* json = static_cast<char*>(malloc(length + 1));
+-    size_t readLength = fread(json, 1, length, fp);
+-    json[readLength] = '\0';
+-    fclose(fp);
+-    return json;
+-}
+-
+-TEST(JsonChecker, Reader) {
+-    char filename[256];
+-
+-    // jsonchecker/failXX.json
+-    for (int i = 1; i <= 33; i++) {
+-        if (i == 1) // fail1.json is valid in rapidjson, which has no limitation on type of root element (RFC 7159).
+-            continue;
+-        if (i == 18)    // fail18.json is valid in rapidjson, which has no limitation on depth of nesting.
+-            continue;
+-
+-        sprintf(filename, "fail%d.json", i);
+-        size_t length;
+-        char* json = ReadFile(filename, length);
+-        if (!json) {
+-            printf("jsonchecker file %s not found", filename);
+-            ADD_FAILURE();
+-            continue;
+-        }
+-
+-        GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
+-        document.Parse(json);
+-        EXPECT_TRUE(document.HasParseError());
+-
+-        document.Parse<kParseIterativeFlag>(json);
+-        EXPECT_TRUE(document.HasParseError());
+-
+-        free(json);
+-    }
+-
+-    // passX.json
+-    for (int i = 1; i <= 3; i++) {
+-        sprintf(filename, "pass%d.json", i);
+-        size_t length;
+-        char* json = ReadFile(filename, length);
+-        if (!json) {
+-            printf("jsonchecker file %s not found", filename);
+-            continue;
+-        }
+-
+-        GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
+-        document.Parse(json);
+-        EXPECT_FALSE(document.HasParseError());
+-
+-        document.Parse<kParseIterativeFlag>(json);
+-        EXPECT_FALSE(document.HasParseError());
+-
+-        free(json);
+-    }
+-}
+--- rapidjson-1.1.0+dfsg.orig/test/unittest/CMakeLists.txt
++++ rapidjson-1.1.0+dfsg/test/unittest/CMakeLists.txt
+@@ -11,7 +11,6 @@ set(UNITTEST_SOURCES
+     filestreamtest.cpp
+     itoatest.cpp
+     istreamwrappertest.cpp
+-    jsoncheckertest.cpp
+     namespacetest.cpp
+     pointertest.cpp
+     prettywritertest.cpp
diff --git a/debian/patches/python3.diff b/debian/patches/python3.diff
new file mode 100644
index 0000000..84848ff
--- /dev/null
+++ b/debian/patches/python3.diff
@@ -0,0 +1,10 @@
+Index: b/bin/jsonschema/bin/jsonschema_suite
+===================================================================
+--- a/bin/jsonschema/bin/jsonschema_suite
++++ b/bin/jsonschema/bin/jsonschema_suite
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/python3
+ from __future__ import print_function
+ import sys
+ import textwrap
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a2d3247
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,14 @@
+fix-privacy-breach.patch
+set-doc-dir.diff
+disable-valgrind_unittest.diff
+no-jsoncheckertest.diff
+gcc7.diff
+0001-Fix-Wclass-memaccess-warnings-errors.patch
+0002-Fix-Wsign-conversion-warnings-errors.patch
+0003-Suppress-Wformat-overflow-warning-error.patch
+python3.diff
+0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch
+0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
+deal-with-Werror-type-limits.patch
+gcc12_encdedstreamtest.patch
+gcc12_valuetest.patch
diff --git a/debian/patches/set-doc-dir.diff b/debian/patches/set-doc-dir.diff
new file mode 100644
index 0000000..e0a6e44
--- /dev/null
+++ b/debian/patches/set-doc-dir.diff
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -95,7 +95,7 @@
+ #add extra search paths for libraries and includes
+ SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
+ SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install")
+-SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation")
++SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/rapidjson-doc" CACHE PATH "Path to the documentation")
+ 
+ IF(UNIX OR CYGWIN)
+     SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
diff --git a/debian/rapidjson-dev.dirs b/debian/rapidjson-dev.dirs
new file mode 100644
index 0000000..e43b95c
--- /dev/null
+++ b/debian/rapidjson-dev.dirs
@@ -0,0 +1 @@
+usr/include
diff --git a/debian/rapidjson-dev.install b/debian/rapidjson-dev.install
new file mode 100644
index 0000000..3b67fff
--- /dev/null
+++ b/debian/rapidjson-dev.install
@@ -0,0 +1,3 @@
+usr/lib/cmake usr/share
+usr/lib/pkgconfig usr/share
+usr/include/rapidjson
diff --git a/debian/rapidjson-doc.install b/debian/rapidjson-doc.install
new file mode 100644
index 0000000..7276ecd
--- /dev/null
+++ b/debian/rapidjson-doc.install
@@ -0,0 +1 @@
+usr/share/doc
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..88cd405
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# Needed since googletest 1.13.0 (see #1041027)
+export DEB_CXXFLAGS_MAINT_APPEND = -std=c++14
+
+%:
+	dh $@
+
+override_dh_auto_configure:
+	# Needed since googletest 1.13.0 (see #1041027)
+	dh_auto_configure -- -DRAPIDJSON_BUILD_CXX11=OFF
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
new file mode 100644
index 0000000..7f0d932
--- /dev/null
+++ b/debian/source.lintian-overrides
@@ -0,0 +1,4 @@
+# we don't ship thse thirdparty libs here, afaics.
+# license.txt is outdated but fixing it causes the same error
+# come up for the patch, so...
+rapidjson: license-problem-json-evil license.txt
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..9b164a8
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/rapidjson-$1\.tar\.gz/,dversionmangle=s/\+(debian|dfsg|ds|deb)(\d+)?$//,repacksuffix=+dfsg,repack,compression=xz \
+  https://github.com/miloyip/rapidjson/tags .*/v?(\d\S*)\.tar\.gz


More information about the Neon-commits mailing list