summaryrefslogtreecommitdiff
path: root/user/rspamd/20-lua-cmake.patch
diff options
context:
space:
mode:
authorLee Starnes <lee@canned-death.us>2020-09-19 00:12:15 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-09-19 00:12:15 +0000
commitcdd03f807a0d8346bc0fe7d1187ee0befe356624 (patch)
treec93df99f16f224157b252f5337e7e421d07888f4 /user/rspamd/20-lua-cmake.patch
parentdb49432374e0e3ed11d99c831d1349f3ddc74a33 (diff)
downloadpackages-cdd03f807a0d8346bc0fe7d1187ee0befe356624.tar.gz
packages-cdd03f807a0d8346bc0fe7d1187ee0befe356624.tar.bz2
packages-cdd03f807a0d8346bc0fe7d1187ee0befe356624.tar.xz
packages-cdd03f807a0d8346bc0fe7d1187ee0befe356624.zip
user/rspamd: import from Alpine, disable JIT, and use lua5.3
Diffstat (limited to 'user/rspamd/20-lua-cmake.patch')
-rw-r--r--user/rspamd/20-lua-cmake.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/user/rspamd/20-lua-cmake.patch b/user/rspamd/20-lua-cmake.patch
new file mode 100644
index 000000000..cfd3926d6
--- /dev/null
+++ b/user/rspamd/20-lua-cmake.patch
@@ -0,0 +1,39 @@
+rspamd's FindLua macro fails to find our lua libs and includes, but it also
+always undefines LUA_LIBRARY and LUA_INCLUDE_DIR.
+
+--- a/CMakeLists.txt 2020-04-01 13:57:55.000000000 +0000
++++ b/CMakeLists.txt 2020-08-16 05:12:50.850000000 +0000
+@@ -121,31 +121,8 @@
+
+ # Now find libraries and headers
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "m")
+-IF(ENABLE_LUAJIT MATCHES "ON")
+- #ProcessPackage(LUAJIT luajit)
+- SET(WITH_LUA 1)
+- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}")
+- IF(NOT LUA_FOUND)
+- MESSAGE(FATAL_ERROR "Lua not found, lua support is required")
+- ELSE(NOT LUA_FOUND)
+- SET(WITH_LUA 1)
+- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
+- ENDIF(NOT LUA_FOUND)
+-ELSE(ENABLE_LUAJIT MATCHES "ON")
+- FindLua(VERSION_MAJOR "5" VERSION_MINOR "3" ROOT "${LUA_ROOT}")
+- IF(NOT LUA_FOUND)
+- FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}")
+- IF(NOT LUA_FOUND)
+- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}")
+- ENDIF(NOT LUA_FOUND)
+- ENDIF(NOT LUA_FOUND)
+- IF(NOT LUA_FOUND)
+- MESSAGE(FATAL_ERROR "Lua not found, lua support is required")
+- ELSE(NOT LUA_FOUND)
+- SET(WITH_LUA 1)
+- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
+- ENDIF(NOT LUA_FOUND)
+-ENDIF(ENABLE_LUAJIT MATCHES "ON")
++
++INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
+
+ IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
+ ProcessPackage(JEMALLOC LIBRARY jemalloc_pic jemalloc INCLUDE jemalloc.h INCLUDE_SUFFIXES include/jemalloc