mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
build/luarocks: apply "Fix siteconfig" patch
upstream: https://github.com/luarocks/luarocks/pull/774
This commit is contained in:
8
third-party/CMakeLists.txt
vendored
8
third-party/CMakeLists.txt
vendored
@@ -50,11 +50,9 @@ endif()
|
|||||||
|
|
||||||
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
|
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
|
||||||
|
|
||||||
if(WIN32)
|
find_package(Git)
|
||||||
find_package(Git)
|
if(NOT Git_FOUND)
|
||||||
if(NOT Git_FOUND)
|
message(FATAL_ERROR "Git is required to apply patches to bundled dependencies")
|
||||||
message(FATAL_ERROR "Git is required to apply patches for Windows.")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
4
third-party/cmake/BuildLuarocks.cmake
vendored
4
third-party/cmake/BuildLuarocks.cmake
vendored
@@ -70,6 +70,10 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
BuildLuarocks(
|
BuildLuarocks(
|
||||||
|
PATCH_COMMAND
|
||||||
|
${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/luarocks init
|
||||||
|
COMMAND ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/luarocks apply
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/patches/luarocks-Fix-siteconfig.patch
|
||||||
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
|
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
|
||||||
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
|
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
|
||||||
INSTALL_COMMAND ${MAKE_PRG} bootstrap)
|
INSTALL_COMMAND ${MAKE_PRG} bootstrap)
|
||||||
|
28
third-party/patches/luarocks-Fix-siteconfig.patch
vendored
Normal file
28
third-party/patches/luarocks-Fix-siteconfig.patch
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
From dad6687372b1568f1543388d5014190a076e388a Mon Sep 17 00:00:00 2001
|
||||||
|
Date: Thu, 8 Mar 2018 22:50:52 +0100
|
||||||
|
Subject: [PATCH] Fix site_config
|
||||||
|
|
||||||
|
---
|
||||||
|
src/luarocks/cfg.lua | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
|
||||||
|
index 1d5c9872e205..aa34a4f9748b 100644
|
||||||
|
--- a/src/luarocks/cfg.lua
|
||||||
|
+++ b/src/luarocks/cfg.lua
|
||||||
|
@@ -23,10 +23,10 @@ local version_suffix = cfg.lua_version:gsub("%.", "_")
|
||||||
|
|
||||||
|
-- Load site-local global configurations
|
||||||
|
local ok, site_config = pcall(require, "luarocks.site_config_"..version_suffix)
|
||||||
|
-if not ok then
|
||||||
|
+if not ok or type(site_config) ~= "table" then
|
||||||
|
ok, site_config = pcall(require, "luarocks.site_config")
|
||||||
|
end
|
||||||
|
-if not ok then
|
||||||
|
+if not ok or type(site_config) ~= "table" then
|
||||||
|
io.stderr:write("Site-local luarocks/site_config.lua file not found. Incomplete installation?\n")
|
||||||
|
site_config = {}
|
||||||
|
end
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
Reference in New Issue
Block a user