diff options
author | Marek Szuba <marecki@gentoo.org> | 2020-12-10 01:36:34 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2020-12-10 01:55:47 +0100 |
commit | 9feed107616c754f8a2368cd770b22a28a0a6ac0 (patch) | |
tree | b178dc3097dd47c798e9bed69e1d63eee32ed656 /app-editors/neovim/files | |
parent | app-editors/neovim: limit unmigrated ebuilds to dev-lang/lua:0 (diff) | |
download | gentoo-9feed107616c754f8a2368cd770b22a28a0a6ac0.tar.gz gentoo-9feed107616c754f8a2368cd770b22a28a0a6ac0.tar.bz2 gentoo-9feed107616c754f8a2368cd770b22a28a0a6ac0.zip |
app-editors/neovim: migrate to lua-single.eclass
Both the latest release and the live ebuild.
Set LUA_COMPAT to 'lua5-{1,2} luajit' as per the upstream build scripts;
builds fine against lua5.3 but I haven't reviewed the included Lua
scripts for compatibility with that version and there is no test phase
yet.
Migration-wise, one thing worth pointing out is that upstream build
scripts attempt to locate some of the Lua modules by locating a Lua
interpreter on the *build* system and telling to load those modules. For
now all that has been changed is that we force the use the interpreter
to match the value of LUA_SINGLE_TARGET (nb. the messages like "[lua5.2]
file not found" can be ignored - there is one check which expects an
absolute path and by setting LUA_PRG to $ELUA instead of $LUA we can
re-use this variable for dev-lua/luv detection, this is just a status
message though), then again it might require further revision. Will
leave this to the actual maintainers.
Beyond the above, it was just having to force CMake to look for a
specific Lua version (usual) as well as a tweak to dev-lua/luv detection
so that it works with multi-impl installations of that package
(expected).
Closes: https://bugs.gentoo.org/752912
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-editors/neovim/files')
-rw-r--r-- | app-editors/neovim/files/neovim-0.4.4-cmake_lua_version.patch | 11 | ||||
-rw-r--r-- | app-editors/neovim/files/neovim-0.4.4-cmake_multiimpl_luv.patch | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/app-editors/neovim/files/neovim-0.4.4-cmake_lua_version.patch b/app-editors/neovim/files/neovim-0.4.4-cmake_lua_version.patch new file mode 100644 index 000000000000..4703dee52613 --- /dev/null +++ b/app-editors/neovim/files/neovim-0.4.4-cmake_lua_version.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -384,7 +384,7 @@ + option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF) + + if(PREFER_LUA) +- find_package(Lua 5.1 REQUIRED) ++ find_package(Lua ${PREFER_LUA} EXACT REQUIRED) + set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR}) + set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES}) + # Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped. diff --git a/app-editors/neovim/files/neovim-0.4.4-cmake_multiimpl_luv.patch b/app-editors/neovim/files/neovim-0.4.4-cmake_multiimpl_luv.patch new file mode 100644 index 000000000000..62c6a84eae13 --- /dev/null +++ b/app-editors/neovim/files/neovim-0.4.4-cmake_multiimpl_luv.patch @@ -0,0 +1,11 @@ +--- a/cmake/FindLibLUV.cmake ++++ b/cmake/FindLibLUV.cmake +@@ -6,7 +6,7 @@ + + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) +- pkg_check_modules(PC_LIBLUV QUIET luv) ++ pkg_check_modules(PC_LIBLUV QUIET "libluv-${LUA_PRG}") + endif() + + set(LIBLUV_DEFINITIONS ${PC_LIBLUV_CFLAGS_OTHER}) |