diff --git a/mail/Makefile b/mail/Makefile index f83fceaba67..d2c274b8580 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.402 2021/02/28 14:34:09 sthen Exp $ +# $OpenBSD: Makefile,v 1.403 2021/03/07 14:17:02 sthen Exp $ SUBDIR = SUBDIR += abook @@ -216,6 +216,7 @@ SUBDIR += roundcubemail SUBDIR += rmilter SUBDIR += rspamd + SUBDIR += rspamd,hyperscan SUBDIR += rss2email SUBDIR += ruby-mail SUBDIR += ruby-mime diff --git a/mail/rspamd/Makefile b/mail/rspamd/Makefile index 8b364682be0..2a4be1bda35 100644 --- a/mail/rspamd/Makefile +++ b/mail/rspamd/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.90 2021/02/23 19:39:29 sthen Exp $ +# $OpenBSD: Makefile,v 1.91 2021/03/07 14:17:02 sthen Exp $ COMMENT= event-driven spam filtering system in C/Lua GH_ACCOUNT= vstakhov GH_PROJECT= rspamd GH_TAGNAME= 2.7 +REVISION= 0 CATEGORIES= mail @@ -19,10 +20,16 @@ WANTLIB += ${COMPILER_LIBCXX} WANTLIB += blas c crypto glib-2.0 icudata icui18n icuuc intl m WANTLIB += pcre sodium sqlite3 ssl util z -FLAVORS= no_luajit -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +FLAVORS= no_luajit hyperscan +.if ${MACHINE_ARCH} == "amd64" +# amd64: any flavour FLAVOR?= +.elif ${MACHINE_ARCH} == "i386" +# i386: no_luajit or unflavoured +FLAVOR?= +FLAVOR:= ${FLAVOR:Nhyperscan} .else +# others: no_luajit only FLAVOR= no_luajit .endif @@ -74,6 +81,12 @@ LIB_DEPENDS+= lang/luajit WANTLIB+= luajit-5.1 .endif +.if ${FLAVOR:Mhyperscan} +CONFIGURE_ARGS+= -DENABLE_HYPERSCAN=ON +LIB_DEPENDS+= textproc/hyperscan +WANTLIB+= hs +.endif + # Make sure you have no rspamd or redis instances running and note that the # test suite uses the network. # diff --git a/mail/rspamd/pkg/DESCR b/mail/rspamd/pkg/DESCR index 0aefd54f262..b16ea5ec119 100644 --- a/mail/rspamd/pkg/DESCR +++ b/mail/rspamd/pkg/DESCR @@ -7,3 +7,10 @@ According to this spam score and the user's settings rspamd recommends an action for the MTA to apply to the message- for example to pass, reject or add a header. Rspamd is designed to process hundreds of messages per second simultaneously and has a number of features available. + +Some flavours are available, depending on the machine architecture: + + no_luajit Disable luajit, available on all architectures + (unflavoured) Enable luajit, available on amd64/i386 + hyperscan Use Intel's hyperscan library, available on amd64, + requires certain CPU features.