summaryrefslogtreecommitdiff
path: root/dev-util/cunit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-util/cunit
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-util/cunit')
-rw-r--r--dev-util/cunit/Manifest2
-rw-r--r--dev-util/cunit/cunit-2.1_p3-r1.ebuild61
-rw-r--r--dev-util/cunit/files/cunit-2.1_p3-ncurses-format-security.patch51
3 files changed, 114 insertions, 0 deletions
diff --git a/dev-util/cunit/Manifest b/dev-util/cunit/Manifest
index d1f00b52b2db..4181c77c0286 100644
--- a/dev-util/cunit/Manifest
+++ b/dev-util/cunit/Manifest
@@ -1,3 +1,5 @@
+AUX cunit-2.1_p3-ncurses-format-security.patch 2392 BLAKE2B 9d224a4de5a2dc9cb2bcdc7eb925214f90819693cf8f052e91f87d7e09171d5b80881a61b8cd59ba75883c0bf24afd387d3a590d144791a1fe4a472303d599c8 SHA512 31dc914f4a4fc2a575ba77225b16494e8678ad2b1180f8621665be255abed3b7514f254652a241d1a0ecd4e43c1c3bd435f68d1bd7f58cf868f5e0ca748b4c0d
DIST CUnit-2.1-3.tar.bz2 514500 BLAKE2B 919ff3345c06de44662deb3c43700dc14f3c6b0b1557e162f1f527b782874082bc866b3bbc3fd18869b975d7a0a6b4730eab87ed36847249ff8fa5cbede27797 SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487
+EBUILD cunit-2.1_p3-r1.ebuild 1463 BLAKE2B 6266f6c5855f1d990c83fb5ed7fe823594dfc933e2efd7233678c4db7c4ee9ad1061a2f211dece51768db155f44b3e83fb2ad51ec217aee6a2c1b1beddaa831e SHA512 ce08c9f0f2af29a7c42190166c5f4850079398f5de9ef9fb5fd8a28b5f60c5d36085304ecb302f98e89b0d0d52fda6d0d1e9e7deb373352b78bcc32a898415b8
EBUILD cunit-2.1_p3.ebuild 1384 BLAKE2B b7e2778fdcd4b1c987e8e3aec8ca035e1f5532e7a2ccb22c4171c462cc2c13651491c4d8caf78e3a1b489e210c62f8fdfcc3a1907d1c0aa6cdeacd5453b629f3 SHA512 7c08768e38c7d2822965d7251152bb48aec604069b13cd0c37636b0ec4aa55b2c837304c5e9505729fae7d526c475c7db008aaee69e250363d0ec9e18b9dbff0
MISC metadata.xml 243 BLAKE2B b273312b5c9fbc82a77d8e6b2ce0364ae677c0863242438533aa5dd20f2fd3a27e4ecb63d76a5ad5647153297201239ae63968f9df4672232a5a01627d68ff82 SHA512 335883ce339777d06e702563a9122c0862154ad9551980d8534a3e158c1cc7ff120a18b2172c099c5a5dc469a4ddf2d57039ef0faa003e623e0459a882a42eb0
diff --git a/dev-util/cunit/cunit-2.1_p3-r1.ebuild b/dev-util/cunit/cunit-2.1_p3-r1.ebuild
new file mode 100644
index 000000000000..1c4e3118cc87
--- /dev/null
+++ b/dev-util/cunit/cunit-2.1_p3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+MY_PN="CUnit"
+MY_PV="${PV/_p*}-3"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="C Unit Test Framework"
+HOMEPAGE="http://cunit.sourceforge.net"
+SRC_URI="mirror://sourceforge/cunit/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="ncurses static-libs"
+
+RDEPEND="ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1_p3-ncurses-format-security.patch
+)
+
+src_prepare() {
+ default
+
+ sed -e "/^docdir/d" -i doc/Makefile.am || die
+ sed -e '/^dochdrdir/{s:$(prefix)/doc/@PACKAGE@:$(docdir):}' \
+ -i doc/headers/Makefile.am || die
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die
+
+ mv configure.{in,ac} || die
+ eautoreconf
+
+ append-cppflags -D_BSD_SOURCE
+
+ # unable to find headers otherwise
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local LIBS=${LIBS}
+ append-libs $($(tc-getPKG_CONFIG) --libs ncurses)
+
+ econf \
+ $(use_enable static-libs static) \
+ --disable-debug \
+ $(use_enable ncurses curses)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -type f -delete || die
+}
diff --git a/dev-util/cunit/files/cunit-2.1_p3-ncurses-format-security.patch b/dev-util/cunit/files/cunit-2.1_p3-ncurses-format-security.patch
new file mode 100644
index 000000000000..5403d9dc7dbb
--- /dev/null
+++ b/dev-util/cunit/files/cunit-2.1_p3-ncurses-format-security.patch
@@ -0,0 +1,51 @@
+https://sources.debian.org/patches/cunit/2.1-3-dfsg-2.4/fix-string-format-errors-with-recent-ncu.patch/
+
+From: Sven Joachim <svenjoac@gmx.de>
+Date: Wed, 13 Oct 2021 19:23:18 +0200
+X-Dgit-Generated: 2.1-3-dfsg-3 74c029a14c5195c79122d44c3777a169d8cc535f
+Subject: Fix string format errors with recent ncurses
+
+
+--- a/CUnit/Sources/Curses/Curses.c
++++ b/CUnit/Sources/Curses/Curses.c
+@@ -952,11 +952,11 @@ static void show_suite_level_help(CU_pSu
+
+ snprintf(szTemp, STRING_LENGTH, _("Commands: R - run all tests in suite %s"),
+ pSuite->pName);
+- mvwprintw(details_pad.pPad, 0, 0, szTemp);
++ mvwprintw(details_pad.pPad, 0, 0, "%s", szTemp);
+ mvwprintw(details_pad.pPad, 1, 0, _(" S - Select and run a test"));
+ snprintf(szTemp, STRING_LENGTH, _(" L - List all tests registered in suite %s"),
+ pSuite->pName);
+- mvwprintw(details_pad.pPad, 2, 0, szTemp);
++ mvwprintw(details_pad.pPad, 2, 0, "%s", szTemp);
+ mvwprintw(details_pad.pPad, 3, 0, _(" A - Activate or deactivate a test (toggle)"));
+ mvwprintw(details_pad.pPad, 4, 0, _(" F - Show failures from last test run"));
+ mvwprintw(details_pad.pPad, 5, 0, _(" M - Move up to main menu"));
+@@ -1068,14 +1068,14 @@ static void list_tests(CU_pSuite pSuite)
+ }
+
+ snprintf(szTemp, STRING_LENGTH, "%s: %s", _("Suite"), pSuite->pName);
+- mvwprintw(details_pad.pPad, 0, 0, szTemp);
++ mvwprintw(details_pad.pPad, 0, 0, "%s", szTemp);
+
+ snprintf(szTemp, STRING_LENGTH,
+ "%*s %-*s%*s",
+ width[0], _("#"),
+ width[1], _("Test Name"),
+ width[2], _("Active?"));
+- mvwprintw(details_pad.pPad, 1, 0, szTemp);
++ mvwprintw(details_pad.pPad, 1, 0, "%s", szTemp);
+
+ for (i = 0, pCurTest = pSuite->pTest ;
+ NULL != pCurTest ;
+@@ -1158,7 +1158,7 @@ static STATUS curses_set_options_run(voi
+
+ snprintf(szTemp, STRING_LENGTH, _(" 1 - Inactive suites/tests treated as runtime failures %s"),
+ (CU_FALSE != CU_get_fail_on_inactive()) ? _("Yes") : _("No "));
+- mvwprintw(details_pad.pPad, 2, 0, szTemp);
++ mvwprintw(details_pad.pPad, 2, 0, "%s", szTemp);
+ refresh_details_window();
+ read_input_string(_("Enter number of option to change : "), szTemp, STRING_LENGTH);
+ option_num = atol(szTemp);
+