diff options
| author | Hisham <hisham@gobolinux.org> | 2016-10-29 23:38:01 -0200 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-10-29 23:38:01 -0200 |
| commit | 079ea1d4fdbd2d49147f9035cf99461f10bb7cd9 (patch) | |
| tree | 2b6c80ee7735de8c782a608494cb22e33f92e352 | |
| parent | ee62d0fbc1ef08d1c258857d43c434680fd9ab1f (diff) | |
| download | luarocks-079ea1d4fdbd2d49147f9035cf99461f10bb7cd9.tar.gz luarocks-079ea1d4fdbd2d49147f9035cf99461f10bb7cd9.tar.bz2 luarocks-079ea1d4fdbd2d49147f9035cf99461f10bb7cd9.zip | |
"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.
| -rw-r--r-- | src/luarocks/build/builtin.lua | 6 | ||||
| -rw-r--r-- | src/luarocks/core/path.lua | 2 |
2 files changed, 8 insertions, 0 deletions
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) | |||
| 82 | local ok = execute(variables.LD.." "..variables.LIBFLAG, "-o", library, unpack(extras)) | 82 | local ok = execute(variables.LD.." "..variables.LIBFLAG, "-o", library, unpack(extras)) |
| 83 | return ok | 83 | return ok |
| 84 | end | 84 | end |
| 85 | --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. | ||
| 85 | compile_static_library = function(library, objects, libraries, libdirs, name) | 86 | compile_static_library = function(library, objects, libraries, libdirs, name) |
| 86 | local ok = execute(variables.AR, "rc", library, unpack(objects)) | 87 | local ok = execute(variables.AR, "rc", library, unpack(objects)) |
| 87 | if ok then | 88 | if ok then |
| @@ -89,6 +90,7 @@ function builtin.run(rockspec) | |||
| 89 | end | 90 | end |
| 90 | return ok | 91 | return ok |
| 91 | end | 92 | end |
| 93 | ]] | ||
| 92 | compile_wrapper_binary = function(fullname, name) | 94 | compile_wrapper_binary = function(fullname, name) |
| 93 | --TODO EXEWRAPPER | 95 | --TODO EXEWRAPPER |
| 94 | local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") | 96 | local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") |
| @@ -135,10 +137,12 @@ function builtin.run(rockspec) | |||
| 135 | end | 137 | end |
| 136 | return ok | 138 | return ok |
| 137 | end | 139 | end |
| 140 | --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. | ||
| 138 | compile_static_library = function(library, objects, libraries, libdirs, name) | 141 | compile_static_library = function(library, objects, libraries, libdirs, name) |
| 139 | local ok = execute(variables.AR, "-out:"..library, unpack(objects)) | 142 | local ok = execute(variables.AR, "-out:"..library, unpack(objects)) |
| 140 | return ok | 143 | return ok |
| 141 | end | 144 | end |
| 145 | ]] | ||
| 142 | compile_wrapper_binary = function(fullname, name) | 146 | compile_wrapper_binary = function(fullname, name) |
| 143 | --TODO EXEWRAPPER | 147 | --TODO EXEWRAPPER |
| 144 | local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") | 148 | local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\") |
| @@ -262,6 +266,7 @@ function builtin.run(rockspec) | |||
| 262 | if not ok then | 266 | if not ok then |
| 263 | return nil, "Failed compiling module "..module_name | 267 | return nil, "Failed compiling module "..module_name |
| 264 | end | 268 | end |
| 269 | --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. | ||
| 265 | module_name = name:match("([^.]*)$").."."..util.matchquote(cfg.static_lib_extension) | 270 | module_name = name:match("([^.]*)$").."."..util.matchquote(cfg.static_lib_extension) |
| 266 | if moddir ~= "" then | 271 | if moddir ~= "" then |
| 267 | module_name = dir.path(moddir, module_name) | 272 | module_name = dir.path(moddir, module_name) |
| @@ -271,6 +276,7 @@ function builtin.run(rockspec) | |||
| 271 | if not ok then | 276 | if not ok then |
| 272 | return nil, "Failed compiling static library "..module_name | 277 | return nil, "Failed compiling static library "..module_name |
| 273 | end | 278 | end |
| 279 | ]] | ||
| 274 | end | 280 | end |
| 275 | end | 281 | end |
| 276 | for _, mods in ipairs({{ tbl = lua_modules, perms = cfg.perm_read }, { tbl = lib_modules, perms = cfg.perm_exec }}) do | 282 | 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) | |||
| 53 | name = file:match("(.*)%."..cfg.lib_extension.."$") | 53 | name = file:match("(.*)%."..cfg.lib_extension.."$") |
| 54 | if name then | 54 | if name then |
| 55 | name = name:gsub(dir.separator, ".") | 55 | name = name:gsub(dir.separator, ".") |
| 56 | --[[ TODO disable static libs until we fix the conflict in the manifest, which will take extending the manifest format. | ||
| 56 | else | 57 | else |
| 57 | name = file:match("(.*)%."..cfg.static_lib_extension.."$") | 58 | name = file:match("(.*)%."..cfg.static_lib_extension.."$") |
| 58 | if name then | 59 | if name then |
| 59 | name = name:gsub(dir.separator, ".") | 60 | name = name:gsub(dir.separator, ".") |
| 60 | end | 61 | end |
| 62 | ]] | ||
| 61 | end | 63 | end |
| 62 | end | 64 | end |
| 63 | if not name then name = file end | 65 | if not name then name = file end |
