kumquat-buildroot/package/clamav/clamav.mk
Fabrice Fontaine b526b2aa15 package/clamav: fix CLAMAV_LIBS
The LIBS environment variable is ignored since bump to version 1.0.1 and
switch to cmake build system in commit
203725a46b resulting in the following
build failure:

/home/buildroot/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-musleabihf/12.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: CMakeFiles/clamonacc.dir/inotif/hash.c.o: in function `onas_ht_add_hierarchy':
hash.c:(.text+0xa84): undefined reference to `fts_open'

Fixes: 203725a46b
 - http://autobuild.buildroot.org/results/fe71ab29d02caeed609f1a181fccbd46b6feff65

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-04-07 21:37:04 +02:00

74 lines
1.7 KiB
Makefile

################################################################################
#
# clamav
#
################################################################################
CLAMAV_VERSION = 1.0.5
CLAMAV_SITE = https://www.clamav.net/downloads/production
CLAMAV_LICENSE = GPL-2.0
CLAMAV_LICENSE_FILES = \
COPYING.txt \
COPYING/COPYING.bzip2 \
COPYING/COPYING.file \
COPYING/COPYING.getopt \
COPYING/COPYING.LGPL \
COPYING/COPYING.llvm \
COPYING/COPYING.lzma \
COPYING/COPYING.pcre \
COPYING/COPYING.regex \
COPYING/COPYING.unrar \
COPYING/COPYING.zlib
CLAMAV_CPE_ID_VENDOR = clamav
CLAMAV_SELINUX_MODULES = clamav
# affects only Cisco devices
CLAMAV_IGNORE_CVES += CVE-2016-1405
CLAMAV_DEPENDENCIES = \
bzip2 \
host-pkgconf \
host-rustc \
json-c \
libcurl \
libmspack \
libxml2 \
openssl \
pcre2 \
zlib \
$(TARGET_NLS_DEPENDENCIES)
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
CLAMAV_LIBS += -latomic
endif
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
CLAMAV_DEPENDENCIES += musl-fts
CLAMAV_LIBS += -lfts
endif
CLAMAV_CONF_OPTS = \
-DCMAKE_EXE_LINKER_FLAGS="$(CLAMAV_LIBS)" \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DENABLE_JSON_SHARED=ON \
-DENABLE_MAN_PAGES=OFF \
-DENABLE_MILTER=OFF \
-DENABLE_TESTS=OFF \
-DHAVE_SYSTEM_LFS_FTS=ON \
-DRUST_COMPILER_TARGET=$(RUSTC_TARGET_NAME) \
-Dtest_run_result=ON \
-Dtest_run_result__TRYRUN_OUTPUT=ON
ifeq ($(BR2_PACKAGE_NCURSES),y)
CLAMAV_CONF_OPTS += -DENABLE_APP=ON
CLAMAV_DEPENDENCIES += ncurses
ifeq ($(BR2_INIT_SYSTEMD),y)
CLAMAV_CONF_OPTS += -DENABLE_SYSTEMD=ON
CLAMAV_DEPENDENCIES += systemd
else
CLAMAV_CONF_OPTS += -DENABLE_SYSTEMD=OFF
endif
else
CLAMAV_CONF_OPTS += -DENABLE_APP=OFF -DENABLE_SYSTEMD=OFF
endif
$(eval $(cmake-package))