diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 16:47:34 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 16:47:34 -0500 |
| commit | dda948891d3731927b821ce31f9d9a2d03ba20c5 (patch) | |
| tree | 99cd40be4cbb0606260da212cd81b8ab2db9da9b /dev-util/cpputest | |
| parent | a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (diff) | |
| download | baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.gz baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.xz baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.zip | |
Adding metadata
Diffstat (limited to 'dev-util/cpputest')
| -rw-r--r-- | dev-util/cpputest/Manifest | 1 | ||||
| -rw-r--r-- | dev-util/cpputest/cpputest-4.0-r1.ebuild | 40 | ||||
| -rw-r--r-- | dev-util/cpputest/files/cpputest-4.0-autoconf.patch | 46 | ||||
| -rw-r--r-- | dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch | 33 | ||||
| -rw-r--r-- | dev-util/cpputest/metadata.xml | 13 |
5 files changed, 133 insertions, 0 deletions
diff --git a/dev-util/cpputest/Manifest b/dev-util/cpputest/Manifest new file mode 100644 index 000000000000..ac81a89d7d2a --- /dev/null +++ b/dev-util/cpputest/Manifest @@ -0,0 +1 @@ +DIST cpputest-4.0.tar.gz 1163749 BLAKE2B 2ae0f4658662ead0fe5a46a0ae521edf7677a7b64e3c7ce9bad374c4f953ea5a548cdfe1d9128821ab5031211c10f02d0728085e68db02e0d021ea16d8b38f1c SHA512 69f39fffdcd965c871e598118db38ddb74a3e75fd7a7965f8d236029fa891f6fcb6b671147c166ad08482bbd0737537fafe90aa8439a0ab62389f19150cc39d7 diff --git a/dev-util/cpputest/cpputest-4.0-r1.ebuild b/dev-util/cpputest/cpputest-4.0-r1.ebuild new file mode 100644 index 000000000000..d6f93c1a648b --- /dev/null +++ b/dev-util/cpputest/cpputest-4.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools dot-a + +DESCRIPTION="Unit testing and mocking framework for C/C++" +HOMEPAGE="https://cpputest.github.io/ https://github.com/cpputest/cpputest" +SRC_URI="https://github.com/cpputest/cpputest/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86" +IUSE="test" +RESTRICT="!test? ( test )" + +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 +} + +src_configure() { + lto-guarantee-fat + default +} + +src_install() { + default + strip-lto-bytecode +} 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 new file mode 100644 index 000000000000..12ee43c859ba --- /dev/null +++ b/dev-util/cpputest/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <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> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
