mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 12:08:21 +01:00
rockspecs: remove visibility and dllexport defines in favor of in-source labeling
This commit is contained in:
parent
2d8f0d9901
commit
e2e43d62fa
@ -1,8 +1,8 @@
|
||||
package = "LuaSocket"
|
||||
version = "scm-0"
|
||||
source = {
|
||||
url = "https://github.com/diegonehab/luasocket/archive/master.zip",
|
||||
dir = "luasocket-master",
|
||||
url = "git://github.com/diegonehab/luasocket.git"
|
||||
, branch="master"
|
||||
}
|
||||
description = {
|
||||
summary = "Network support for the Lua language",
|
||||
@ -22,35 +22,37 @@ dependencies = {
|
||||
local function make_plat(plat)
|
||||
local defines = {
|
||||
unix = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"LUASOCKET_API=__attribute__((visibility(\"default\")))",
|
||||
"UNIX_API=__attribute__((visibility(\"default\")))",
|
||||
"MIME_API=__attribute__((visibility(\"default\")))"
|
||||
"LUASOCKET_DEBUG"
|
||||
},
|
||||
macosx = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"UNIX_HAS_SUN_LEN",
|
||||
"LUASOCKET_API=__attribute__((visibility(\"default\")))",
|
||||
"UNIX_API=__attribute__((visibility(\"default\")))",
|
||||
"MIME_API=__attribute__((visibility(\"default\")))"
|
||||
"UNIX_HAS_SUN_LEN"
|
||||
},
|
||||
win32 = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"NDEBUG",
|
||||
"LUASOCKET_API=__declspec(dllexport)",
|
||||
"MIME_API=__declspec(dllexport)"
|
||||
"NDEBUG"
|
||||
},
|
||||
mingw32 = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"LUASOCKET_INET_PTON",
|
||||
"WINVER=0x0501",
|
||||
"LUASOCKET_API=__declspec(dllexport)",
|
||||
"MIME_API=__declspec(dllexport)"
|
||||
"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" },
|
||||
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"
|
||||
},
|
||||
@ -69,23 +71,44 @@ local function make_plat(plat)
|
||||
socket = "src/socket.lua",
|
||||
mime = "src/mime.lua"
|
||||
}
|
||||
if plat == "unix" or plat == "macosx" or plat == "haiku" then
|
||||
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/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c", "src/unixdgram.c", "src/unixstream.c" },
|
||||
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" },
|
||||
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" },
|
||||
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
|
||||
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
|
||||
@ -101,5 +124,9 @@ build = {
|
||||
win32 = make_plat("win32"),
|
||||
mingw32 = make_plat("mingw32")
|
||||
},
|
||||
copy_directories = { "doc", "samples", "etc", "test" }
|
||||
copy_directories = {
|
||||
"doc"
|
||||
, "samples"
|
||||
, "etc"
|
||||
, "test" }
|
||||
}
|
||||
|
@ -22,35 +22,37 @@ dependencies = {
|
||||
local function make_plat(plat)
|
||||
local defines = {
|
||||
unix = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"LUASOCKET_API=__attribute__((visibility(\"default\")))",
|
||||
"UNIX_API=__attribute__((visibility(\"default\")))",
|
||||
"MIME_API=__attribute__((visibility(\"default\")))"
|
||||
"LUASOCKET_DEBUG"
|
||||
},
|
||||
macosx = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"UNIX_HAS_SUN_LEN",
|
||||
"LUASOCKET_API=__attribute__((visibility(\"default\")))",
|
||||
"UNIX_API=__attribute__((visibility(\"default\")))",
|
||||
"MIME_API=__attribute__((visibility(\"default\")))"
|
||||
"UNIX_HAS_SUN_LEN"
|
||||
},
|
||||
win32 = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"NDEBUG",
|
||||
"LUASOCKET_API=__declspec(dllexport)",
|
||||
"MIME_API=__declspec(dllexport)"
|
||||
"NDEBUG"
|
||||
},
|
||||
mingw32 = {
|
||||
"LUASOCKET_DEBUG",
|
||||
"LUASOCKET_INET_PTON",
|
||||
"WINVER=0x0501",
|
||||
"LUASOCKET_API=__declspec(dllexport)",
|
||||
"MIME_API=__declspec(dllexport)"
|
||||
"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" },
|
||||
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"
|
||||
},
|
||||
@ -69,23 +71,44 @@ local function make_plat(plat)
|
||||
socket = "src/socket.lua",
|
||||
mime = "src/mime.lua"
|
||||
}
|
||||
if plat == "unix" or plat == "macosx" or plat == "haiku" then
|
||||
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/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c" },
|
||||
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" },
|
||||
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" },
|
||||
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
|
||||
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
|
||||
@ -101,5 +124,9 @@ build = {
|
||||
win32 = make_plat("win32"),
|
||||
mingw32 = make_plat("mingw32")
|
||||
},
|
||||
copy_directories = { "doc", "samples", "etc", "test" }
|
||||
copy_directories = {
|
||||
"doc"
|
||||
, "samples"
|
||||
, "etc"
|
||||
, "test" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user