mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
Enables building with LuaRocks and MS compilers
A patch is added to the rockspec to fix an issue in the interaction between LuaRocks and Microsoft compilers. LuaRocks build backend assumes the library being built will allways export a symbol called "luaopen_<library name>". This is not the case with LuaSec so it fails to link. The patch just adds an empty implementation of that, so it will properly link.
This commit is contained in:
parent
73a2c4ceda
commit
8eb48c2d8b
@ -1,5 +1,5 @@
|
||||
package = "LuaSec"
|
||||
version = "0.6alpha-2"
|
||||
version = "0.6alpha-3"
|
||||
source = {
|
||||
url = "git://github.com/brunoos/luasec.git",
|
||||
tag = "luasec-0.6alpha"
|
||||
@ -93,6 +93,21 @@ build = {
|
||||
"src/luasocket/timeout.c", "src/luasocket/wsocket.c"
|
||||
}
|
||||
}
|
||||
},
|
||||
patches = {
|
||||
["luarocks_vs_compiler.patch"] = [[
|
||||
--- a/src/ssl.c.orig
|
||||
+++ b/src/ssl.c
|
||||
@@ -844,3 +844,8 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+#if defined(_MSC_VER)
|
||||
+/* Empty implementation to allow building with LuaRocks and MS compilers */
|
||||
+LSEC_API int luaopen_ssl(lua_State *L) { return 0; }
|
||||
+#endif
|
||||
]]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user