From d0f2d132bf4b02ff342b3d87479ec0cf46f7c059 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 19 Mar 2022 17:55:12 +0300 Subject: [PATCH 1/4] chore: Move SCM rockspec to root and bump rockrel to 3 --- .../luasocket-scm-2.rockspec => luasocket-scm-3.rockspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename rockspec/luasocket-scm-2.rockspec => luasocket-scm-3.rockspec (95%) diff --git a/rockspec/luasocket-scm-2.rockspec b/luasocket-scm-3.rockspec similarity index 95% rename from rockspec/luasocket-scm-2.rockspec rename to luasocket-scm-3.rockspec index 9a71b07..4e1669c 100644 --- a/rockspec/luasocket-scm-2.rockspec +++ b/luasocket-scm-3.rockspec @@ -1,8 +1,8 @@ package = "LuaSocket" -version = "scm-2" +version = "scm-3" source = { - url = "git://github.com/diegonehab/luasocket.git" - , branch="master" + url = "git+https://github.com/lunarmodules/luasocket.git", + branch = "master" } description = { summary = "Network support for the Lua language", @@ -12,7 +12,7 @@ description = { modules that add support for functionality commonly needed by applications that deal with the Internet. ]], - homepage = "http://luaforge.net/projects/luasocket/", + homepage = "https://github.com/lunarmodules/luasocket", license = "MIT" } dependencies = { From 36428e07cd164c83f71469d1bb84992bd026cbb3 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 19 Mar 2022 17:55:12 +0300 Subject: [PATCH 2/4] chore: Rename rockspec dir to be plural --- {rockspec => rockspecs}/luasocket-3.0rc2-1.rockspec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {rockspec => rockspecs}/luasocket-3.0rc2-1.rockspec (100%) diff --git a/rockspec/luasocket-3.0rc2-1.rockspec b/rockspecs/luasocket-3.0rc2-1.rockspec similarity index 100% rename from rockspec/luasocket-3.0rc2-1.rockspec rename to rockspecs/luasocket-3.0rc2-1.rockspec From 335f647075fb5e0423039e9a335bbf032e8a8334 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 19 Mar 2022 18:20:05 +0300 Subject: [PATCH 3/4] chore: Add current most recent rockspec as published --- rockspecs/luasocket-3.0rc1-2.rockspec | 108 ++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 rockspecs/luasocket-3.0rc1-2.rockspec diff --git a/rockspecs/luasocket-3.0rc1-2.rockspec b/rockspecs/luasocket-3.0rc1-2.rockspec new file mode 100644 index 0000000..3cb6524 --- /dev/null +++ b/rockspecs/luasocket-3.0rc1-2.rockspec @@ -0,0 +1,108 @@ +package = "LuaSocket" +version = "3.0rc1-2" +source = { + url = "https://github.com/diegonehab/luasocket/archive/v3.0-rc1.zip", + dir = "luasocket-3.0-rc1", +} +description = { + summary = "Network support for the Lua language", + detailed = [[ + LuaSocket is a Lua extension library that is composed by two parts: a C core + that provides support for the TCP and UDP transport layers, and a set of Lua + modules that add support for functionality commonly needed by applications + that deal with the Internet. + ]], + homepage = "http://luaforge.net/projects/luasocket/", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} + +local function make_plat(plat) + local defines = { + unix = { + "LUA_COMPAT_APIINTCASTS", + "LUASOCKET_DEBUG", + "LUASOCKET_API=__attribute__((visibility(\"default\")))", + "UNIX_API=__attribute__((visibility(\"default\")))", + "MIME_API=__attribute__((visibility(\"default\")))" + }, + macosx = { + "LUA_COMPAT_APIINTCASTS", + "LUASOCKET_DEBUG", + "UNIX_HAS_SUN_LEN", + "LUASOCKET_API=__attribute__((visibility(\"default\")))", + "UNIX_API=__attribute__((visibility(\"default\")))", + "MIME_API=__attribute__((visibility(\"default\")))" + }, + win32 = { + "LUA_COMPAT_APIINTCASTS", + "LUASOCKET_DEBUG", + "NDEBUG", + "LUASOCKET_API=__declspec(dllexport)", + "MIME_API=__declspec(dllexport)" + }, + mingw32 = { + "LUA_COMPAT_APIINTCASTS", + "LUASOCKET_DEBUG", + "LUASOCKET_INET_PTON", + "WINVER=0x0501", + "LUASOCKET_API=__declspec(dllexport)", + "MIME_API=__declspec(dllexport)" + } + } + 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" }, + defines = defines[plat], + incdir = "src" + }, + ["mime.core"] = { + sources = { "src/mime.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" then + modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" + modules["socket.unix"] = { + sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", + "src/usocket.c", "src/unix.c" }, + defines = defines[plat], + incdir = "/src" + } + modules["socket.serial"] = { + sources = { "src/buffer.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" } + end + return { modules = modules } +end + +build = { + type = "builtin", + platforms = { + unix = make_plat("unix"), + macosx = make_plat("macosx"), + win32 = make_plat("win32"), + mingw32 = make_plat("mingw32") + }, + copy_directories = { "doc", "samples", "etc", "test" } +} From 91aa6522a0a4d5e24af86524fa68350de40a2667 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 19 Mar 2022 18:20:52 +0300 Subject: [PATCH 4/4] chore: Drop rockspec for never-published RC2 release --- rockspecs/luasocket-3.0rc2-1.rockspec | 134 -------------------------- 1 file changed, 134 deletions(-) delete mode 100644 rockspecs/luasocket-3.0rc2-1.rockspec diff --git a/rockspecs/luasocket-3.0rc2-1.rockspec b/rockspecs/luasocket-3.0rc2-1.rockspec deleted file mode 100644 index dfe5275..0000000 --- a/rockspecs/luasocket-3.0rc2-1.rockspec +++ /dev/null @@ -1,134 +0,0 @@ -package = "LuaSocket" -version = "3.0rc2-1" -source = { - url = "git://github.com/diegonehab/luasocket.git", - tag = "v3.0-rc2", -} -description = { - summary = "Network support for the Lua language", - detailed = [[ - LuaSocket is a Lua extension library that is composed by two parts: a C core - that provides support for the TCP and UDP transport layers, and a set of Lua - modules that add support for functionality commonly needed by applications - that deal with the Internet. - ]], - homepage = "http://luaforge.net/projects/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" } - 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 = { - "doc" - , "samples" - , "etc" - , "test" } -}