mirror of
https://github.com/brunoos/luasec.git
synced 2024-09-07 05:14:43 +02: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"
|
package = "LuaSec"
|
||||||
version = "0.6alpha-2"
|
version = "0.6alpha-3"
|
||||||
source = {
|
source = {
|
||||||
url = "git://github.com/brunoos/luasec.git",
|
url = "git://github.com/brunoos/luasec.git",
|
||||||
tag = "luasec-0.6alpha"
|
tag = "luasec-0.6alpha"
|
||||||
@ -93,6 +93,21 @@ build = {
|
|||||||
"src/luasocket/timeout.c", "src/luasocket/wsocket.c"
|
"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