add cppzmq, libmd, libbsd (#1063)
* add cppzmq * add libmd and libbsd * improve imgui * update tbb * update openblas * try fix openmp * update expat * improve tinygltf and tinyobjloader * switch tbb to build from sourcepull/1064/head
parent
8919ee04ea
commit
acc4aedb80
12 changed files with 152 additions and 35 deletions
@ -0,0 +1,26 @@ |
||||
package("cppzmq") |
||||
|
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("http://www.zeromq.org/") |
||||
set_description("Header-only C++ binding for libzmq") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/zeromq/cppzmq/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/zeromq/cppzmq.git") |
||||
add_versions("v4.8.1", "7a23639a45f3a0049e11a188e29aaedd10b2f4845f0000cf3e22d6774ebde0af") |
||||
|
||||
add_deps("cmake", "zeromq") |
||||
on_install("windows", "macosx", "linux", function (package) |
||||
import("package.tools.cmake").install(package, {"-DCPPZMQ_BUILD_TESTS=OFF"}) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets([[ |
||||
void test() { |
||||
zmq::context_t ctx; |
||||
zmq::socket_t sock(ctx, zmq::socket_type::push); |
||||
sock.bind("inproc://test"); |
||||
sock.send(zmq::str_buffer("Hello, world"), zmq::send_flags::dontwait); |
||||
} |
||||
]], {configs = {languages = "c++14"}, includes = "zmq.hpp"})) |
||||
end) |
@ -0,0 +1,27 @@ |
||||
package("libbsd") |
||||
|
||||
set_homepage("https://libbsd.freedesktop.org/wiki/") |
||||
set_description("This library provides useful functions commonly found on BSD systems") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://libbsd.freedesktop.org/releases/libbsd-$(version).tar.xz") |
||||
add_versions("0.11.5", "1a9c952525635c1bb6770cb22e969b938d8e6a9d7912362b98ee8370599b0efd") |
||||
|
||||
add_deps("libmd") |
||||
add_links("bsd") |
||||
on_install("linux", function (package) |
||||
local configs = {"--disable-dependency-tracking"} |
||||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||
if package:config("pic") then |
||||
table.insert(configs, "--with-pic") |
||||
end |
||||
import("package.tools.autoconf").install(package, configs, {packagedeps = {"libmd"}}) |
||||
if not package:config("shared") then |
||||
os.rm(path.join(package:installdir("lib"), "libbsd.so")) |
||||
end |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("bsd_getopt", {includes = "bsd/unistd.h"})) |
||||
end) |
@ -0,0 +1,23 @@ |
||||
package("libmd") |
||||
|
||||
set_homepage("https://www.hadrons.org/software/libmd/") |
||||
set_description("Message Digest functions from BSD systems") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://archive.hadrons.org/software/libmd/libmd-$(version).tar.xz") |
||||
add_urls("https://libbsd.freedesktop.org/releases/libmd-$(version).tar.xz") |
||||
add_versions("1.0.4", "f51c921042e34beddeded4b75557656559cf5b1f2448033b4c1eec11c07e530f") |
||||
|
||||
on_install("linux", function (package) |
||||
local configs = {"--disable-dependency-tracking"} |
||||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||
if package:config("pic") then |
||||
table.insert(configs, "--with-pic") |
||||
end |
||||
import("package.tools.autoconf").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("MD5Init", {includes = "md5.h"})) |
||||
end) |
Loading…
Reference in new issue