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 + +.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=""}