From f566c933b2274182ca628dbda30bae94aa86c76d8d9e28a5612880bdd8604762 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 22 Nov 2022 16:45:39 +0000 Subject: [PATCH] Accepting request 1037361 from openSUSE:Factory:RISCV - Fix build without luajit OBS-URL: https://build.opensuse.org/request/show/1037361 OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=115 --- neovim.changes | 5 +++++ neovim.spec | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/neovim.changes b/neovim.changes index 0ac2216..bc0b414 100644 --- a/neovim.changes +++ b/neovim.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 22 16:18:43 UTC 2022 - Andreas Schwab + +- Fix build without luajit + ------------------------------------------------------------------- Mon Oct 3 06:30:59 UTC 2022 - Matej Cepl diff --git a/neovim.spec b/neovim.spec index 66790b0..f420dfc 100644 --- a/neovim.spec +++ b/neovim.spec @@ -73,6 +73,7 @@ Recommends: xsel %if %{with luajit} BuildRequires: luajit-devel %else +BuildRequires: lua51-BitOp BuildRequires: lua51-devel %endif # luajit implements version 5.1 of the lua language spec, so it needs the @@ -132,7 +133,9 @@ export CXXFLAGS="%{optflags} -fcommon" %{__cmake} .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \ -DLUA_PRG=%{_bindir}/%{?with_luajit:luajit}%{!?with_luajit:lua} \ +%if %{with luajit} -DBUSTED_PRG="$(readlink -f ../lj-busted.sh)" \ +%endif -DUSE_BUNDLED=OFF -DLUAJIT_USE_BUNDLED=ON \ -DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON \ -DUSE_BUNDLED=OFF -DLUAJIT_USE_BUNDLED=OFF \ @@ -176,6 +179,8 @@ mkdir -p %{buildroot}%{vimplugin_dir}/{after,after/syntax,autoload,colors,doc,ft export NO_BRP_CHECK_RPATH=true %check +# Unit tests require the ffi module which is only available with luajit +%if %{with luajit} # Tests fail on aarch64 gh#neovim/neovim#18176 %ifnarch aarch64 # set vars to make build reproducible in spite of config/CMakeLists.txt @@ -185,6 +190,7 @@ pushd build %make_build BUSTED_PRG=$(readlink -f ../lj-busted.sh) unittest popd %endif +%endif %if 0%{?suse_version} < 1330 %post