aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2007-02-19 00:12:37 +0800
committergarga <garga@FreeBSD.org>2007-02-19 00:12:37 +0800
commit7639f493ea2bba894ba70387580dc31d6798cf91 (patch)
treee3e25f20eea328275467ed1eeaa6b619a8567988 /security
parentdbb2d8391b29b59d1c1e1fdcde72df849da6b43e (diff)
downloadfreebsd-ports-gnome-7639f493ea2bba894ba70387580dc31d6798cf91.tar.gz
freebsd-ports-gnome-7639f493ea2bba894ba70387580dc31d6798cf91.tar.zst
freebsd-ports-gnome-7639f493ea2bba894ba70387580dc31d6798cf91.zip
- Fix 'integer constant is too large for "long" type' warning [1]
- Convert one patch to REINPLACE_CMD - Force to use ${PREFIX}/lib/libmilter.a if it's installed - Fix sendmail binary detection using --with-sendmail instead SENDMAIL envvar - Add EXPERIMENTAL OPTION to build with --enable-experimental - Remove DESTDIR/TARGETDIR since it's useless for now - Bump PORTREVISION Submitted by: stas@ at #bsdports [1] Thanks to: stas@ and simon@ [1]
Diffstat (limited to 'security')
-rw-r--r--security/clamav/Makefile48
-rw-r--r--security/clamav/files/patch-Makefile.in11
-rw-r--r--security/clamav/files/pkg-install.in20
3 files changed, 34 insertions, 45 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index bb14cc818574..34f8aa8c5df4 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.90
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= SF
@@ -23,7 +23,8 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
OPTIONS= 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
+ STDERR "Print logs to stderr instead of stdout" Off \
+ EXPERIMENTAL "Build experimental code" Off
USE_AUTOTOOLS= libtool:15
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -37,9 +38,11 @@ LOGDIR= /var/log/clamav
RUNDIR= /var/run/clamav
PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --with-dbdir=${DBDIR} \
--with-zlib=/usr \
- --mandir=${MANPREFIX:S/^${DESTDIR}//}/man \
+ --mandir=${MANPREFIX}/man \
--disable-zlib-vcheck \
--disable-clamuko \
--disable-clamav \
@@ -52,8 +55,6 @@ CPPFLAGS+= -I${LOCALBASE}/include \
LDFLAGS+= -L${LOCALBASE}/lib \
${PTHREAD_LIBS}
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}"
MAN1= clamconf.1 \
clamscan.1 \
freshclam.1 \
@@ -73,8 +74,7 @@ CLAMAV_CLAMD_SOCKET?= ${RUNDIR}/clamd
CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock
SUB_FILES= pkg-install pkg-deinstall
-SUB_LIST+= DESTDIR=${DESTDIR} \
- DBDIR=${DBDIR} \
+SUB_LIST+= DBDIR=${DBDIR} \
LOGDIR=${LOGDIR} \
RUNDIR=${RUNDIR} \
CLAMAVUSER=${CLAMAVUSER} \
@@ -109,11 +109,11 @@ USE_RC_SUBR+= clamav-milter
USE_OPENLDAP= yes
LDFLAGS+= -lldap
.endif
-.if !exists(/usr/lib/libmilter.a)
+.if !exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
-CONFIGURE_ENV+= SENDMAIL="${LOCALBASE}/sbin/sendmail"
+CONFIGURE_ARGS+= --with-sendmail=${LOCALBASE}/sbin/sendmail
.else
-CONFIGURE_ENV+= SENDMAIL="/usr/sbin/sendmail"
+CONFIGURE_ARGS+= --with-sendmail=/usr/sbin/sendmail
.endif
CONFIGURE_ARGS+= --enable-milter
PLIST_SUB+= CLAMAV-MILTER=""
@@ -132,27 +132,33 @@ CONFIGURE_ARGS+= --without-libcurl
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c
.endif
+.if defined(WITH_EXPERIMENTAL)
+CONFIGURE_ARGS+= --enable-experimental
+.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
- @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf
- @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf
+ ${WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -E 's,^(pkgconfigdir = ).*$$,\1$$(prefix)/libdata/pkgconfig,g' \
+ ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \
+ ${WRKSRC}/libclamav/unrar/unrar.c
+ @${REINPLACE_CMD} ${SED_CONF} \
+ ${WRKSRC}/etc/clamd.conf \
+ ${WRKSRC}/etc/freshclam.conf
pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX} \
- ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
.for c in clamd freshclam
- @[ -f ${TARGETDIR}/etc/${c}.conf ] || \
- ${CP} ${TARGETDIR}/etc/${c}.conf.default ${TARGETDIR}/etc/${c}.conf
+ @[ -f ${PREFIX}/etc/${c}.conf ] || \
+ ${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/html
- @${INSTALL_DATA} ${INSTALL_WRKSRC}/NEWS ${INSTALL_WRKSRC}/ChangeLog ${DOCSDIR}
- @${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/* ${DOCSDIR}/html
+ @${INSTALL_DATA} ${WRKSRC}/NEWS ${WRKSRC}/ChangeLog ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/docs/html/* ${DOCSDIR}/html
.endif
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff --git a/security/clamav/files/patch-Makefile.in b/security/clamav/files/patch-Makefile.in
deleted file mode 100644
index 1b94477b2d80..000000000000
--- a/security/clamav/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Wed Oct 13 15:26:26 2004
-+++ Makefile.in Wed Oct 13 15:26:43 2004
-@@ -210,7 +210,7 @@
- SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool database docs etc clamav-milter
- EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE
- bin_SCRIPTS = clamav-config
--pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfigdir = $(prefix)/libdata/pkgconfig
- pkgconfig_DATA = libclamav.pc
- all: clamav-config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/security/clamav/files/pkg-install.in b/security/clamav/files/pkg-install.in
index bd223b539fa6..b6280ecf8df8 100644
--- a/security/clamav/files/pkg-install.in
+++ b/security/clamav/files/pkg-install.in
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/security/clamav/files/pkg-install.in,v 1.3 2007-02-16 00:19:32 garga Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/clamav/files/pkg-install.in,v 1.4 2007-02-18 16:12:37 garga Exp $
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
@@ -12,15 +12,9 @@ DBDIR=%%DBDIR%%
LOGDIR=%%LOGDIR%%
RUNDIR=%%RUNDIR%%
-if [ -n "%%DESTDIR%%" ]; then
- PW="/usr/sbin/chroot %%DESTDIR%% pw"
- CHOWN="/usr/sbin/chroot %%DESTDIR%% chown"
- MKDIR="/usr/sbin/chroot %%DESTDIR%% mkdir -p"
-else
- PW="pw"
- CHOWN="chown"
- MKDIR="mkdir -p"
-fi
+PW="pw"
+CHOWN="chown"
+MKDIR="mkdir -p"
if [ "$2" = "PRE-INSTALL" ]; then
@@ -48,13 +42,13 @@ if [ "$2" = "PRE-INSTALL" ]; then
elif [ "$2" = "POST-INSTALL" ]; then
- [ ! -d "${DESTDIR}${DBDIR}" ] && (${MKDIR} ${DBDIR} || exit 1)
+ [ ! -d "${DBDIR}" ] && (${MKDIR} ${DBDIR} || exit 1)
${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DBDIR} || exit 1
- [ ! -d "${DESTDIR}${LOGDIR}" ] && (${MKDIR} ${LOGDIR} || exit 1)
+ [ ! -d "${LOGDIR}" ] && (${MKDIR} ${LOGDIR} || exit 1)
${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${LOGDIR} || exit 1
- [ ! -d "${DESTDIR}${RUNDIR}" ] && (${MKDIR} ${RUNDIR} || exit 1)
+ [ ! -d "${RUNDIR}" ] && (${MKDIR} ${RUNDIR} || exit 1)
${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${RUNDIR} || exit 1
fi