|
@@ -1,6 +1,7 @@
|
|
|
package("nanomsg")
|
|
|
set_homepage("https://nanomsg.org")
|
|
|
set_description([[A simple high-performance implementation of several "scalability protocols".]])
|
|
|
+ set_license("MIT")
|
|
|
|
|
|
add_urls("https://github.com/nanomsg/nanomsg/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/nanomsg/nanomsg.git")
|
|
@@ -22,15 +23,6 @@ package("nanomsg")
|
|
|
package:add("defines", "NN_STATIC_LIB")
|
|
|
end
|
|
|
|
|
|
- if package:has_tool("cc", "gcc") then
|
|
|
- -- TODO: improve this patch
|
|
|
- -- gcc14: https://gcc.gnu.org/pipermail/gcc-cvs/2023-December/394351.html
|
|
|
- -- https://github.com/llvm/llvm-project/issues/74605
|
|
|
- io.replace("src/aio/usock_win.inc", "self->in.start = nn_usock_recv_start_pipe;", "nn_usock_recv_start_pipe(self->in.arg);", {plain = true})
|
|
|
- io.replace("src/aio/usock_win.inc", "self->in.start = nn_usock_recv_start_wsock;", "nn_usock_recv_start_wsock(self->in.arg);", {plain = true})
|
|
|
- io.replace("src/aio/usock_win.inc", "self->in.start (self->in.arg);", "", {plain = true})
|
|
|
- end
|
|
|
-
|
|
|
local configs = {"-DNN_ENABLE_DOC=OFF", "-DNN_TESTS=OFF", "-DCMAKE_POLICY_DEFAULT_CMP0057=NEW"}
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
|
|
|
table.insert(configs, "-DNN_STATIC_LIB=" .. (package:config("shared") and "OFF" or "ON"))
|
|
@@ -38,7 +30,14 @@ package("nanomsg")
|
|
|
if package:config("asan") then
|
|
|
table.insert(configs, "-DNNG_SANITIZER=address")
|
|
|
end
|
|
|
- import("package.tools.cmake").install(package, configs)
|
|
|
+
|
|
|
+ local opt = {}
|
|
|
+ if package:has_tool("cc", "gcc") then
|
|
|
+ opt.cxflags = "-Wno-error=incompatible-pointer-types"
|
|
|
+ end
|
|
|
+ import("package.tools.cmake").install(package, configs, opt)
|
|
|
+ -- Missing `NN_STATIC_LIB`
|
|
|
+ os.rm(path.join(package:installdir("lib/pkgconfig"), "nanomsg.pc"))
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|