diff options
-rw-r--r-- | third-party/CMakeLists.txt | 8 | ||||
-rw-r--r-- | third-party/cmake/BuildLuarocks.cmake | 6 | ||||
-rw-r--r-- | third-party/patches/luarocks-Fix-siteconfig.patch | 28 |
3 files changed, 6 insertions, 36 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index fb3166b70f..7c95bbb91d 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -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) diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake index 2b85e3fd82..f9960495fc 100644 --- a/third-party/cmake/BuildLuarocks.cmake +++ b/third-party/cmake/BuildLuarocks.cmake @@ -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) diff --git a/third-party/patches/luarocks-Fix-siteconfig.patch b/third-party/patches/luarocks-Fix-siteconfig.patch deleted file mode 100644 index fbc9e664d2..0000000000 --- a/third-party/patches/luarocks-Fix-siteconfig.patch +++ /dev/null @@ -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 - |