dev-libs/uriparser: Fix tests for 0.9.3
authorSebastian Pipping <sping@gentoo.org>
Sun, 28 Apr 2019 15:42:10 +0000 (17:42 +0200)
committerSebastian Pipping <sping@gentoo.org>
Sun, 28 Apr 2019 15:42:10 +0000 (17:42 +0200)
Upstream: https://github.com/uriparser/uriparser/issues/67
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Package-Manager: Portage-2.3.64, Repoman-2.3.12

dev-libs/uriparser/files/uriparser-0.9.3-tests.patch [new file with mode: 0644]
dev-libs/uriparser/uriparser-0.9.3.ebuild

diff --git a/dev-libs/uriparser/files/uriparser-0.9.3-tests.patch b/dev-libs/uriparser/files/uriparser-0.9.3-tests.patch
new file mode 100644 (file)
index 0000000..ad6f1c1
--- /dev/null
@@ -0,0 +1,23 @@
+From f870e6c68696a6018702caa5c8a2feba9b0f99fa Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 28 Apr 2019 17:35:31 +0200
+Subject: [PATCH] tests: No longer crash when compiled with -DNDEBUG (fixes
+ #67)
+
+---
+ test/MemoryManagerSuite.cpp | 2 ++
+ 1 files changed, 2 insertions(+)
+
+diff --git a/test/MemoryManagerSuite.cpp b/test/MemoryManagerSuite.cpp
+index 85f498b..4cda664 100644
+--- a/test/MemoryManagerSuite.cpp
++++ b/test/MemoryManagerSuite.cpp
+@@ -19,6 +19,8 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  */
++#undef NDEBUG  // because we rely on assert(3) further down
++
+ #include <cassert>
+ #include <cerrno>
+ #include <cstring>  // memcpy
index 49ec684913db9c69d6e87498f5e667c3f0f71a1f..0c33c807ef45cb9d6618c85b81d073780ad1c083 100644 (file)
@@ -24,6 +24,10 @@ REQUIRED_USE="test? ( unicode )"
 
 DOCS=( AUTHORS ChangeLog THANKS )
 
+PATCHES=(
+       "${FILESDIR}"/${P}-tests.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                -DBUILD_SHARED_LIBS=ON