1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00

- Update to 20070529

- Make all last changes that i've made on security/clamav:
  o Make arc, arj, lha and unzoo achives support dependency as OPTIONS
  o Fix build with gethostbyname_r after 601103
  o Install clamav-config.h
  o Change clamav-milter rc.d script to use a var to determine seconds of
    timeout to wait clamd socket be started, just if clamav_clamd_enable
    is set
This commit is contained in:
Renato Botelho 2007-05-29 17:33:52 +00:00
parent fb7ad518dd
commit 9f63c71af0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=192325
5 changed files with 87 additions and 24 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= clamav
PORTVERSION= 20070218
PORTVERSION= 20070529
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/snapshot/ \
${MASTER_SITE_LOCAL}
@ -18,12 +18,12 @@ MAINTAINER= garga@FreeBSD.org
COMMENT= Command line virus scanner written entirely in C
LIB_DEPENDS= gmp.7:${PORTSDIR}/math/libgmp4
RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
arj:${PORTSDIR}/archivers/arj \
unzoo:${PORTSDIR}/archivers/unzoo \
arc:${PORTSDIR}/archivers/arc
OPTIONS= MILTER "Compile the milter interface" Off \
OPTIONS= ARC "Enable arch archives support" On \
ARJ "Enable arj archives support" On \
LHA "Enable lha archives support" On \
UNZOO "Enavle zoo archives support" On \
MILTER "Compile the milter interface" Off \
LDAP "libmilter was built with LDAP" Off \
CURL "Support URL downloading" Off \
STDERR "Print logs to stderr instead of stdout" Off
@ -49,7 +49,6 @@ CONFIGURE_ARGS= --with-dbdir=${DBDIR} \
--disable-clamuko \
--disable-clamav \
--enable-bigstack \
--disable-gethostbyname_r \
--enable-readdir_r \
--disable-dependency-tracking \
--enable-experimental
@ -103,10 +102,37 @@ PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 601103
CONFIGURE_ARGS+= --disable-gethostbyname_r
.else
CONFIGURE_ARGS+= --enable-gethostbyname_r
.endif
# This port has a problem with -pthread,
# force to use -lthr until it's not fixed.
.if ${OSVERSION} >= 601000
PTHREAD_LIBS= -lthr
.endif
# Maybe the port is broken for
# FreeBSD 5.2.1 since -lc_r
# and -pthread have both issues there.
.if ${OSVERSION} == 502010
PTHREAD_LIBS= -pthread
.endif
.if !defined(WITHOUT_ARC)
RUN_DEPENDS+= arc:${PORTSDIR}/archivers/arc
.endif
.if !defined(WITHOUT_ARJ)
RUN_DEPENDS+= arj:${PORTSDIR}/archivers/arj
.endif
.if !defined(WITHOUT_LHA)
RUN_DEPENDS+= lha:${PORTSDIR}/archivers/lha
.endif
.if !defined(WITHOUT_UNZOO)
RUN_DEPENDS+= unzoo:${PORTSDIR}/archivers/unzoo
.endif
.if defined(WITH_MILTER)
USE_RC_SUBR+= clamav-milter
. if defined(WITH_LDAP) && exists(${LOCALBASE}/lib/libldap.so)
@ -139,7 +165,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -E 's,^(pkgconfigdir = ).*$$,\1$$(prefix)/libdata/pkgconfig,g' \
${WRKSRC}/Makefile.in
@ -153,6 +179,7 @@ pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${PREFIX}/include
.for c in clamd freshclam
@[ -f ${PREFIX}/etc/${c}.conf ] || \
${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf

View File

@ -1,3 +1,3 @@
MD5 (clamav-devel-20070218.tar.gz) = 103f1a6bab720e33f47d8663ae5ee1fe
SHA256 (clamav-devel-20070218.tar.gz) = 1a3594835e0491bb37b9e9ee08591d6e9b4761db9feffcc9e6567997b705f1f7
SIZE (clamav-devel-20070218.tar.gz) = 6144195
MD5 (clamav-devel-20070529.tar.gz) = ea36a2c8bf84ecd5d0d085de80daa5a1
SHA256 (clamav-devel-20070529.tar.gz) = 1c5f231abdc05ca9625886e7fb02a2d2dd33ba18f102a814dfa026832bd2c461
SIZE (clamav-devel-20070529.tar.gz) = 3021873

View File

@ -35,18 +35,35 @@ start_precmd()
rm "$clamav_milter_socket"
fi
rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket"
for a in 1 2 3 4 5 6 7 8 9 10
do
[ -S "$clamav_clamd_socket" ] && break
sleep 1
done
if checkyesno clamav_clamd_enable; then
echo -n "Waiting for clamd socket.. "
i=${clamav_milter_socktimeout}
while [ $i -ne 0 ]
do
[ -S "$clamav_clamd_socket" ] && break
if [ `expr $i % 10` -eq 0 ]; then
echo -n "${i}.. "
fi
sleep 1
i=$(($i-1))
done
echo
if [ $i -eq 0 ]; then
echo "There is no clamd socket (${clamav_clamd_socket})!"
exit 1
fi
fi
}
# read settings, set default values
load_rc_config $name
: ${clamav_milter_enable="NO"}
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
: ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"}
: ${clamav_milter_socktimeout="60"}
: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
: ${clamav_clamd_enable="NO"}
run_rc_command "$1"

View File

@ -1,6 +1,6 @@
--- configure.orig Thu Jun 23 23:12:00 2005
+++ configure Tue Jun 28 20:53:10 2005
@@ -11195,19 +11201,25 @@
--- configure.orig Thu Mar 1 20:46:19 2007
+++ configure Tue Mar 13 10:28:27 2007
@@ -22431,19 +22431,25 @@
sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'`
@ -26,3 +26,21 @@
fi
fi
@@ -23087,7 +23093,7 @@
;;
freebsd*)
if test "$have_pthreads" = "yes"; then
- THREAD_LIBS="-pthread -lc_r"
+ THREAD_LIBS="%%PTHREAD_LIBS%%"
TH_SAFE="-thread-safe"
cat >>confdefs.h <<\_ACEOF
@@ -23427,7 +23433,7 @@
if test "$have_milter" = "yes"; then
save_LDFLAGS="$LDFLAGS"
- CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"
+ CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS %%PTHREAD_LIBS%%"
if test -d /usr/lib/libmilter ; then
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter"
fi

View File

@ -8,10 +8,11 @@ bin/sigtool
%%CLAMAV-MILTER%%sbin/clamav-milter
sbin/clamd
include/clamav.h
include/clamav-config.h
lib/libclamav.a
lib/libclamav.la
lib/libclamav.so
lib/libclamav.so.1
lib/libclamav.so.2
libdata/pkgconfig/libclamav.pc
@unexec if cmp -s %D/etc/clamd.conf %D/etc/clamd.conf.default; then rm -f %D/etc/clamd.conf; fi
etc/clamd.conf.default
@ -21,6 +22,6 @@ etc/freshclam.conf.default
@exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf
@unexec [ -s %%DBDIR%%/daily.cvd ] || rm -f %%DBDIR%%/daily.cvd || true
@unexec [ -s %%DBDIR%%/main.cvd ] || rm -f %%DBDIR%%/main.cvd || true
@unexec rmdir %%DBDIR%% 2>/dev/null || true
@unexec rmdir %%LOGDIR%% 2>/dev/null || true
@unexec rmdir %%RUNDIR%% 2>/dev/null || true
@dirrmtry %%DBDIR%%
@dirrmtry %%LOGDIR%%
@dirrmtry %%RUNDIR%%