]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/clamav/clamav.mk
clamav: fix configure breakage after zlib 1.2.10 version bump
[coffee/buildroot.git] / package / clamav / clamav.mk
1 ################################################################################
2 #
3 # clamav
4 #
5 ################################################################################
6
7 CLAMAV_VERSION = 0.99.2
8 CLAMAV_SITE = https://www.clamav.net/downloads/production
9 CLAMAV_LICENSE = GPLv2
10 CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \
11         COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.pcre COPYING.regex \
12         COPYING.unrar COPYING.zlib
13 CLAMAV_DEPENDENCIES = \
14         host-pkgconf \
15         openssl \
16         zlib \
17         $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
18
19 # mmap cannot be detected when cross-compiling, needed for mempool support
20 CLAMAV_CONF_ENV = \
21         ac_cv_c_mmap_private=yes \
22         have_cv_ipv6=yes
23
24 # UCLIBC_HAS_FTS is disabled, therefore disable fanotify (missing fts.h)
25 CLAMAV_CONF_OPTS = \
26         --with-dbdir=/var/lib/clamav \
27         --with-openssl=$(STAGING_DIR)/usr \
28         --with-zlib=$(STAGING_DIR)/usr \
29         --disable-zlib-vcheck \
30         --disable-rpath \
31         --disable-clamav \
32         --disable-fanotify \
33         --disable-milter \
34         --disable-llvm \
35         --disable-clamdtop \
36         --enable-mempool
37
38 ifeq ($(BR2_PACKAGE_BZIP2),y)
39 CLAMAV_DEPENDENCIES += bzip2
40 # autodetection gets confused if host has bzip2, so force it
41 CLAMAV_CONF_ENV += \
42         ac_cv_libbz2_libs=-lbz2 \
43         ac_cv_libbz2_ltlibs=-lbz2
44 else
45 CLAMAV_CONF_OPTS += --disable-bzip2
46 endif
47
48 ifeq ($(BR2_PACKAGE_LIBXML2),y)
49 CLAMAV_CONF_OPTS += --with-xml=$(STAGING_DIR)/usr
50 CLAMAV_DEPENDENCIES += libxml2
51 else
52 CLAMAV_CONF_OPTS += --disable-xml
53 endif
54
55 ifeq ($(BR2_PACKAGE_LIBCURL),y)
56 CLAMAV_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
57 CLAMAV_DEPENDENCIES += libcurl
58 else
59 CLAMAV_CONF_OPTS += --without-libcurl
60 endif
61
62 ifeq ($(BR2_PACKAGE_LIBICONV),y)
63 CLAMAV_CONF_OPTS += --with-iconv
64 CLAMAV_DEPENDENCIES += libiconv
65 else
66 CLAMAV_CONF_OPTS += --without-iconv
67 endif
68
69 ifeq ($(BR2_PACKAGE_PCRE),y)
70 CLAMAV_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr
71 CLAMAV_DEPENDENCIES += pcre
72 else
73 CLAMAV_CONF_OPTS += --without-pcre
74 endif
75
76 $(eval $(autotools-package))