diff options
| author | E. Westbrook <github@westbrook.io> | 2019-02-25 16:06:30 -0700 |
|---|---|---|
| committer | E. Westbrook <github@westbrook.io> | 2019-02-25 16:07:36 -0700 |
| commit | e2e43d62fa925e7e22385505ed0c635255c77c0a (patch) | |
| tree | 7a5f40572dd9ad9a6b56749cc256f7b658946873 | |
| parent | 2d8f0d99011b267ed354ab6e8317d93b9627eed4 (diff) | |
| download | luasocket-e2e43d62fa925e7e22385505ed0c635255c77c0a.tar.gz luasocket-e2e43d62fa925e7e22385505ed0c635255c77c0a.tar.bz2 luasocket-e2e43d62fa925e7e22385505ed0c635255c77c0a.zip | |
rockspecs: remove visibility and dllexport defines in favor of in-source labeling
| -rw-r--r-- | luasocket-scm-0.rockspec | 199 | ||||
| -rw-r--r-- | rockspec/luasocket-3.0rc2-1.rockspec | 209 |
2 files changed, 231 insertions, 177 deletions
diff --git a/luasocket-scm-0.rockspec b/luasocket-scm-0.rockspec index c827e46..6cdb0ce 100644 --- a/luasocket-scm-0.rockspec +++ b/luasocket-scm-0.rockspec | |||
| @@ -1,105 +1,132 @@ | |||
| 1 | package = "LuaSocket" | 1 | package = "LuaSocket" |
| 2 | version = "scm-0" | 2 | version = "scm-0" |
| 3 | source = { | 3 | source = { |
| 4 | url = "https://github.com/diegonehab/luasocket/archive/master.zip", | 4 | url = "git://github.com/diegonehab/luasocket.git" |
| 5 | dir = "luasocket-master", | 5 | , branch="master" |
| 6 | } | 6 | } |
| 7 | description = { | 7 | description = { |
| 8 | summary = "Network support for the Lua language", | 8 | summary = "Network support for the Lua language", |
| 9 | detailed = [[ | 9 | detailed = [[ |
| 10 | LuaSocket is a Lua extension library that is composed by two parts: a C core | 10 | LuaSocket is a Lua extension library that is composed by two parts: a C core |
| 11 | that provides support for the TCP and UDP transport layers, and a set of Lua | 11 | that provides support for the TCP and UDP transport layers, and a set of Lua |
| 12 | modules that add support for functionality commonly needed by applications | 12 | modules that add support for functionality commonly needed by applications |
| 13 | that deal with the Internet. | 13 | that deal with the Internet. |
| 14 | ]], | 14 | ]], |
| 15 | homepage = "http://luaforge.net/projects/luasocket/", | 15 | homepage = "http://luaforge.net/projects/luasocket/", |
| 16 | license = "MIT" | 16 | license = "MIT" |
| 17 | } | 17 | } |
| 18 | dependencies = { | 18 | dependencies = { |
| 19 | "lua >= 5.1" | 19 | "lua >= 5.1" |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | local function make_plat(plat) | 22 | local function make_plat(plat) |
| 23 | local defines = { | 23 | local defines = { |
| 24 | unix = { | 24 | unix = { |
| 25 | "LUASOCKET_DEBUG", | 25 | "LUASOCKET_DEBUG" |
| 26 | "LUASOCKET_API=__attribute__((visibility(\"default\")))", | 26 | }, |
| 27 | "UNIX_API=__attribute__((visibility(\"default\")))", | 27 | macosx = { |
| 28 | "MIME_API=__attribute__((visibility(\"default\")))" | 28 | "LUASOCKET_DEBUG", |
| 29 | }, | 29 | "UNIX_HAS_SUN_LEN" |
| 30 | macosx = { | 30 | }, |
| 31 | "LUASOCKET_DEBUG", | 31 | win32 = { |
| 32 | "UNIX_HAS_SUN_LEN", | 32 | "LUASOCKET_DEBUG", |
| 33 | "LUASOCKET_API=__attribute__((visibility(\"default\")))", | 33 | "NDEBUG" |
| 34 | "UNIX_API=__attribute__((visibility(\"default\")))", | 34 | }, |
| 35 | "MIME_API=__attribute__((visibility(\"default\")))" | 35 | mingw32 = { |
| 36 | }, | 36 | "LUASOCKET_DEBUG", |
| 37 | win32 = { | 37 | "LUASOCKET_INET_PTON", |
| 38 | "LUASOCKET_DEBUG", | 38 | "WINVER=0x0501" |
| 39 | "NDEBUG", | 39 | } |
| 40 | "LUASOCKET_API=__declspec(dllexport)", | 40 | } |
| 41 | "MIME_API=__declspec(dllexport)" | 41 | local modules = { |
| 42 | }, | 42 | ["socket.core"] = { |
| 43 | mingw32 = { | 43 | sources = { |
| 44 | "LUASOCKET_DEBUG", | 44 | "src/luasocket.c" |
| 45 | "LUASOCKET_INET_PTON", | 45 | , "src/timeout.c" |
| 46 | "WINVER=0x0501", | 46 | , "src/buffer.c" |
| 47 | "LUASOCKET_API=__declspec(dllexport)", | 47 | , "src/io.c" |
| 48 | "MIME_API=__declspec(dllexport)" | 48 | , "src/auxiliar.c" |
| 49 | } | 49 | , "src/options.c" |
| 50 | } | 50 | , "src/inet.c" |
| 51 | local modules = { | 51 | , "src/except.c" |
| 52 | ["socket.core"] = { | 52 | , "src/select.c" |
| 53 | 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" }, | 53 | , "src/tcp.c" |
| 54 | defines = defines[plat], | 54 | , "src/udp.c" |
| 55 | incdir = "/src" | 55 | , "src/compat.c" }, |
| 56 | }, | 56 | defines = defines[plat], |
| 57 | ["mime.core"] = { | 57 | incdir = "/src" |
| 58 | sources = { "src/mime.c", "src/compat.c" }, | 58 | }, |
| 59 | defines = defines[plat], | 59 | ["mime.core"] = { |
| 60 | incdir = "/src" | 60 | sources = { "src/mime.c", "src/compat.c" }, |
| 61 | }, | 61 | defines = defines[plat], |
| 62 | ["socket.http"] = "src/http.lua", | 62 | incdir = "/src" |
| 63 | ["socket.url"] = "src/url.lua", | 63 | }, |
| 64 | ["socket.tp"] = "src/tp.lua", | 64 | ["socket.http"] = "src/http.lua", |
| 65 | ["socket.ftp"] = "src/ftp.lua", | 65 | ["socket.url"] = "src/url.lua", |
| 66 | ["socket.headers"] = "src/headers.lua", | 66 | ["socket.tp"] = "src/tp.lua", |
| 67 | ["socket.smtp"] = "src/smtp.lua", | 67 | ["socket.ftp"] = "src/ftp.lua", |
| 68 | ltn12 = "src/ltn12.lua", | 68 | ["socket.headers"] = "src/headers.lua", |
| 69 | socket = "src/socket.lua", | 69 | ["socket.smtp"] = "src/smtp.lua", |
| 70 | mime = "src/mime.lua" | 70 | ltn12 = "src/ltn12.lua", |
| 71 | } | 71 | socket = "src/socket.lua", |
| 72 | if plat == "unix" or plat == "macosx" or plat == "haiku" then | 72 | mime = "src/mime.lua" |
| 73 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" | 73 | } |
| 74 | if plat == "haiku" then | 74 | if plat == "unix" |
| 75 | modules["socket.core"].libraries = {"network"} | 75 | or plat == "macosx" |
| 76 | end | 76 | or plat == "haiku" |
| 77 | modules["socket.unix"] = { | 77 | then |
| 78 | sources = { "src/buffer.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" }, | 78 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" |
| 79 | defines = defines[plat], | 79 | if plat == "haiku" then |
| 80 | incdir = "/src" | 80 | modules["socket.core"].libraries = {"network"} |
| 81 | } | 81 | end |
| 82 | modules["socket.serial"] = { | 82 | modules["socket.unix"] = { |
| 83 | sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/serial.c" }, | 83 | sources = { |
| 84 | defines = defines[plat], | 84 | "src/buffer.c" |
| 85 | incdir = "/src" | 85 | , "src/auxiliar.c" |
| 86 | } | 86 | , "src/options.c" |
| 87 | end | 87 | , "src/timeout.c" |
| 88 | if plat == "win32" or plat == "mingw32" then | 88 | , "src/io.c" |
| 89 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" | 89 | , "src/usocket.c" |
| 90 | modules["socket.core"].libraries = { "ws2_32" } | 90 | , "src/unix.c" |
| 91 | end | 91 | , "src/unixdgram.c" |
| 92 | return { modules = modules } | 92 | , "src/unixstream.c" }, |
| 93 | defines = defines[plat], | ||
| 94 | incdir = "/src" | ||
| 95 | } | ||
| 96 | modules["socket.serial"] = { | ||
| 97 | sources = { | ||
| 98 | "src/buffer.c" | ||
| 99 | , "src/auxiliar.c" | ||
| 100 | , "src/options.c" | ||
| 101 | , "src/timeout.c" | ||
| 102 | , "src/io.c" | ||
| 103 | , "src/usocket.c" | ||
| 104 | , "src/serial.c" }, | ||
| 105 | defines = defines[plat], | ||
| 106 | incdir = "/src" | ||
| 107 | } | ||
| 108 | end | ||
| 109 | if plat == "win32" | ||
| 110 | or plat == "mingw32" | ||
| 111 | then | ||
| 112 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" | ||
| 113 | modules["socket.core"].libraries = { "ws2_32" } | ||
| 114 | end | ||
| 115 | return { modules = modules } | ||
| 93 | end | 116 | end |
| 94 | 117 | ||
| 95 | build = { | 118 | build = { |
| 96 | type = "builtin", | 119 | type = "builtin", |
| 97 | platforms = { | 120 | platforms = { |
| 98 | unix = make_plat("unix"), | 121 | unix = make_plat("unix"), |
| 99 | macosx = make_plat("macosx"), | 122 | macosx = make_plat("macosx"), |
| 100 | haiku = make_plat("haiku"), | 123 | haiku = make_plat("haiku"), |
| 101 | win32 = make_plat("win32"), | 124 | win32 = make_plat("win32"), |
| 102 | mingw32 = make_plat("mingw32") | 125 | mingw32 = make_plat("mingw32") |
| 103 | }, | 126 | }, |
| 104 | copy_directories = { "doc", "samples", "etc", "test" } | 127 | copy_directories = { |
| 128 | "doc" | ||
| 129 | , "samples" | ||
| 130 | , "etc" | ||
| 131 | , "test" } | ||
| 105 | } | 132 | } |
diff --git a/rockspec/luasocket-3.0rc2-1.rockspec b/rockspec/luasocket-3.0rc2-1.rockspec index 8e37a4a..2b299f3 100644 --- a/rockspec/luasocket-3.0rc2-1.rockspec +++ b/rockspec/luasocket-3.0rc2-1.rockspec | |||
| @@ -1,105 +1,132 @@ | |||
| 1 | package = "LuaSocket" | 1 | package = "LuaSocket" |
| 2 | version = "3.0rc2-1" | 2 | version = "3.0rc2-1" |
| 3 | source = { | 3 | source = { |
| 4 | url = "git://github.com/diegonehab/luasocket.git", | 4 | url = "git://github.com/diegonehab/luasocket.git", |
| 5 | tag = "v3.0-rc2", | 5 | tag = "v3.0-rc2", |
| 6 | } | 6 | } |
| 7 | description = { | 7 | description = { |
| 8 | summary = "Network support for the Lua language", | 8 | summary = "Network support for the Lua language", |
| 9 | detailed = [[ | 9 | detailed = [[ |
| 10 | LuaSocket is a Lua extension library that is composed by two parts: a C core | 10 | LuaSocket is a Lua extension library that is composed by two parts: a C core |
| 11 | that provides support for the TCP and UDP transport layers, and a set of Lua | 11 | that provides support for the TCP and UDP transport layers, and a set of Lua |
| 12 | modules that add support for functionality commonly needed by applications | 12 | modules that add support for functionality commonly needed by applications |
| 13 | that deal with the Internet. | 13 | that deal with the Internet. |
| 14 | ]], | 14 | ]], |
| 15 | homepage = "http://luaforge.net/projects/luasocket/", | 15 | homepage = "http://luaforge.net/projects/luasocket/", |
| 16 | license = "MIT" | 16 | license = "MIT" |
| 17 | } | 17 | } |
| 18 | dependencies = { | 18 | dependencies = { |
| 19 | "lua >= 5.1" | 19 | "lua >= 5.1" |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | local function make_plat(plat) | 22 | local function make_plat(plat) |
| 23 | local defines = { | 23 | local defines = { |
| 24 | unix = { | 24 | unix = { |
| 25 | "LUASOCKET_DEBUG", | 25 | "LUASOCKET_DEBUG" |
| 26 | "LUASOCKET_API=__attribute__((visibility(\"default\")))", | 26 | }, |
| 27 | "UNIX_API=__attribute__((visibility(\"default\")))", | 27 | macosx = { |
| 28 | "MIME_API=__attribute__((visibility(\"default\")))" | 28 | "LUASOCKET_DEBUG", |
| 29 | }, | 29 | "UNIX_HAS_SUN_LEN" |
| 30 | macosx = { | 30 | }, |
| 31 | "LUASOCKET_DEBUG", | 31 | win32 = { |
| 32 | "UNIX_HAS_SUN_LEN", | 32 | "LUASOCKET_DEBUG", |
| 33 | "LUASOCKET_API=__attribute__((visibility(\"default\")))", | 33 | "NDEBUG" |
| 34 | "UNIX_API=__attribute__((visibility(\"default\")))", | 34 | }, |
| 35 | "MIME_API=__attribute__((visibility(\"default\")))" | 35 | mingw32 = { |
| 36 | }, | 36 | "LUASOCKET_DEBUG", |
| 37 | win32 = { | 37 | "LUASOCKET_INET_PTON", |
| 38 | "LUASOCKET_DEBUG", | 38 | "WINVER=0x0501" |
| 39 | "NDEBUG", | 39 | } |
| 40 | "LUASOCKET_API=__declspec(dllexport)", | 40 | } |
| 41 | "MIME_API=__declspec(dllexport)" | 41 | local modules = { |
| 42 | }, | 42 | ["socket.core"] = { |
| 43 | mingw32 = { | 43 | sources = { |
| 44 | "LUASOCKET_DEBUG", | 44 | "src/luasocket.c" |
| 45 | "LUASOCKET_INET_PTON", | 45 | , "src/timeout.c" |
| 46 | "WINVER=0x0501", | 46 | , "src/buffer.c" |
| 47 | "LUASOCKET_API=__declspec(dllexport)", | 47 | , "src/io.c" |
| 48 | "MIME_API=__declspec(dllexport)" | 48 | , "src/auxiliar.c" |
| 49 | } | 49 | , "src/options.c" |
| 50 | } | 50 | , "src/inet.c" |
| 51 | local modules = { | 51 | , "src/except.c" |
| 52 | ["socket.core"] = { | 52 | , "src/select.c" |
| 53 | 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" }, | 53 | , "src/tcp.c" |
| 54 | defines = defines[plat], | 54 | , "src/udp.c" |
| 55 | incdir = "/src" | 55 | , "src/compat.c" }, |
| 56 | }, | 56 | defines = defines[plat], |
| 57 | ["mime.core"] = { | 57 | incdir = "/src" |
| 58 | sources = { "src/mime.c", "src/compat.c" }, | 58 | }, |
| 59 | defines = defines[plat], | 59 | ["mime.core"] = { |
| 60 | incdir = "/src" | 60 | sources = { "src/mime.c", "src/compat.c" }, |
| 61 | }, | 61 | defines = defines[plat], |
| 62 | ["socket.http"] = "src/http.lua", | 62 | incdir = "/src" |
| 63 | ["socket.url"] = "src/url.lua", | 63 | }, |
| 64 | ["socket.tp"] = "src/tp.lua", | 64 | ["socket.http"] = "src/http.lua", |
| 65 | ["socket.ftp"] = "src/ftp.lua", | 65 | ["socket.url"] = "src/url.lua", |
| 66 | ["socket.headers"] = "src/headers.lua", | 66 | ["socket.tp"] = "src/tp.lua", |
| 67 | ["socket.smtp"] = "src/smtp.lua", | 67 | ["socket.ftp"] = "src/ftp.lua", |
| 68 | ltn12 = "src/ltn12.lua", | 68 | ["socket.headers"] = "src/headers.lua", |
| 69 | socket = "src/socket.lua", | 69 | ["socket.smtp"] = "src/smtp.lua", |
| 70 | mime = "src/mime.lua" | 70 | ltn12 = "src/ltn12.lua", |
| 71 | } | 71 | socket = "src/socket.lua", |
| 72 | if plat == "unix" or plat == "macosx" or plat == "haiku" then | 72 | mime = "src/mime.lua" |
| 73 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" | 73 | } |
| 74 | if plat == "haiku" then | 74 | if plat == "unix" |
| 75 | modules["socket.core"].libraries = {"network"} | 75 | or plat == "macosx" |
| 76 | end | 76 | or plat == "haiku" |
| 77 | modules["socket.unix"] = { | 77 | then |
| 78 | sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c" }, | 78 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" |
| 79 | defines = defines[plat], | 79 | if plat == "haiku" then |
| 80 | incdir = "/src" | 80 | modules["socket.core"].libraries = {"network"} |
| 81 | } | 81 | end |
| 82 | modules["socket.serial"] = { | 82 | modules["socket.unix"] = { |
| 83 | sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/serial.c" }, | 83 | sources = { |
| 84 | defines = defines[plat], | 84 | "src/buffer.c" |
| 85 | incdir = "/src" | 85 | , "src/auxiliar.c" |
| 86 | } | 86 | , "src/options.c" |
| 87 | end | 87 | , "src/timeout.c" |
| 88 | if plat == "win32" or plat == "mingw32" then | 88 | , "src/io.c" |
| 89 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" | 89 | , "src/usocket.c" |
| 90 | modules["socket.core"].libraries = { "ws2_32" } | 90 | , "src/unix.c" |
| 91 | end | 91 | , "src/unixdgram.c" |
| 92 | return { modules = modules } | 92 | , "src/unixstream.c" }, |
| 93 | defines = defines[plat], | ||
| 94 | incdir = "/src" | ||
| 95 | } | ||
| 96 | modules["socket.serial"] = { | ||
| 97 | sources = { | ||
| 98 | "src/buffer.c" | ||
| 99 | , "src/auxiliar.c" | ||
| 100 | , "src/options.c" | ||
| 101 | , "src/timeout.c" | ||
| 102 | , "src/io.c" | ||
| 103 | , "src/usocket.c" | ||
| 104 | , "src/serial.c" }, | ||
| 105 | defines = defines[plat], | ||
| 106 | incdir = "/src" | ||
| 107 | } | ||
| 108 | end | ||
| 109 | if plat == "win32" | ||
| 110 | or plat == "mingw32" | ||
| 111 | then | ||
| 112 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" | ||
| 113 | modules["socket.core"].libraries = { "ws2_32" } | ||
| 114 | end | ||
| 115 | return { modules = modules } | ||
| 93 | end | 116 | end |
| 94 | 117 | ||
| 95 | build = { | 118 | build = { |
| 96 | type = "builtin", | 119 | type = "builtin", |
| 97 | platforms = { | 120 | platforms = { |
| 98 | unix = make_plat("unix"), | 121 | unix = make_plat("unix"), |
| 99 | macosx = make_plat("macosx"), | 122 | macosx = make_plat("macosx"), |
| 100 | haiku = make_plat("haiku"), | 123 | haiku = make_plat("haiku"), |
| 101 | win32 = make_plat("win32"), | 124 | win32 = make_plat("win32"), |
| 102 | mingw32 = make_plat("mingw32") | 125 | mingw32 = make_plat("mingw32") |
| 103 | }, | 126 | }, |
| 104 | copy_directories = { "doc", "samples", "etc", "test" } | 127 | copy_directories = { |
| 128 | "doc" | ||
| 129 | , "samples" | ||
| 130 | , "etc" | ||
| 131 | , "test" } | ||
| 105 | } | 132 | } |
