summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-10-21 07:46:53 +0000
committerSam James <sam@gentoo.org>2021-10-21 07:48:50 +0000
commit457fa7bdd57e4610c61450018858d3c0a6791e9d (patch)
treebff0c08bb58b365cf73bc341822541bddc63ce8f /app-antivirus/clamav
parentdev-vcs/hg-evolve: version bumps (diff)
downloadgentoo-457fa7bdd57e4610c61450018858d3c0a6791e9d.tar.gz
gentoo-457fa7bdd57e4610c61450018858d3c0a6791e9d.tar.bz2
gentoo-457fa7bdd57e4610c61450018858d3c0a6791e9d.zip
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@gentoo.org>
Diffstat (limited to 'app-antivirus/clamav')
-rw-r--r--app-antivirus/clamav/clamav-0.104.0-r1.ebuild25
1 files 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 ee0e19b95004..e78447e51d55 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