037572ee56
When json-c is enabled but libcurl is disabled, clamav tries to build the clamsubmit program, which fails with: CC clamsubmit.o clamsubmit.c:6:23: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> This is due to an incorrect curl-config detection logic, leading to /bin/curl-config being present making the configure script believe that curl is available, even when --without-libcurl is explicitly passed. This commit adds a patch, submitted upstream, which fixes this problem. Fixes: http://autobuild.buildroot.net/results/c43d2ebd8ab30016969d642dbd71c297dc5f6bab/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
89 lines
2.3 KiB
Makefile
89 lines
2.3 KiB
Makefile
################################################################################
|
|
#
|
|
# clamav
|
|
#
|
|
################################################################################
|
|
|
|
CLAMAV_VERSION = 0.100.0
|
|
CLAMAV_SITE = https://www.clamav.net/downloads/production
|
|
CLAMAV_LICENSE = GPL-2.0
|
|
CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \
|
|
COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.pcre COPYING.regex \
|
|
COPYING.unrar COPYING.zlib
|
|
CLAMAV_DEPENDENCIES = \
|
|
host-pkgconf \
|
|
libtool \
|
|
openssl \
|
|
zlib \
|
|
$(TARGET_NLS_DEPENDENCIES)
|
|
# 0003-m4-reorganization-libs-curl.m4-fix-curl-config-detec.patch
|
|
CLAMAV_AUTORECONF = YES
|
|
|
|
# mmap cannot be detected when cross-compiling, needed for mempool support
|
|
CLAMAV_CONF_ENV = \
|
|
ac_cv_c_mmap_private=yes \
|
|
have_cv_ipv6=yes
|
|
|
|
# UCLIBC_HAS_FTS is disabled, therefore disable fanotify (missing fts.h)
|
|
CLAMAV_CONF_OPTS = \
|
|
--with-dbdir=/var/lib/clamav \
|
|
--with-ltdl-include=$(STAGING_DIR)/usr/include \
|
|
--with-ltdl-lib=$(STAGING_DIR)/usr/lib \
|
|
--with-openssl=$(STAGING_DIR)/usr \
|
|
--with-zlib=$(STAGING_DIR)/usr \
|
|
--disable-zlib-vcheck \
|
|
--disable-rpath \
|
|
--disable-clamav \
|
|
--disable-fanotify \
|
|
--disable-milter \
|
|
--disable-llvm \
|
|
--disable-clamdtop \
|
|
--enable-mempool
|
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
|
CLAMAV_DEPENDENCIES += bzip2
|
|
# autodetection gets confused if host has bzip2, so force it
|
|
CLAMAV_CONF_ENV += \
|
|
ac_cv_libbz2_libs=-lbz2 \
|
|
ac_cv_libbz2_ltlibs=-lbz2
|
|
else
|
|
CLAMAV_CONF_OPTS += --disable-bzip2
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_JSON_C),y)
|
|
CLAMAV_CONF_OPTS += --with-libjson=$(STAGING_DIR)/usr
|
|
CLAMAV_DEPENDENCIES += json-c
|
|
else
|
|
CLAMAV_CONF_OPTS += --without-libjson
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBXML2),y)
|
|
CLAMAV_CONF_OPTS += --with-xml=$(STAGING_DIR)/usr
|
|
CLAMAV_DEPENDENCIES += libxml2
|
|
else
|
|
CLAMAV_CONF_OPTS += --disable-xml
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
|
CLAMAV_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
|
|
CLAMAV_DEPENDENCIES += libcurl
|
|
else
|
|
CLAMAV_CONF_OPTS += --without-libcurl
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
CLAMAV_CONF_OPTS += --with-iconv
|
|
CLAMAV_DEPENDENCIES += libiconv
|
|
else
|
|
CLAMAV_CONF_OPTS += --without-iconv
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
|
CLAMAV_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr
|
|
CLAMAV_DEPENDENCIES += pcre
|
|
else
|
|
CLAMAV_CONF_OPTS += --without-pcre
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|