# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit cmake-utils pax-utils systemd tmpfiles user
+inherit cmake-utils pax-utils systemd tmpfiles
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
SLOT="0"
IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit libressl pcre2"
-RDEPEND="dev-db/sqlite:3
+RDEPEND="
+ acct-group/rspamd
+ acct-user/rspamd
+ dev-db/sqlite:3
dev-libs/glib:2
dev-libs/icu:=
dev-libs/libev
+ dev-libs/libsodium
+ dev-util/ragel
net-libs/libnsl
sys-apps/file
- dev-util/ragel
- dev-libs/libsodium
blas? ( sci-libs/openblas )
cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
jemalloc? ( dev-libs/jemalloc )
!pcre2? ( dev-libs/libpcre[jit=] )"
DEPEND="${RDEPEND}"
-pkg_setup() {
- enewgroup rspamd
- enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
src_prepare() {
cmake-utils_src_prepare
-DRUNDIR=/var/run/rspamd
-DDBDIR=/var/lib/rspamd
-DLOGDIR=/var/log/rspamd
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-DENABLE_LUAJIT=$(usex jit ON OFF)
-DENABLE_PCRE2=$(usex pcre2 ON OFF)
- -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
- -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
)
cmake-utils_src_configure
}
# Remove mprotect for JIT support
if use jit; then
- pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
fi
insinto /etc/logrotate.d