summaryrefslogtreecommitdiff
path: root/user/rspamd/20-lua-cmake.patch
diff options
context:
space:
mode:
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