summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2022-10-04 10:55:10 +0200
committerSam James <sam@gentoo.org>2022-10-07 12:28:35 +0100
commit4a424df747d23d5151e70495fce5e97521479e90 (patch)
tree50b7266e7373d53855b2d2038b06a4ea7600ca5e /mail-filter/rspamd
parentnet-analyzer/sslsplit: use pkgconfig to detect libnet (diff)
downloadgentoo-4a424df747d23d5151e70495fce5e97521479e90.tar.gz
gentoo-4a424df747d23d5151e70495fce5e97521479e90.tar.bz2
gentoo-4a424df747d23d5151e70495fce5e97521479e90.zip
mail-filter/rspamd: add 3.3
This version contains a fix for Clang-16 (error: implicit declaration of function ZSTD_resetDStream) reported in bug 870448. It still suffers with a bug 810337. Bug: https://bugs.gentoo.org/810337 Closes: https://bugs.gentoo.org/870448 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-filter/rspamd')
-rw-r--r--mail-filter/rspamd/Manifest1
-rw-r--r--mail-filter/rspamd/rspamd-3.3.ebuild135
2 files changed, 136 insertions, 0 deletions
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 4875b2720023..e0065dc95ea1 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -2,3 +2,4 @@ DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a179703532
DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4
DIST rspamd-3.1.tar.gz 5566920 BLAKE2B dfb31534e7dbce303729e89537f83eea90d6524a0ccf81633e0d55840f21936985ba5991f2a2ed9ca5594a4a3938f9366f7a1879fc553f41ab52bb89460b87dc SHA512 3c3c06c10d3dfc90e4bc92c7ebaff4bd4854d3b0e56d6476f0223918c4a52f4cc7a8b381b1f867164199ee18ea00eda77ae0315925f3fd71596d610200667178
DIST rspamd-3.2.tar.gz 5637835 BLAKE2B 8d42b34dacdc818689fd8602abf8c4d5ff2431eb30b2d8fae6e78642ce4361d39a54cb4b981c58cd31205b0f2013978896081e0d7364620312db3fa855d14b1e SHA512 fd3570da24d7f09f48ba6e98c210789b85006c51adaf37336c83a570ef5b9239d4a09491b647464254d3600fbea7c662ec271e9a77ee4108236962490c677a79
+DIST rspamd-3.3.tar.gz 5680874 BLAKE2B 2fbafabc0a59ca4ad1bbdc1b7ceb5b5bc281dc75d2997ac50c080cdf5ced2582409e3f98b63239bab64fafbcc63016d857967fe00c371a6d5b896d170f5da4a9 SHA512 02c5e62cb9ce32cdd6da859c4afe2bf03fcaff456d79f68ab7c3c288a0b36f11a701825c3cb7f0ecaccd419f84ce693961c1ed955ce4dbcfe291a8e978e2e69c
diff --git a/mail-filter/rspamd/rspamd-3.3.ebuild b/mail-filter/rspamd/rspamd-3.3.ebuild
new file mode 100644
index 000000000000..b6932290133a
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="
+ https://rspamd.com
+ https://github.com/rspamd/rspamd
+"
+
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit selinux test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ test? ( lua_single_target_luajit )"
+
+RDEPEND="${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/LuaBitOp[${LUA_USEDEP}]
+ dev-lua/lua-argparse[${LUA_USEDEP}]
+ ')
+ acct-group/rspamd
+ acct-user/rspamd
+ app-arch/zstd:=
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ dev-libs/icu:=
+ dev-libs/libev
+ dev-libs/libfmt:=
+ dev-libs/libpcre2:=[jit=]
+ dev-libs/libsodium:=
+ dev-libs/openssl:0=[-bindist(-)]
+ dev-libs/snowball-stemmer:=
+ >=dev-libs/xxhash-0.8.0
+ sys-apps/file
+ sys-libs/zlib
+ blas? (
+ virtual/blas
+ virtual/lapack
+ )
+ cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+ jemalloc? ( dev-libs/jemalloc:= )
+ selinux? ( sec-policy/selinux-spamassassin )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/doctest
+"
+BDEPEND="
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
+ "${FILESDIR}/rspamd-3.2-unbundle-lua.patch"
+ "${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
+
+ > cmake/Toolset.cmake || die #827550
+
+ sed -i -e 's/User=_rspamd/User=rspamd/g' \
+ rspamd.service \
+ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFDIR=/etc/rspamd
+ -DRUNDIR=/var/run/rspamd
+ -DDBDIR=/var/lib/rspamd
+ -DLOGDIR=/var/log/rspamd
+
+ -DSYSTEM_DOCTEST=ON
+ -DSYSTEM_FMT=ON
+ -DSYSTEM_XXHASH=ON
+ -DSYSTEM_ZSTD=ON
+
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+ -DENABLE_PCRE2=ON
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_build run-test
+}
+
+src_install() {
+ cmake_src_install
+
+ newconfd "${FILESDIR}"/rspamd.conf rspamd
+ newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+ systemd_newunit rspamd.service rspamd.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+ # Remove mprotect for JIT support
+ if use lua_single_target_luajit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+ diropts -o rspamd -g rspamd
+ keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}