Given LuaRocks support Haiku as a valid platform, link the network library

This commit is contained in:
Daniel Lemos 2016-03-11 16:03:22 -03:00
parent 23ce5aeaa2
commit 6fa6462636

View File

@ -69,8 +69,11 @@ local function make_plat(plat)
socket = "src/socket.lua", socket = "src/socket.lua",
mime = "src/mime.lua" mime = "src/mime.lua"
} }
if plat == "unix" or plat == "macosx" then if plat == "unix" or plat == "macosx" or plat == "haiku" then
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" 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"] = { 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" },
defines = defines[plat], defines = defines[plat],
@ -94,6 +97,7 @@ build = {
platforms = { platforms = {
unix = make_plat("unix"), unix = make_plat("unix"),
macosx = make_plat("macosx"), macosx = make_plat("macosx"),
haiku = make_plat("haiku"),
win32 = make_plat("win32"), win32 = make_plat("win32"),
mingw32 = make_plat("mingw32") mingw32 = make_plat("mingw32")
}, },