diff options
author | Renato Botelho <garga@FreeBSD.org> | 2009-03-27 11:53:07 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2009-03-27 11:53:07 +0000 |
commit | b5a9f423503aebaca704f1f6cf4ae2f485fc5ea1 (patch) | |
tree | e217dbc778a52087c20ecaea92beea91b2266052 /security/clamcour | |
parent | d253acf464b19446c05f5daaeadfa06ee7126cb7 (diff) |
Notes
Diffstat (limited to 'security/clamcour')
-rw-r--r-- | security/clamcour/Makefile | 11 | ||||
-rw-r--r-- | security/clamcour/files/patch-src__clam.cpp | 68 |
2 files changed, 64 insertions, 15 deletions
diff --git a/security/clamcour/Makefile b/security/clamcour/Makefile index 6b0ef35743f8..352626875aa0 100644 --- a/security/clamcour/Makefile +++ b/security/clamcour/Makefile @@ -7,7 +7,7 @@ PORTNAME= clamcour PORTVERSION= 0.3.8 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= security mail MASTER_SITES= http://www.becrux.com/pages/projects/clamcour/ @@ -15,7 +15,7 @@ MAINTAINER= bsd@dino.sk COMMENT= ClamAV courier filter BUILD_DEPENDS= courier-config:${PORTSDIR}/mail/courier -LIB_DEPENDS= clamav.5:${PORTSDIR}/security/clamav +LIB_DEPENDS= clamav.6:${PORTSDIR}/security/clamav GNU_CONFIGURE= yes @@ -24,10 +24,15 @@ CONFIGURE_ARGS= --with-clamav-config=${LOCALBASE}/bin \ CPPFLAGS+= -I${LOCALBASE}/include CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib -CONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" MAN1= clamcour.1 PLIST_DIRS= etc/courier/clamcour PLIST_FILES= libexec/filters/clamcour +post-patch: + @${REINPLACE_CMD} -e 's/^CXXFLAGS *=/CXXFLAGS?=/g' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e '/cl_limits/d; s/cl_node/cl_engine/' \ + ${WRKSRC}/src/clam.h + .include <bsd.port.mk> diff --git a/security/clamcour/files/patch-src__clam.cpp b/security/clamcour/files/patch-src__clam.cpp index f9f8414483a8..0df14d48ad1e 100644 --- a/security/clamcour/files/patch-src__clam.cpp +++ b/security/clamcour/files/patch-src__clam.cpp @@ -1,22 +1,66 @@ ---- src/clam.cpp.orig Sun Oct 1 20:01:37 2006 -+++ src/clam.cpp Tue Feb 20 16:04:03 2007 -@@ -78,8 +78,8 @@ - memset(&limits,0,sizeof(struct cl_limits)); - root = NULL; +--- src/clam.cpp.orig 2006-10-01 15:01:37.000000000 -0300 ++++ src/clam.cpp 2009-03-25 15:08:59.000000000 -0300 +@@ -52,8 +52,7 @@ + #include "clam.h" + #include "exception.h" + +-struct cl_node *cClamAv::root; +-struct cl_limits cClamAv::limits; ++struct cl_engine *cClamAv::root; + int cClamAv::counter = 0; + int cClamAv::scanTaskCounter = 0; + pthread_mutex_t cClamAv::counterMutex = PTHREAD_MUTEX_INITIALIZER; +@@ -75,14 +74,16 @@ + + if (!(counter++)) + { +- memset(&limits,0,sizeof(struct cl_limits)); +- root = NULL; ++ if ((err = cl_init(CL_INIT_DEFAULT))) ++ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_init",err); ++ ++ root = cl_engine_new(); - if ((err = cl_loaddbdir(cl_retdbdir(), &root, &signo))) - throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_loaddbdir",err); -+ if ((err = cl_load(cl_retdbdir(), &root, &signo, CL_DB_STDOPT))) ++ if ((err = cl_load(cl_retdbdir(), root, &signo, CL_DB_STDOPT))) + throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_load",err); - if ((err = cl_build(root))) - throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_build",err); -@@ -214,7 +214,7 @@ +- if ((err = cl_build(root))) +- throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_build",err); ++ if ((err = cl_engine_compile(root))) ++ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_engine_compile",err); + + if ((err = pthread_attr_init(&thattr))) + throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"pthread_attr_init",err,1); +@@ -119,7 +120,7 @@ + { + pthread_kill(thid,SIGUSR2); + +- cl_free(root); ++ cl_engine_free(root); + root = NULL; + } + } +@@ -144,7 +145,6 @@ + virus_name, + NULL, + root, +- &limits, + CL_SCAN_ARCHIVE|CL_SCAN_MAIL|CL_SCAN_OLE2|CL_SCAN_PE| + CL_SCAN_HTML|CL_SCAN_BLOCKBROKEN) : CL_CLEAN); + else +@@ -212,10 +212,10 @@ + { + if ((err = pthread_mutex_lock(&(ptr->dbMutex)))) throw cException(CLAMAV_TASK_NAME,"taskProc","pthread_mutex_lock(dbMutex)",err); - cl_free(ptr->root); +- cl_free(ptr->root); ++ cl_engine_free(ptr->root); ptr->root = NULL; - cl_loaddbdir(cl_retdbdir(), &(ptr->root), &signo); -+ cl_load(cl_retdbdir(), &(ptr->root), &signo, CL_DB_STDOPT); - cl_build(ptr->root); +- cl_build(ptr->root); ++ cl_load(cl_retdbdir(), ptr->root, &signo, CL_DB_STDOPT); ++ cl_engine_compile(ptr->root); if ((err = pthread_mutex_unlock(&(ptr->dbMutex)))) throw cException(CLAMAV_TASK_NAME,"taskProc","pthread_mutex_unlock(dbMutex)",err,1); + syslog(LOG_INFO,"cClamDBTask -> database updated"); |