From 079ea1d4fdbd2d49147f9035cf99461f10bb7cd9 Mon Sep 17 00:00:00 2001 From: Hisham Date: Sat, 29 Oct 2016 23:38:01 -0200 Subject: "soft-revert" support for building static libs. This is causing a conflict in the manifest file. Looks like we'll need to extend the manifest format anyway. --- src/luarocks/build/builtin.lua | 6 ++++++ src/luarocks/core/path.lua | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index db6f8bc4..59c530a4 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua @@ -82,6 +82,7 @@ function builtin.run(rockspec) local ok = execute(variables.LD.." "..variables.LIBFLAG, "-o", library, unpack(extras)) return ok end + --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. compile_static_library = function(library, objects, libraries, libdirs, name) local ok = execute(variables.AR, "rc", library, unpack(objects)) if ok then @@ -89,6 +90,7 @@ function builtin.run(rockspec) end return ok end + ]] compile_wrapper_binary = function(fullname, name) --TODO EXEWRAPPER local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") @@ -135,10 +137,12 @@ function builtin.run(rockspec) end return ok end + --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. compile_static_library = function(library, objects, libraries, libdirs, name) local ok = execute(variables.AR, "-out:"..library, unpack(objects)) return ok end + ]] compile_wrapper_binary = function(fullname, name) --TODO EXEWRAPPER local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") @@ -262,6 +266,7 @@ function builtin.run(rockspec) if not ok then return nil, "Failed compiling module "..module_name end + --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. module_name = name:match("([^.]*)$").."."..util.matchquote(cfg.static_lib_extension) if moddir ~= "" then module_name = dir.path(moddir, module_name) @@ -271,6 +276,7 @@ function builtin.run(rockspec) if not ok then return nil, "Failed compiling static library "..module_name end + ]] end end for _, mods in ipairs({{ tbl = lua_modules, perms = cfg.perm_read }, { tbl = lib_modules, perms = cfg.perm_exec }}) do diff --git a/src/luarocks/core/path.lua b/src/luarocks/core/path.lua index ffde2c68..a4eb8b4b 100644 --- a/src/luarocks/core/path.lua +++ b/src/luarocks/core/path.lua @@ -53,11 +53,13 @@ function path.path_to_module(file) name = file:match("(.*)%."..cfg.lib_extension.."$") if name then name = name:gsub(dir.separator, ".") + --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. else name = file:match("(.*)%."..cfg.static_lib_extension.."$") if name then name = name:gsub(dir.separator, ".") end + ]] end end if not name then name = file end -- cgit v1.2.3-55-g6feb