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>
This commit is contained in:
parent
336a55bb81
commit
457fa7bdd5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue