p5-Mail-SpamAssassin dependency possibly missing

Sergey Matveychuk sem at FreeBSD.org
Tue Nov 16 10:15:47 PST 2004


Linus Nordberg wrote:

> Mathieu Arnold <mat at FreeBSD.org> wrote
> Mon, 15 Nov 2004 23:14:07 +0100:
> 
> |  | It seems like the p5-Mail-SpamAssassin port should have a runtime
> |  | dependency to databases/p5-DBD-mysql or so.
> |  
> |  I don't know why it should, I use it without any problems without any
> |  database.
> 
> Ah, of course.  I'm using spamd with --setuid-with-sql.
> 
> Then perhaps a WITH_MYSQL or similar would be a good hint?

Examine a patch.
Is it enough?

-- 
Sem.
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/p5-Mail-SpamAssassin/Makefile,v
retrieving revision 1.64
diff -u -r1.64 Makefile
--- Makefile	28 Oct 2004 16:45:16 -0000	1.64
+++ Makefile	16 Nov 2004 18:14:15 -0000
@@ -37,6 +37,16 @@
 CONFIGURE_ARGS+=	ENABLE_SSL=no
 .endif
 
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+USE_SQLDB=	yes
+.endif
+
+.if defined(WITH_PGSQL)
+RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/DBD/pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
+USE_SQLDB=	yes
+.endif
+
 MAN3=		Mail::SpamAssassin.3 \
 		Mail::SpamAssassin::ArchiveIterator.3 \
 		Mail::SpamAssassin::AutoWhitelist.3 \
@@ -74,6 +84,10 @@
 USE_RC_SUBR=	yes
 SED_SCRIPT=	-e 's|%%PREFIX%%|${PREFIX}|g' \
 		-e 's|%%RC_SUBR%%|${RC_SUBR}|g'
+.if defined(WITH_SQLDB)
+SED_SCRIPT+=	-e 's|%%SQL%%|-Q|g'
+.endif
+
 post-patch:
 	@${FIND} ${WRKSRC} -name \*.orig -delete
 	@${SED} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
Index: files/spamd.sh
===================================================================
RCS file: /home/pcvs/ports/mail/p5-Mail-SpamAssassin/files/spamd.sh,v
retrieving revision 1.8
diff -u -r1.8 spamd.sh
--- files/spamd.sh	12 Oct 2004 10:42:38 -0000	1.8
+++ files/spamd.sh	16 Nov 2004 18:14:15 -0000
@@ -35,7 +35,7 @@
 
 spamd_enable=${spamd_enable:-"NO"}
 spamd_pidfile=${spamd_pidfile:-"/var/run/spamd.pid"}
-spamd_flags=${spamd_flags:-"-c -d -r ${spamd_pidfile}"}
+spamd_flags=${spamd_flags:-"-c -d %%SQL%% -r ${spamd_pidfile}"}
 
 load_rc_config $name
 run_rc_command "$1"


More information about the freebsd-perl mailing list