diff options
-rw-r--r-- | src/luarocks/build/builtin.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index ccefaa3b..b8f3cc39 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
@@ -113,8 +113,10 @@ function builtin.run(rockspec) | |||
113 | local basename = dir.base_name(library):gsub(".[^.]*$", "") | 113 | local basename = dir.base_name(library):gsub(".[^.]*$", "") |
114 | local deffile = basename .. ".def" | 114 | local deffile = basename .. ".def" |
115 | local def = io.open(dir.path(fs.current_dir(), deffile), "w+") | 115 | local def = io.open(dir.path(fs.current_dir(), deffile), "w+") |
116 | local exported_name = name:gsub("%.", "_") | ||
117 | exported_name = exported_name:match('^[^%-]+%-(.+)$') or exported_name | ||
116 | def:write("EXPORTS\n") | 118 | def:write("EXPORTS\n") |
117 | def:write("luaopen_"..name:gsub("%.", "_").."\n") | 119 | def:write("luaopen_"..exported_name.."\n") |
118 | def:close() | 120 | def:close() |
119 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) | 121 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) |
120 | local basedir = "" | 122 | local basedir = "" |