From: Andrew Lewis Date: Thu, 4 Dec 2025 17:10:47 +0000 (+0200) Subject: [Minor] Use PUC-Rio Lua instead of LuaJIT X-Git-Tag: 3.14.3~50^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9688780ba8a129731fbe7d7711e531d9fb416509;p=thirdparty%2Frspamd.git [Minor] Use PUC-Rio Lua instead of LuaJIT --- diff --git a/debian/control b/debian/control index e61c5cc358..0b4c3d88fd 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,7 @@ Build-Depends: cmake, libssl-dev (>= 1.0), libunwind-dev | libunwind-13-dev, binutils-dev, + liblua5.4-dev, perl, ragel, zlib1g-dev diff --git a/debian/rules b/debian/rules index 8c3ed647b9..3999d91b99 100755 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,7 @@ FLAVORS = release asan CONFIG_asan = -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=address -DENABLE_LTO=OFF -DENABLE_FULL_DEBUG=ON CONFIG_release = -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LTO=ON -ENABLE_LUAJIT := -DENABLE_LUAJIT=ON -DLUA_ROOT=/luajit-build +ENABLE_LUAJIT := -DENABLE_LUAJIT=OFF # Can be filled by a build system EXTRA_ARGS := diff --git a/rpm/rspamd.spec b/rpm/rspamd.spec index 3f9a3cb37b..0c45acbf73 100644 --- a/rpm/rspamd.spec +++ b/rpm/rspamd.spec @@ -63,11 +63,7 @@ BuildRequires: jemalloc-devel %endif %endif -%if 0%{getenv:LUAJIT} -BuildRequires: git -%else BuildRequires: lua-devel -%endif BuildRequires: openblas-devel BuildRequires: openssl-devel BuildRequires: pcre2-devel @@ -89,11 +85,6 @@ lua. %prep %setup -q -n %{name}-%{version} -%if 0%{getenv:LUAJIT} -rm -fr %{_builddir}/luajit-src || true -rm -fr %{_builddir}/luajit-build || true -git clone -b v2.1 https://luajit.org/git/luajit-2.0.git %{_builddir}/luajit-src -%endif %build %if 0%{?el7} @@ -109,10 +100,7 @@ source /opt/rh/gcc-toolset-12/enable source /usr/lib/gcc-toolset/15-env.source %endif -%if 0%{getenv:LUAJIT} -pushd %{_builddir}/luajit-src && make clean && make %{?_smp_mflags} CC="gcc -fPIC" PREFIX=%{_builddir}/luajit-build && make install PREFIX=%{_builddir}/luajit-build ; popd -rm -f %{_builddir}/luajit-build/lib/*.so || true -%endif + %if 0%{?el7} %{cmake3} \ %else @@ -167,13 +155,8 @@ rm -f %{_builddir}/luajit-build/lib/*.so || true -DENABLE_JEMALLOC=ON \ %endif %endif -%if 0%{getenv:LUAJIT} - -DENABLE_LUAJIT=ON \ - -DLUA_ROOT=%{_builddir}/luajit-build \ -%else - -DENABLE_LUAJIT=OFF \ -%endif - -DENABLE_FASTTEXT=ON \ + -DENABLE_LUAJIT=OFF \ + -DENABLE_FASTTEXT=ON \ -DFASTTEXT_ROOT_DIR=/fasttext \ -DENABLE_BLAS=ON make %{?_smp_mflags}