summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/clamav-devel/Makefile10
-rw-r--r--security/clamav-devel/files/extra-patch-shared_output.c17
-rw-r--r--security/clamav/Makefile11
-rw-r--r--security/clamav/files/extra-patch-shared_output.c17
4 files changed, 52 insertions, 3 deletions
diff --git a/security/clamav-devel/Makefile b/security/clamav-devel/Makefile
index c079b38f2515..97c5a0da64e1 100644
--- a/security/clamav-devel/Makefile
+++ b/security/clamav-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clamav
PORTVERSION= 20060525
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/snapshot/ \
http://www.galle.com.br/~garga/clamav-devel/
@@ -25,7 +26,8 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
unzip:${PORTSDIR}/archivers/unzip
OPTIONS= MILTER "Compile the milter interface" Off \
- CURL "Support URL downloading" Off
+ CURL "Support URL downloading" Off \
+ STDERR "Print logs to stderr instead of stdout" Off
USE_AUTOTOOLS= libtool:15
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -125,11 +127,17 @@ CONFIGURE_ARGS+= --with-libcurl
CONFIGURE_ARGS+= --without-libcurl
.endif
+.if defined(WITH_STDERR)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's,$$(libdir)/pkgconfig,$$(prefix)/libdata/pkgconfig,' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -e 's,unarj,arj,g' \
+ ${WRKSRC}/docs/man/clamscan.1
pre-build:
@if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \
diff --git a/security/clamav-devel/files/extra-patch-shared_output.c b/security/clamav-devel/files/extra-patch-shared_output.c
new file mode 100644
index 000000000000..ddb4ab029f38
--- /dev/null
+++ b/security/clamav-devel/files/extra-patch-shared_output.c
@@ -0,0 +1,17 @@
+--- shared/output.c.orig Thu May 18 22:10:40 2006
++++ shared/output.c Thu May 18 22:12:43 2006
+@@ -236,7 +236,13 @@
+ return;
+ }
+
+- fd = stdout;
++/* fd = stdout; (missing flag 'mprintf_stdout') --eh. */
++
++ if(mprintf_stdout)
++ fd = stdout;
++ else
++ fd = stderr;
++
+
+ /* legend:
+ * ! - error
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index fe2f544d39d1..18d4f2f4a466 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.88.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= clamav
@@ -24,7 +24,8 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
OPTIONS= MILTER "Compile the milter interface" Off \
CURL "Support URL downloading" Off \
- LIBUNRAR "Support for external Unrar library" Off
+ LIBUNRAR "Support for external Unrar library" Off \
+ STDERR "Print logs to stderr instead of stdout" Off
USE_AUTOTOOLS= libtool:15
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -130,9 +131,15 @@ RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libclamav__unrarlib.h
.endif
+.if defined(WITH_STDERR)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -e 's,unarj,arj,g' \
+ ${WRKSRC}/docs/man/clamscan.1
pre-build:
@if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \
diff --git a/security/clamav/files/extra-patch-shared_output.c b/security/clamav/files/extra-patch-shared_output.c
new file mode 100644
index 000000000000..ddb4ab029f38
--- /dev/null
+++ b/security/clamav/files/extra-patch-shared_output.c
@@ -0,0 +1,17 @@
+--- shared/output.c.orig Thu May 18 22:10:40 2006
++++ shared/output.c Thu May 18 22:12:43 2006
+@@ -236,7 +236,13 @@
+ return;
+ }
+
+- fd = stdout;
++/* fd = stdout; (missing flag 'mprintf_stdout') --eh. */
++
++ if(mprintf_stdout)
++ fd = stdout;
++ else
++ fd = stderr;
++
+
+ /* legend:
+ * ! - error