summaryrefslogtreecommitdiff
path: root/security/clamav/options.mk
blob: 0bea29e38dcc2a6d9ba14e7e3a132b9c157fe095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $NetBSD: options.mk,v 1.5 2016/02/01 12:45:38 jperkin Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.clamav
PKG_SUPPORTED_OPTIONS=	milter clamav-experimental unit-test

.include "../../mk/bsd.options.mk"

PLIST_VARS+=	milter

.if !empty(PKG_OPTIONS:Mmilter)
# force use of pkgsrc version of libmilter -- clamav uses the sendmail binary
# to check API compatibility(!), so it must build with as new a version of
# libmilter as pkgsrc is capable of providing
USE_BUILTIN.libmilter=	no
.  include "../../mail/libmilter/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-milter
PLIST.milter=		yes
SMF_INSTANCES+=		clamav-milter
.else
CONFIGURE_ARGS+=	--disable-milter
# XXX --disable-milter doesn't work as expected, so we need this
CONFIGURE_ENV+=		ac_cv_header_libmilter_mfapi_h=no
.endif

.if !empty(PKG_OPTIONS:Mclamav-experimental)
CONFIGURE_ARGS+=	--enable-experimental
.endif

# Enable unit test
.if !empty(PKG_OPTIONS:Munit-test)
CONFIGURE_ARGS+=		--enable-check
TEST_TARGET=			check
# unit test's Makefile depends on gmake.
USE_TOOLS+=			gmake
BUILDLINK_DEPMETHOD.check=	build
.  include "../../devel/check/buildlink3.mk"
.endif