build/luarocks: avoid parallelism for luarocks build

Is there a race between the luarocks `make bootstrap` dependencies?

reverts f73b4911312b35bfe38ed068672a2f8ba8875ba7
ref https://github.com/luarocks/luarocks/pull/774
This commit is contained in:
Justin M. Keyes 2018-03-09 00:36:17 +01:00
parent 90963a9c55
commit de919b9b94
3 changed files with 6 additions and 36 deletions

View File

@ -50,9 +50,11 @@ endif()
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
find_package(Git)
if(NOT Git_FOUND)
message(FATAL_ERROR "Git is required to apply patches to bundled dependencies")
if(WIN32)
find_package(Git)
if(NOT Git_FOUND)
message(FATAL_ERROR "Git is required to apply patches for Windows.")
endif()
endif()
if(UNIX)

View File

@ -70,13 +70,9 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
endif()
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
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
INSTALL_COMMAND ${MAKE_PRG} bootstrap)
INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap)
elseif(MSVC OR MINGW)
if(MINGW)

View File

@ -1,28 +0,0 @@
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