From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1332335-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7A3BF158086 for <garchives@archives.gentoo.org>; Thu, 21 Oct 2021 07:49:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECD61E087E; Thu, 21 Oct 2021 07:49:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D01D6E087E for <gentoo-commits@lists.gentoo.org>; Thu, 21 Oct 2021 07:49:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F155F3434AD for <gentoo-commits@lists.gentoo.org>; Thu, 21 Oct 2021 07:48:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 519DF132 for <gentoo-commits@lists.gentoo.org>; Thu, 21 Oct 2021 07:48:58 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1634802530.457fa7bdd57e4610c61450018858d3c0a6791e9d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-antivirus/clamav/clamav-0.104.0-r1.ebuild X-VCS-Directories: app-antivirus/clamav/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 457fa7bdd57e4610c61450018858d3c0a6791e9d X-VCS-Branch: master Date: Thu, 21 Oct 2021 07:48:58 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 75b9df48-7529-4f22-9949-76060e9906be X-Archives-Hash: b21a7d599e28d8684099ebbf7a85e950 commit: 457fa7bdd57e4610c61450018858d3c0a6791e9d Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Oct 21 07:46:53 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Oct 21 07:48:50 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=457fa7bd app-antivirus/clamav: fix running tests - Adapt to CMake (don't use 'emake ...' anymore): use the default cmake_src_test which does the job for us; - Pretend Valgrind isn't installed to avoid running expensive, somewhat flaky (within sandbox etc), and demanding tests (need certain config on the host to ensure Valgrind works properly); - Depend on pytest for tests too as per upstream. Used to generate some of the test files. Closes: https://bugs.gentoo.org/818673 Signed-off-by: Sam James <sam <AT> gentoo.org> app-antivirus/clamav/clamav-0.104.0-r1.ebuild | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/app-antivirus/clamav/clamav-0.104.0-r1.ebuild b/app-antivirus/clamav/clamav-0.104.0-r1.ebuild index ee0e19b9500..e78447e51d5 100644 --- a/app-antivirus/clamav/clamav-0.104.0-r1.ebuild +++ b/app-antivirus/clamav/clamav-0.104.0-r1.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit cmake flag-o-matic systemd tmpfiles +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake flag-o-matic python-any-r1 systemd tmpfiles DESCRIPTION="Clam Anti-Virus Scanner" HOMEPAGE="https://www.clamav.net/" @@ -44,7 +45,11 @@ CDEPEND="acct-group/clamav # TODO: there is no way to use this with the new build system instead of the bundled one # dev-libs/tomsfastmath BDEPEND="virtual/pkgconfig - doc? ( app-doc/doxygen )" + doc? ( app-doc/doxygen ) + test? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]') + )" DEPEND="${CDEPEND} test? ( dev-libs/check )" RDEPEND="${CDEPEND} @@ -54,6 +59,14 @@ PATCHES=( "${FILESDIR}/${PN}-0.104.0-ncurses_detection.patch" ) +python_check_deps() { + has_version -b "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + src_configure() { use elibc_musl && append-ldflags -lfts use ppc64 && append-flags -mminimal-toc @@ -76,6 +89,10 @@ src_configure() { -DENABLE_DOXYGEN=$(usex doc) -DENABLE_UNRAR=$(usex rar ON OFF) -DENABLE_TESTS=$(usex test ON OFF) + # Used to enable some more tests but doesn't behave well in + # sandbox necessarily(?) + needs certain debug symbols present + # in e.g. glibc. + -DCMAKE_DISABLE_FIND_PACKAGE_Valgrind=ON -DENABLE_STATIC_LIB=OFF -DENABLE_SHARED_LIB=ON -DENABLE_SYSTEMD=$(usex systemd ON OFF) @@ -177,10 +194,6 @@ src_install() { find "${ED}" -name '*.la' -delete || die } -src_test() { - emake quick-check -} - pkg_postinst() { if ! use libclamav-only ; then if use systemd ; then