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 403a8aaf..294ff52b 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
@@ -122,8 +122,10 @@ function builtin.run(rockspec) | |||
122 | local basename = dir.base_name(library):gsub(".[^.]*$", "") | 122 | local basename = dir.base_name(library):gsub(".[^.]*$", "") |
123 | local deffile = basename .. ".def" | 123 | local deffile = basename .. ".def" |
124 | local def = io.open(dir.path(fs.current_dir(), deffile), "w+") | 124 | local def = io.open(dir.path(fs.current_dir(), deffile), "w+") |
125 | local exported_name = name:gsub("%.", "_") | ||
126 | exported_name = exported_name:match('^[^%-]+%-(.+)$') or exported_name | ||
125 | def:write("EXPORTS\n") | 127 | def:write("EXPORTS\n") |
126 | def:write("luaopen_"..name:gsub("%.", "_").."\n") | 128 | def:write("luaopen_"..exported_name.."\n") |
127 | def:close() | 129 | def:close() |
128 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) | 130 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) |
129 | local basedir = "" | 131 | local basedir = "" |