aboutsummaryrefslogtreecommitdiffstats
path: root/mail/sa-utils
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2010-01-17 03:20:17 +0800
committerale <ale@FreeBSD.org>2010-01-17 03:20:17 +0800
commit930d9f0fb0254845e920c4813fe943cfec408d99 (patch)
tree972fdb4f9ea23a987d968eb35708581011fd04e7 /mail/sa-utils
parent791c944f17f540f4e4d7eea3c127274daf4e3d75 (diff)
downloadfreebsd-ports-gnome-930d9f0fb0254845e920c4813fe943cfec408d99.tar.gz
freebsd-ports-gnome-930d9f0fb0254845e920c4813fe943cfec408d99.tar.zst
freebsd-ports-gnome-930d9f0fb0254845e920c4813fe943cfec408d99.zip
Make sa-compile support conditional.
Submitted by: maintainer
Diffstat (limited to 'mail/sa-utils')
-rw-r--r--mail/sa-utils/Makefile14
-rw-r--r--mail/sa-utils/files/sa-utils.in4
2 files changed, 14 insertions, 4 deletions
diff --git a/mail/sa-utils/Makefile b/mail/sa-utils/Makefile
index e8cbc9b3942f..bd57453a1e39 100644
--- a/mail/sa-utils/Makefile
+++ b/mail/sa-utils/Makefile
@@ -15,8 +15,9 @@ DISTFILES= # none
MAINTAINER= m.seaman@infracaninophile.co.uk
COMMENT= SpamAssassin nightly periodic maintenance
-RUN_DEPENDS= sa-update:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
- re2c:${PORTSDIR}/devel/re2c
+RUN_DEPENDS= sa-update:${PORTSDIR}/mail/p5-Mail-SpamAssassin
+
+OPTIONS= SACOMPILE "Enable sa-compile support" off
NO_BUILD= yes
SUB_FILES= sa-utils
@@ -26,6 +27,15 @@ PERIODIC_DAILY= etc/periodic/daily
PLIST_FILES= ${PERIODIC_DAILY}/sa-utils
PLIST_DIRS= ${PERIODIC_DAILY} ${PERIODIC_DAILY:H}
+.include <bsd.port.options.mk>
+
+.if defined(WITH_SACOMPILE)
+RUN_DEPENDS+= re2c>=.12.0:${PORTSDIR}/devel/re2c
+SUB_LIST+= SACOMPILE=YES
+.else
+SUB_LIST+= SACOMPILE=NO
+.endif
+
do-install:
${MKDIR} ${PREFIX}/${PERIODIC_DAILY}/
${INSTALL_SCRIPT} ${WRKDIR}/sa-utils \
diff --git a/mail/sa-utils/files/sa-utils.in b/mail/sa-utils/files/sa-utils.in
index 18e91576b7de..49472b92bffc 100644
--- a/mail/sa-utils/files/sa-utils.in
+++ b/mail/sa-utils/files/sa-utils.in
@@ -32,7 +32,7 @@
# --channel saupdates.example.com \
# --channel updates.spamassassin.org"
#
-# daily_sa_compile="YES"
+# daily_sa_compile="%%SACOMPILE%%"
# run sa-compile to create a compiled form of the filter
# rules when new rules are found. Note: this can be time
# consuming and CPU intensive.
@@ -66,7 +66,7 @@ fi
: ${daily_sa_enable="YES"}
: ${daily_sa_quiet="NO"}
: ${daily_sa_update_flags=""}
-: ${daily_sa_compile="YES"}
+: ${daily_sa_compile="%%SACOMPILE%%"}
: ${daily_sa_compile_flags=""}
: ${daily_sa_compile_nice="YES"}
: ${daily_sa_compile_nice_flags=""}