summaryrefslogtreecommitdiff
path: root/dev-util/cpputest
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-15 06:41:45 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-15 06:41:45 +0000
commit8e26aeaca2a19592a9eea3917f3139bfde8641f0 (patch)
tree3ddb856d2a1de70a5caf3b8f7737425b7f8b0796 /dev-util/cpputest
parent6e1fc32629c46e29012a7e22b07085307d65ac96 (diff)
gentoo auto-resync : 15:01:2025 - 06:41:45
Diffstat (limited to 'dev-util/cpputest')
-rw-r--r--dev-util/cpputest/Manifest6
-rw-r--r--dev-util/cpputest/cpputest-4.0-r1.ebuild (renamed from dev-util/cpputest/cpputest-4.0.ebuild)9
-rw-r--r--dev-util/cpputest/files/cpputest-4.0-autoconf.patch46
-rw-r--r--dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch33
-rw-r--r--dev-util/cpputest/metadata.xml9
5 files changed, 98 insertions, 5 deletions
diff --git a/dev-util/cpputest/Manifest b/dev-util/cpputest/Manifest
index 5285e6c3500b..a4de637c3367 100644
--- a/dev-util/cpputest/Manifest
+++ b/dev-util/cpputest/Manifest
@@ -1,3 +1,5 @@
+AUX cpputest-4.0-autoconf.patch 2164 BLAKE2B 22a4671afe22f8c17e63720528aa886535c869b9370bc83a87fbdf1c444e1d7e32421dae0611fbf84624ecb9b83b7c2b618374635054f81b8f0c4b4ea7f396e4 SHA512 c4f8ee63058750b2e4d84172791f6d51796a1e97cba88f4a880aff1b4471c59048465456da97097b9311a8fa3ab999fd8dadc0580964d129573b3758cdc080b2
+AUX cpputest-4.0-replace-UB-by-abort.patch 1287 BLAKE2B cf02c473b21ed37c6baac040212b0bd14d5773d163f19604479f3e991de155df283b238d95423a2e3b2630e1ae827cc6982da1dfb21375ca8fbdf5bf6905e850 SHA512 8f6a389c3036f6f16901f9c97eba538c41480e7963efc422783c635db0d19f7c6af607dc029b96adf00d093ed27a8acacf15dd0f42b5c1f67061d542606d6783
DIST cpputest-4.0.tar.gz 1163749 BLAKE2B 2ae0f4658662ead0fe5a46a0ae521edf7677a7b64e3c7ce9bad374c4f953ea5a548cdfe1d9128821ab5031211c10f02d0728085e68db02e0d021ea16d8b38f1c SHA512 69f39fffdcd965c871e598118db38ddb74a3e75fd7a7965f8d236029fa891f6fcb6b671147c166ad08482bbd0737537fafe90aa8439a0ab62389f19150cc39d7
-EBUILD cpputest-4.0.ebuild 599 BLAKE2B e674bb652806da1ab46c14b6b4f18aeafbcd78a0173f6ed5b147ff6d06f99af79c3a6b8f027920cbb29e18c0e151b34573cacb1c887429d83ff82d94db4a4ea4 SHA512 142bb03e9ba267e46d6b7728a2d52b9cfc112c679027114e88fa1c7dfd2b71daf026bba6164cc1356bb7459e9e84311fc0c952f8ceae3298d45022869b089a6c
-MISC metadata.xml 250 BLAKE2B 7b7429efdfffa3f08c99039960dcd56ab81d5b850d2623f764c1f094b825902bdba94734fff78429658d9e888b0fb54ca96237b77b2053bb5a705d33286ec6e7 SHA512 14fa4ebdd347467c291d24e1c667cbe78e260cfeb8202a5c627421370b9c4e864ecfce2c0b92a1699623d6ebce19ffe64c4eb668fe66dc18795211433c39c41a
+EBUILD cpputest-4.0-r1.ebuild 698 BLAKE2B 79bf863ba29b4851836e75d1125a4a7dffd41ef8b40682ac6ef5bcfb913c83c944df0d0d5912558dd448fe23132075424f11807dd617209e9fea845274b3ddc3 SHA512 c49a5215ff7e207903961cbb9c29d24d13a364af2bff64e74814109bddc1f261f715b995903f9d08b828057ccb3db8a09a1bc7048ce3e60583ed1ac195735049
+MISC metadata.xml 471 BLAKE2B ec2e0f44d839fe024a9b36f5b11dc55111fadac19041e31cf6f791096668b8da6575a9309996530ab17a565527f38d52ec39b278ca1bf2953553b39bcfbaf96f SHA512 3312b19aef9ee259ffec374ca79c8b4e2faaa9799f9ab58a9ace60ea039a58b0621deb9771f3f433969368aa714854b9bdc1f4e2d348d3345e74143b7cdfee1e
diff --git a/dev-util/cpputest/cpputest-4.0.ebuild b/dev-util/cpputest/cpputest-4.0-r1.ebuild
index 0b624814f4ae..4d8d165e77c2 100644
--- a/dev-util/cpputest/cpputest-4.0.ebuild
+++ b/dev-util/cpputest/cpputest-4.0-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
@@ -19,6 +19,11 @@ DEPEND="test? ( >=dev-cpp/gtest-1.8.0 )"
DOCS=( AUTHORS README.md README_CppUTest_for_C.txt )
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0-autoconf.patch
+ "${FILESDIR}"/${P}-replace-UB-by-abort.patch
+)
+
src_prepare() {
default
eautoreconf
diff --git a/dev-util/cpputest/files/cpputest-4.0-autoconf.patch b/dev-util/cpputest/files/cpputest-4.0-autoconf.patch
new file mode 100644
index 000000000000..fe171d7a5582
--- /dev/null
+++ b/dev-util/cpputest/files/cpputest-4.0-autoconf.patch
@@ -0,0 +1,46 @@
+patch submitted to upstream at https://github.com/cpputest/cpputest/pull/1837
+
+From 2ba7e10e73a1daf7194b83e952df58ce1c985644 Mon Sep 17 00:00:00 2001
+From: "Z. Liu" <zhixu.liu@gmail.com>
+Date: Sun, 12 Jan 2025 23:04:59 +0800
+Subject: [PATCH] configure.ac: fix call of AC_LANG_PROGRAM & unexpected
+ compilation errors
+
+1. multiple line should be enclosed by [[ ]], otherwise compilation of
+ conftest.cpp will failed with:
+ error: extra tokens at end of #include directive [-Werror,-Wextra-tokens]
+2. add #include <cstdint>
+3. size_t -> std::size_t
+
+Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
+---
+ configure.ac | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b19c9eb6..e91c4a27 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -325,13 +325,17 @@ AC_LANG_PUSH([C++])
+ # Can we use operator delete without exception handling specifier? (clang warns on this!)
+ CXXFLAGS="-Werror"
+ AC_MSG_CHECKING([whether CXX supports operator delete without exception handling specifier])
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <new>\nvoid operator delete(void* mem);])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_DELETE_MUST_HAVE_EXCEPTION_SPECIFIER="yes"])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdint>
++#include <new>
++void operator delete(void* mem);]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_DELETE_MUST_HAVE_EXCEPTION_SPECIFIER="yes"])
+ CXXFLAGS="$saved_cxxflags"
+
+ # Can we use operator new with exception specifier (g++4.7 on MacOSX is broken here)
+ CXXFLAGS="-Werror"
+ AC_MSG_CHECKING([whether CXX supports operator new with exception handling specifier])
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <new>\nvoid* operator new(size_t size) throw(std::bad_alloc);;])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_NEW_CANT_HAVE_EXCEPTION_SPECIFIER="yes"])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdint>
++#include <new>
++void* operator new(std::size_t size) throw(std::bad_alloc);;]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_NEW_CANT_HAVE_EXCEPTION_SPECIFIER="yes"])
+ CXXFLAGS="$saved_cxxflags"
+
+ # Flag -Wno-missing-exception-spec
+--
+2.45.2
+
diff --git a/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch b/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch
new file mode 100644
index 000000000000..54dbf24c9411
--- /dev/null
+++ b/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch
@@ -0,0 +1,33 @@
+fix tests hang with clang as reported in https://bugs.gentoo.org/924958
+
+patch from upstream PR at https://github.com/cpputest/cpputest/pull/1679
+commit https://github.com/cpputest/cpputest/commit/094df52c8f6dae1dccb30d0d39dd1eb832ded85c
+adapt to v4.0
+
+diff --git a/src/CppUTest/Utest.cpp b/src/CppUTest/Utest.cpp
+index d078bdf..3cbbcdf 100644
+--- a/src/CppUTest/Utest.cpp
++++ b/src/CppUTest/Utest.cpp
+@@ -153,7 +153,7 @@ UtestShell::~UtestShell()
+ // LCOV_EXCL_START - actually covered but not in .gcno due to race condition
+ static void defaultCrashMethod()
+ {
+- UtestShell* ptr = (UtestShell*) NULLPTR; ptr->countTests();
++ abort();
+ }
+ // LCOV_EXCL_STOP
+
+diff --git a/tests/CppUTest/UtestTest.cpp b/tests/CppUTest/UtestTest.cpp
+index cf6ad1c..a26fb41 100644
+--- a/tests/CppUTest/UtestTest.cpp
++++ b/tests/CppUTest/UtestTest.cpp
+@@ -222,8 +222,7 @@ TEST(UtestShell, TestDefaultCrashMethodInSeparateProcessTest)
+ fixture.runAllTests();
+ fixture.assertPrintContains("Failed in separate process - killed by signal");
+
+- /* Signal 11 usually happens, but with clang3.7 on Linux, it produced signal 4 */
+- CHECK(fixture.getOutput().contains("signal 11") || fixture.getOutput().contains("signal 4"));
++ CHECK(fixture.getOutput().contains("signal 6"));
+ }
+
+ #endif
diff --git a/dev-util/cpputest/metadata.xml b/dev-util/cpputest/metadata.xml
index 8b0fb96a6593..d07ac8206d58 100644
--- a/dev-util/cpputest/metadata.xml
+++ b/dev-util/cpputest/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>zhixu.liu@gmail.com</email>
+ <name>Z. Liu</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="github">cpputest/cpputest</remote-id>
</upstream>