summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-antivirus/clamav/clamav-0.104.0-r1.ebuild')
-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