diff options
author | Eric Chiesse <echiesse@gmail.com> | 2013-11-23 01:55:45 -0300 |
---|---|---|
committer | Eric Chiesse <echiesse@gmail.com> | 2013-11-23 01:55:45 -0300 |
commit | fdbb7edbe999b2e3ffa2d84a3bc3cb45227057d9 (patch) | |
tree | 2baa176f9a96981d87925778a5c2cfb2c805a8e0 | |
parent | 143cc28429bae0ba72c08433e21aacdf3723d72f (diff) | |
download | luarocks-fdbb7edbe999b2e3ffa2d84a3bc3cb45227057d9.tar.gz luarocks-fdbb7edbe999b2e3ffa2d84a3bc3cb45227057d9.tar.bz2 luarocks-fdbb7edbe999b2e3ffa2d84a3bc3cb45227057d9.zip |
Corrigido erro de não fazer o embed do manifest em dlls compiladas pelo Visual Studio 2008 no caso de a dll fazer parte de um módulo (estar em um subdiretório). O LuaRocks não fazia corretamente o build de módulo que tivessem estrutura de diretório (como luasql.postgres).
-rw-r--r-- | src/luarocks/build/builtin.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index 427ab7c9..f9ef4c44 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
@@ -112,9 +112,15 @@ function run(rockspec) | |||
112 | def:write("luaopen_"..name:gsub("%.", "_").."\n") | 112 | def:write("luaopen_"..name:gsub("%.", "_").."\n") |
113 | def:close() | 113 | def:close() |
114 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) | 114 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) |
115 | local manifestfile = basename..".dll.manifest" | 115 | local basedir = "" |
116 | if name:find("%.") ~= nil then | ||
117 | basedir = name:gsub("%.%w+$", "\\") | ||
118 | basedir = basedir:gsub("%.", "\\") | ||
119 | end | ||
120 | local manifestfile = basedir .. basename..".dll.manifest" | ||
121 | |||
116 | if ok and fs.exists(manifestfile) then | 122 | if ok and fs.exists(manifestfile) then |
117 | ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..basename..".dll;2") | 123 | ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..basedir..basename..".dll;2") |
118 | end | 124 | end |
119 | return ok | 125 | return ok |
120 | end | 126 | end |
@@ -250,7 +256,7 @@ function run(rockspec) | |||
250 | end | 256 | end |
251 | if fs.is_dir("lua") then | 257 | if fs.is_dir("lua") then |
252 | local ok, err = fs.copy_contents("lua", luadir) | 258 | local ok, err = fs.copy_contents("lua", luadir) |
253 | if not ok then | 259 | if not ok then |
254 | return nil, "Failed copying contents of 'lua' directory: "..err | 260 | return nil, "Failed copying contents of 'lua' directory: "..err |
255 | end | 261 | end |
256 | end | 262 | end |