aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamav/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/clamav/Makefile')
-rw-r--r--security/clamav/Makefile55
1 files changed, 14 insertions, 41 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index ad23458784ae..965f68fad891 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -27,6 +27,19 @@ EXPERIMENTAL_DESC= Build experimental code
OPTIONS_DEFAULT= ARC ARJ LHA UNZOO UNRAR LLVM DOCS
+ARC_RUN_DEPENDS= arc:${PORTSDIR}/archivers/arc
+ARJ_RUN_DEPENDS= arj:${PORTSDIR}/archivers/arj
+LHA_RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha
+UNZOO_RUN_DEPENDS= unzoo:${PORTSDIR}/archivers/unzoo
+UNRAR_CONFIGURE_ENABLE= unrar
+MILTER_CONFIGURE_ENABLE=milter
+TESTS_CONFIGURE_ENABLE= check
+TESTS_BUILD_DEPENDS= ${LOCALBASE}/include/check.h:${PORTSDIR}/devel/libcheck
+ICONV_CONFIGURE_ON= --with-iconv
+ICONV_CONFIGURE_OFF= --without-iconv
+ICONV_USES= iconv
+EXPERIMENTAL_CONFIGURE_ENABLE= experimental
+
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
USE_LDCONFIG= yes
@@ -42,6 +55,7 @@ RUNDIR= /var/run/clamav
PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
PY_NO_THREAD= ${WRKDIR}/.python-has-no-threads
USE_AUTOTOOLS= libltdl
+OPTIONS_SUB= yes
CONFIGURE_ARGS= --libdir=${PREFIX}/lib \
--with-dbdir=${DBDIR} \
@@ -113,31 +127,6 @@ PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MARC}
-RUN_DEPENDS+= arc:${PORTSDIR}/archivers/arc
-.endif
-.if ${PORT_OPTIONS:MARJ}
-RUN_DEPENDS+= arj:${PORTSDIR}/archivers/arj
-.endif
-.if ${PORT_OPTIONS:MLHA}
-RUN_DEPENDS+= lha:${PORTSDIR}/archivers/lha
-.endif
-.if ${PORT_OPTIONS:MUNZOO}
-RUN_DEPENDS+= unzoo:${PORTSDIR}/archivers/unzoo
-.endif
-.if ${PORT_OPTIONS:MUNRAR}
-PLIST_SUB+= UNRAR=""
-.else
-PLIST_SUB+= UNRAR="@comment "
-CONFIGURE_ARGS+=--disable-unrar
-.endif
-.if ${PORT_OPTIONS:MICONV}
-CONFIGURE_ARGS+=--with-iconv
-USES+= iconv
-.else
-CONFIGURE_ARGS+=--without-iconv
-.endif
-
.if ${PORT_OPTIONS:MLLVM} && ( ${ARCH} == "i386" || ${ARCH} == "amd64" )
CONFIGURE_ARGS+=--enable-llvm
. if defined(WITH_TESTS)
@@ -161,34 +150,18 @@ CONFIGURE_ARGS+=--with-sendmail=${LOCALBASE}/sbin/sendmail
. else
CONFIGURE_ARGS+=--with-sendmail=/usr/sbin/sendmail
. endif
-
-CONFIGURE_ARGS+=--enable-milter
-PLIST_SUB+= CLAMAV-MILTER=""
-.else
-PLIST_SUB+= CLAMAV-MILTER="@comment "
.endif
.if ${PORT_OPTIONS:MSTDERR}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c
.endif
-.if ${PORT_OPTIONS:MEXPERIMENTAL}
-CONFIGURE_ARGS+=--enable-experimental
-.endif
-
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
CFLAGS+= -march=i486
.endif
-.if ${PORT_OPTIONS:MTESTS} && ${OSVERSION} >= 700000
-BUILD_DEPENDS+= ${LOCALBASE}/include/check.h:${PORTSDIR}/devel/libcheck
-CONFIGURE_ARGS+=--enable-check
-.else
-CONFIGURE_ARGS+=--disable-check
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
${WRKSRC}/${CONFIGURE_SCRIPT}