From 4934b8e3b5560db2cca7aaa768e1ddc4e936b4e8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 27 Feb 2024 14:45:25 -0300 Subject: deps: bump luasocket and luasec --- binary/all_in_one | 5 +- binary/luasec-1.0.2-1.rockspec | 115 -------------------------------- binary/luasec-1.3.2-1.rockspec | 98 +++++++++++++++++++++++++++ binary/luasocket-3.1.0-1.rockspec | 135 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 236 insertions(+), 117 deletions(-) delete mode 100644 binary/luasec-1.0.2-1.rockspec create mode 100644 binary/luasec-1.3.2-1.rockspec create mode 100644 binary/luasocket-3.1.0-1.rockspec diff --git a/binary/all_in_one b/binary/all_in_one index 53e0f13f..784ce1ec 100755 --- a/binary/all_in_one +++ b/binary/all_in_one @@ -455,6 +455,7 @@ local function main() LUA_DIR = LUA_DIR, LIBFLAG = "-static", PWD = "pwd", + MKDIR = "mkdir", }, platforms = if_platform("windows", { "windows", "win32", "mingw32" }), external_deps_dirs = if_platform("windows", { CROSSCOMPILER_SYSROOT, fs.current_dir() .. "/windows-deps-" .. TRIPLET }), @@ -462,11 +463,11 @@ local function main() local dependencies = { md5 = "md5", - luasec = "./binary/luasec-1.0.2-1.rockspec", + luasec = "./binary/luasec-1.3.2-1.rockspec", ["lua-zlib"] = "./binary/lua-zlib-1.2-0.rockspec", ["lua-bz2"] = "./binary/lua-bz2-0.2.1-1.rockspec", luaposix = if_platform("unix", "./binary/luaposix-35.1-1.rockspec"), - luasocket = "luasocket", + luasocket = "./binary/luasocket-3.1.0-1.rockspec", luafilesystem = "luafilesystem", } diff --git a/binary/luasec-1.0.2-1.rockspec b/binary/luasec-1.0.2-1.rockspec deleted file mode 100644 index b6741257..00000000 --- a/binary/luasec-1.0.2-1.rockspec +++ /dev/null @@ -1,115 +0,0 @@ -package = "LuaSec" -version = "1.0.2-1" -source = { - url = "git://github.com/brunoos/luasec", - tag = "v1.0.2", -} -description = { - summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.", - detailed = "This version delegates to LuaSocket the TCP connection establishment between the client and server. Then LuaSec uses this connection to start a secure TLS/SSL session.", - homepage = "https://github.com/brunoos/luasec/wiki", - license = "MIT" -} -dependencies = { - "lua >= 5.1", "luasocket" -} -external_dependencies = { - platforms = { - unix = { - OPENSSL = { - header = "openssl/ssl.h", - library = "ssl" - } - }, - windows = { - OPENSSL = { - header = "openssl/ssl.h", - } - }, - mingw32 = { - OPENSSL = { - library = "ssl", - } - }, - } -} -build = { - type = "builtin", - copy_directories = { - "samples" - }, - platforms = { - unix = { - modules = { - ['ssl.https'] = "src/https.lua", - ['ssl.init'] = "src/ssl.lua", - ssl = { - defines = { - "WITH_LUASOCKET", "LUASOCKET_DEBUG", - }, - incdirs = { - "$(OPENSSL_INCDIR)", "src/", "src/luasocket", - }, - libdirs = { - "$(OPENSSL_LIBDIR)" - }, - libraries = { - "ssl", "crypto" - }, - sources = { - "src/options.c", "src/config.c", "src/ec.c", - "src/x509.c", "src/context.c", "src/ssl.c", - "src/luasocket/buffer.c", "src/luasocket/io.c", - "src/luasocket/usocket.c" -- , "src/luasocket/timeout.c" - } - } - } - }, - windows = { - modules = { - ['ssl.https'] = "src/https.lua", - ['ssl.init'] = "src/ssl.lua", - ssl = { - defines = { - "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)", - "WITH_LUASOCKET", "LUASOCKET_DEBUG", - "LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", "NTDDI_VERSION=0x05010300" - }, - libdirs = { - "$(OPENSSL_LIBDIR)", - "$(OPENSSL_BINDIR)", - }, - libraries = { - "ssl", "crypto", "ws2_32" - }, - incdirs = { - "$(OPENSSL_INCDIR)", "src/", "src/luasocket" - }, - sources = { - "src/options.c", "src/config.c", "src/ec.c", - "src/x509.c", "src/context.c", "src/ssl.c", - "src/luasocket/buffer.c", "src/luasocket/io.c", - "src/luasocket/wsocket.c", "src/luasocket/timeout.c" - } - } - }, - patches = { -["lowercase-winsock-h.diff"] = [[ -diff --git a/src/ssl.c b/src/ssl.c -index 95109c4..e5defa8 100644 ---- a/src/ssl.c -+++ b/src/ssl.c -@@ -11,7 +11,7 @@ - #include - - #if defined(WIN32) --#include -+#include - #endif - - #include -]] - } - } - } -} diff --git a/binary/luasec-1.3.2-1.rockspec b/binary/luasec-1.3.2-1.rockspec new file mode 100644 index 00000000..81cb31f2 --- /dev/null +++ b/binary/luasec-1.3.2-1.rockspec @@ -0,0 +1,98 @@ +package = "LuaSec" +version = "1.3.2-1" +source = { + url = "git+https://github.com/brunoos/luasec", + tag = "v1.3.2", +} +description = { + summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.", + detailed = "This version delegates to LuaSocket the TCP connection establishment between the client and server. Then LuaSec uses this connection to start a secure TLS/SSL session.", + homepage = "https://github.com/brunoos/luasec/wiki", + license = "MIT" +} +dependencies = { + "lua >= 5.1", "luasocket" +} +external_dependencies = { + platforms = { + unix = { + OPENSSL = { + header = "openssl/ssl.h", + library = "ssl" + } + }, + windows = { + OPENSSL = { + header = "openssl/ssl.h", + } + }, + mingw32 = { + OPENSSL = { + library = "ssl", + } + }, + } +} +build = { + type = "builtin", + copy_directories = { + "samples" + }, + platforms = { + unix = { + modules = { + ['ssl.https'] = "src/https.lua", + ['ssl.init'] = "src/ssl.lua", + ssl = { + defines = { + "WITH_LUASOCKET", "LUASOCKET_DEBUG", + }, + incdirs = { + "$(OPENSSL_INCDIR)", "src/", "src/luasocket", + }, + libdirs = { + "$(OPENSSL_LIBDIR)" + }, + libraries = { + "ssl", "crypto" + }, + sources = { + "src/options.c", "src/config.c", "src/ec.c", + "src/x509.c", "src/context.c", "src/ssl.c", + "src/luasocket/buffer.c", "src/luasocket/io.c", + "src/luasocket/usocket.c" -- , "src/luasocket/timeout.c" + } + } + } + }, + windows = { + modules = { + ['ssl.https'] = "src/https.lua", + ['ssl.init'] = "src/ssl.lua", + ssl = { + defines = { + "WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "LSEC_EXPORTS", "BUFFER_DEBUG", "LSEC_API=__declspec(dllexport)", + "WITH_LUASOCKET", "LUASOCKET_DEBUG", + "LUASEC_INET_NTOP", "WINVER=0x0501", "_WIN32_WINNT=0x0501", "NTDDI_VERSION=0x05010300" + }, + libdirs = { + "$(OPENSSL_LIBDIR)", + "$(OPENSSL_BINDIR)", + }, + libraries = { + "ssl", "crypto", "ws2_32" + }, + incdirs = { + "$(OPENSSL_INCDIR)", "src/", "src/luasocket" + }, + sources = { + "src/options.c", "src/config.c", "src/ec.c", + "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" + }, + }, + }, + }, + } +} diff --git a/binary/luasocket-3.1.0-1.rockspec b/binary/luasocket-3.1.0-1.rockspec new file mode 100644 index 00000000..dd9e6364 --- /dev/null +++ b/binary/luasocket-3.1.0-1.rockspec @@ -0,0 +1,135 @@ +package = "LuaSocket" +version = "3.1.0-1" +source = { + url = "git+https://github.com/lunarmodules/luasocket.git", + tag = "v3.1.0" +} +description = { + summary = "Network support for the Lua language", + detailed = [[ + LuaSocket is a Lua extension library composed of two parts: a set of C + modules that provide support for the TCP and UDP transport layers, and a + set of Lua modules that provide functions commonly needed by applications + that deal with the Internet. + ]], + homepage = "https://github.com/lunarmodules/luasocket", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} + +local function make_plat(plat) + local defines = { + unix = { + "LUASOCKET_DEBUG" + }, + macosx = { + "LUASOCKET_DEBUG", + "UNIX_HAS_SUN_LEN" + }, + win32 = { + "LUASOCKET_DEBUG", + "NDEBUG" + }, + mingw32 = { + "LUASOCKET_DEBUG", + "LUASOCKET_INET_PTON", + "WINVER=0x0501" + } + } + local modules = { + ["socket.core"] = { + sources = { + "src/luasocket.c" + , "src/timeout.c" + , "src/buffer.c" + , "src/io.c" + , "src/auxiliar.c" + , "src/options.c" + , "src/inet.c" + , "src/except.c" + , "src/select.c" + , "src/tcp.c" + , "src/udp.c" + , "src/compat.c" }, + defines = defines[plat], + incdir = "/src" + }, + ["mime.core"] = { + sources = { "src/mime.c", "src/compat.c" }, + defines = defines[plat], + incdir = "/src" + }, + ["socket.http"] = "src/http.lua", + ["socket.url"] = "src/url.lua", + ["socket.tp"] = "src/tp.lua", + ["socket.ftp"] = "src/ftp.lua", + ["socket.headers"] = "src/headers.lua", + ["socket.smtp"] = "src/smtp.lua", + ltn12 = "src/ltn12.lua", + socket = "src/socket.lua", + mime = "src/mime.lua" + } + if plat == "unix" + or plat == "macosx" + or plat == "haiku" + then + modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" + if plat == "haiku" then + modules["socket.core"].libraries = {"network"} + end + modules["socket.unix"] = { + sources = { + "src/buffer.c" + , "src/compat.c" + , "src/auxiliar.c" + , "src/options.c" + , "src/timeout.c" + , "src/io.c" + , "src/usocket.c" + , "src/unix.c" + , "src/unixdgram.c" + , "src/unixstream.c" }, + defines = defines[plat], + incdir = "/src" + } + modules["socket.serial"] = { + sources = { + "src/buffer.c" + , "src/compat.c" + , "src/auxiliar.c" + , "src/options.c" + , "src/timeout.c" + , "src/io.c" + , "src/usocket.c" + , "src/serial.c" }, + defines = defines[plat], + incdir = "/src" + } + end + if plat == "win32" + or plat == "mingw32" + then + modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" + modules["socket.core"].libraries = { "ws2_32" } + modules["socket.core"].libdirs = {} + end + return { modules = modules } +end + +build = { + type = "builtin", + platforms = { + unix = make_plat("unix"), + macosx = make_plat("macosx"), + haiku = make_plat("haiku"), + win32 = make_plat("win32"), + mingw32 = make_plat("mingw32") + }, + copy_directories = { + "docs" + , "samples" + , "etc" + , "test" } +} -- cgit v1.2.3-55-g6feb