1 |
commit: 97d6eb42bee13f4495bf411d9dacbef05a733607 |
2 |
Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz> |
3 |
AuthorDate: Tue Feb 4 18:52:38 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 24 05:19:45 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d6eb42 |
7 |
|
8 |
mail-filter/rspamd: fix hyperscan support on i386 |
9 |
|
10 |
The patch is taken from upstream. |
11 |
https://github.com/rspamd/rspamd/commit/92e62855a64d1f7f0e52720399f8aa31bdcb0983 |
12 |
|
13 |
Closes: https://bugs.gentoo.org/703004 |
14 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
15 |
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz> |
16 |
Closes: https://github.com/gentoo/gentoo/pull/14572 |
17 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
18 |
|
19 |
mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch | 15 +++++++++++++++ |
20 |
mail-filter/rspamd/rspamd-2.2.ebuild | 2 ++ |
21 |
2 files changed, 17 insertions(+) |
22 |
|
23 |
diff --git a/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch b/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..578d3da7fa3 |
26 |
--- /dev/null |
27 |
+++ b/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch |
28 |
@@ -0,0 +1,15 @@ |
29 |
+diff --git a/cmake/Hyperscan.cmake b/cmake/Hyperscan.cmake |
30 |
+index 3dd774511..b8f83a3bb 100644 |
31 |
+--- a/cmake/Hyperscan.cmake |
32 |
++++ b/cmake/Hyperscan.cmake |
33 |
+@@ -1,8 +1,8 @@ |
34 |
+ option (ENABLE_HYPERSCAN "Enable hyperscan for fast regexp processing [default: OFF]" OFF) |
35 |
+ |
36 |
+ if (ENABLE_HYPERSCAN MATCHES "ON") |
37 |
+- if (NOT "${ARCH}" STREQUAL "x86_64") |
38 |
+- MESSAGE(FATAL_ERROR "Hyperscan is supported only on x86_64 architecture") |
39 |
++ if (NOT ("${ARCH}" STREQUAL "x86_64" OR "${ARCH}" STREQUAL "i386")) |
40 |
++ MESSAGE(FATAL_ERROR "Hyperscan is supported only on x86_64/i386 architectures") |
41 |
+ endif () |
42 |
+ ProcessPackage (HYPERSCAN LIBRARY hs INCLUDE hs.h INCLUDE_SUFFIXES |
43 |
+ hs include/hs |
44 |
|
45 |
diff --git a/mail-filter/rspamd/rspamd-2.2.ebuild b/mail-filter/rspamd/rspamd-2.2.ebuild |
46 |
index 3f29e90b90e..3b7e3129381 100644 |
47 |
--- a/mail-filter/rspamd/rspamd-2.2.ebuild |
48 |
+++ b/mail-filter/rspamd/rspamd-2.2.ebuild |
49 |
@@ -41,6 +41,8 @@ RDEPEND=" |
50 |
!pcre2? ( dev-libs/libpcre[jit=] )" |
51 |
DEPEND="${RDEPEND}" |
52 |
|
53 |
+PATCHES=( "${FILESDIR}/${P}-i386-hyperscan.patch" ) |
54 |
+ |
55 |
src_prepare() { |
56 |
cmake_src_prepare |