summaryrefslogtreecommitdiffstats
path: root/security/clamav/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/clamav/Makefile')
-rw-r--r--security/clamav/Makefile26
1 files changed, 18 insertions, 8 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 9410673..e2f5615 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,10 +7,10 @@
PORTNAME= clamav
PORTVERSION= 0.60
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
-MASTER_SITES= http://clamav.elektrapro.com/stable/ \
- http://clamav.essentkabel.com/stable/
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= clamav
MAINTAINER= markun@onohara.to
COMMENT= Command line virus scanner written entirely in C
@@ -22,6 +22,7 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
arc:${PORTSDIR}/archivers/arc \
unzip:${PORTSDIR}/archivers/unzip
+USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -29,22 +30,31 @@ USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
- --disable-clamav \
- --enable-bigstack
-
+ --disable-clamav --enable-bigstack
+CFLAGS+= -I${LOCALBASE}/include
+CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 clamav-milter.1
MAN5= clamav.conf.5
MAN8= clamd.8
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 500000
-CONFIGURE_ARGS+=--enable-milter
+.if ${OSVERSION} < 510001
+# compiles only with optimizer
+CFLAGS+= -O
+LDFLAGS+= -lcipher
+.endif
+
+.if defined(WITH_MILTER)
+CONFIGURE_ARGS+= --enable-milter
PLIST_SUB+= CLAMAV-MILTER:=""
.else
PLIST_SUB+= CLAMAV-MILTER:="@comment "
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+
pre-install:
@${ECHO} "===> Creating custom user to run clamav..."
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
OpenPOWER on IntegriCloud