add numactl (#578)

* update eigen

* improve meson

* update libxml2

* improve glfw

* improve attr

* add numactl
pull/580/head
Hoildkv 3 years ago committed by GitHub
parent df6cad5cf5
commit 5ff67da583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/a/attr/xmake.lua
  2. 8
      packages/e/eigen/xmake.lua
  3. 10
      packages/g/glfw/xmake.lua
  4. 19
      packages/l/libxml2/xmake.lua
  5. 3
      packages/m/meson/xmake.lua
  6. 18
      packages/n/numactl/xmake.lua

@ -14,8 +14,7 @@ package("attr")
if package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package)
print(os.files(package:installdir("**")))
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)

@ -1,23 +1,23 @@
package("eigen")
set_kind("library", {headeronly = true})
set_homepage("https://eigen.tuxfamily.org/")
set_description("C++ template library for linear algebra")
set_license("MPL-2.0")
add_urls("https://gitlab.com/libeigen/eigen/-/archive/$(version)/eigen-$(version).tar.bz2",
"https://gitlab.com/libeigen/eigen")
add_versions("3.3.7", "685adf14bd8e9c015b78097c1dc22f2f01343756f196acdc76a678e1ae352e11")
add_versions("3.3.8", "0215c6593c4ee9f1f7f28238c4e8995584ebf3b556e9dbf933d84feb98d5b9ef")
add_versions("3.3.9", "0fa5cafe78f66d2b501b43016858070d52ba47bd9b1016b0165a7b8e04675677")
add_versions("3.4.0", "b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626")
add_deps("cmake")
add_includedirs("include")
add_includedirs("include/eigen3")
on_install("macosx", "linux", "windows", function (package)
local configs = {"-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
import("package.tools.cmake").install(package, {"-DBUILD_TESTING=OFF"})
end)
on_test(function (package)

@ -10,13 +10,9 @@ package("glfw")
add_configs("glfw_include", {description = "Choose submodules enabled in glfw", default = "none", type = "string", values = {"none", "vulkan", "glu", "glext", "es2", "es3"}})
on_fetch(function (package, opt)
if opt.system and package.find_package then
if package:is_plat("linux") then
return package:find_package("apt::libglfw3-dev", opt)
end
end
end)
if is_plat("linux") then
add_extsources("apt::libglfw3-dev")
end
add_deps("cmake")
add_deps("opengl", {optional = true})

@ -7,21 +7,27 @@ package("libxml2")
set_urls("http://xmlsoft.org/sources/libxml2-$(version).tar.gz",
"https://ftp.osuosl.org/pub/blfs/conglomeration/libxml2/libxml2-$(version).tar.gz")
add_urls("https://gitlab.gnome.org/GNOME/libxml2.git")
add_versions("2.9.9", "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871")
add_versions("2.9.10", "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f")
add_versions("2.9.12", "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92")
add_includedirs("include/libxml2")
if is_plat("windows") then
add_links("libxml2_a")
add_syslinks("wsock32", "ws2_32")
else
add_links("xml2")
end
if is_plat("linux") then
add_extsources("apt::libxml2-dev")
add_syslinks("m")
end
on_load("windows", function (package)
if not package:config("shared") then
package:add("defines", "LIBXML_STATIC")
end
end)
on_load("macosx", "linux", "iphoneos", "android", function (package)
if package:gitref() then
package:add("deps", "autoconf", "automake", "libtool", "pkg-config")
@ -30,8 +36,15 @@ package("libxml2")
on_install("windows", function (package)
os.cd("win32")
os.vrun("cscript configure.js iso8859x=yes iconv=no compiler=msvc cruntime=/MT debug=%s prefix=\"%s\"", package:debug() and "yes" or "no", package:installdir())
os.vrun("cscript configure.js iso8859x=yes iconv=no compiler=msvc cruntime=/%s debug=%s prefix=\"%s\"", package:config("vs_runtime"), package:debug() and "yes" or "no", package:installdir())
import("package.tools.nmake").install(package, {"/f", "Makefile.msvc"})
os.tryrm(path.join(package:installdir("lib"), "libxml2_a_dll.lib"))
if package:config("shared") then
os.tryrm(path.join(package:installdir("lib"), "libxml2_a.lib"))
else
os.tryrm(path.join(package:installdir("lib"), "libxml2.lib"))
os.tryrm(path.join(package:installdir("bin"), "libxml2.dll"))
end
end)
on_install("macosx", "linux", "iphoneos", "android", function (package)

@ -15,7 +15,8 @@ package("meson")
on_install("@macosx", "@linux", "@windows", function (package)
local envs = {PYTHONPATH = package:installdir()}
os.vrunv("python", {"-m", "pip", "install", "--target=" .. package:installdir(), "."}, {envs = envs})
local python = package:is_plat("windows") and "python" or "python3"
os.vrunv(python, {"-m", "pip", "install", "--target=" .. package:installdir(), "."}, {envs = envs})
package:addenv("PYTHONPATH", envs.PYTHONPATH)
end)

@ -0,0 +1,18 @@
package("numactl")
set_homepage("https://github.com/numactl/numactl")
set_description("NUMA support for Linux")
set_license("LGPL-2.1")
add_urls("https://github.com/numactl/numactl/releases/download/v$(version)/numactl-$(version).tar.gz")
add_versions("2.0.14", "826bd148c1b6231e1284e42a4db510207747484b112aee25ed6b1078756bcff6")
on_install("linux", function (package)
import("package.tools.autoconf").install(package)
package:addenv("PATH", "bin")
end)
on_test(function (package)
os.vrun("numactl -H")
assert(package:has_cfuncs("numa_available", {includes = "numa.h"}))
end)
Loading…
Cancel
Save