From 8b9535bbcbefd68c3e318e127e2184624e6fa0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Burgue=C3=B1o?= Date: Sat, 29 Aug 2015 16:24:35 -0300 Subject: [PATCH] Support for LuaRocks with Visual Studio compiler. Embeds a patch in the rockspec, adding a hack to allow luasec to compile when using LuaRocks and Visual Studio. This is needed until https://github.com/keplerproject/luarocks/issues/284 is fixed. --- ...a-2.rockspec => luasec-0.6alpha-3.rockspec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) rename luasec-0.6alpha-2.rockspec => luasec-0.6alpha-3.rockspec (87%) diff --git a/luasec-0.6alpha-2.rockspec b/luasec-0.6alpha-3.rockspec similarity index 87% rename from luasec-0.6alpha-2.rockspec rename to luasec-0.6alpha-3.rockspec index 3fe0044..ca17509 100644 --- a/luasec-0.6alpha-2.rockspec +++ b/luasec-0.6alpha-3.rockspec @@ -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" @@ -91,8 +91,23 @@ build = { "src/x509.c", "src/context.c", "src/ssl.c", "src/luasocket/buffer.c", "src/luasocket/io.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 +]] } } }