add xtensor-blas and a set of X libs (#538)

* add xtensor-blas

* add libice

* add libsm

* add libxt

* update gettext

* add libxpm

* add libxmu

* add libxaw
pull/539/head
Hoildkv 3 years ago committed by GitHub
parent 03ea2ff8ec
commit 24ad4a0d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/g/gettext/xmake.lua
  2. 17
      packages/l/libice/xmake.lua
  3. 17
      packages/l/libsm/xmake.lua
  4. 23
      packages/l/libxaw/xmake.lua
  5. 17
      packages/l/libxmu/xmake.lua
  6. 17
      packages/l/libxpm/xmake.lua
  7. 17
      packages/l/libxt/xmake.lua
  8. 34
      packages/x/xtensor-blas/xmake.lua

@ -7,6 +7,7 @@ package("gettext")
"https://ftpmirror.gnu.org/gettext/gettext-$(version).tar.xz",
{version = function (version) return version:gsub('%-', '.') end})
add_versions("0.19.8-1", "105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4")
add_versions("0.21", "d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192")
if is_plat("macosx") then
add_syslinks("iconv")
@ -40,7 +41,7 @@ package("gettext")
if package:is_plat("macosx") then
table.insert(configs, "--with-included-gettext")
end
if package:is_plat("android") then
if package:is_plat("android") and package:version():le("0.20") then
io.replace("./gettext-tools/configure", "#define gid_t int", "")
io.replace("./gettext-tools/configure", "#define uid_t int", "")
io.replace("./gettext-runtime/configure", "#define gid_t int", "")
@ -86,6 +87,7 @@ package("gettext")
end
end
import("package.tools.autoconf").install(package, configs, {cflags = cflags, ldflags = ldflags})
package:addenv("PATH", "bin")
end)
on_test(function (package)

@ -0,0 +1,17 @@
package("libice")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libice")
set_description("X.Org: Inter-Client Exchange Library")
add_urls("https://www.x.org/archive/individual/lib/libICE-$(version).tar.gz")
add_versions("1.0.10", "1116bc64c772fd127a0d0c0ffa2833479905e3d3d8197740b3abd5f292f22d2d")
add_deps("xtrans")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("IceOpenConnection", {includes = "X11/ICE/ICElib.h"}))
end)

@ -0,0 +1,17 @@
package("libsm")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libsm")
set_description("X.Org: X Session Management Library")
add_urls("https://www.x.org/archive/individual/lib/libSM-$(version).tar.gz")
add_versions("1.2.3", "1e92408417cb6c6c477a8a6104291001a40b3bb56a4a60608fdd9cd2c5a0f320")
add_deps("libice")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("SmcOpenConnection", {includes = "X11/SM/SMlib.h"}))
end)

@ -0,0 +1,23 @@
package("libxaw")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libxaw")
set_description("X.Org: X Athena Widget Set")
set_urls("https://www.x.org/archive/individual/lib/libXaw-$(version).tar.bz2")
add_versions("1.0.14", "76aef98ea3df92615faec28004b5ce4e5c6855e716fa16de40c32030722a6f8e")
if is_plat("macosx", "linux") then
add_deps("libxmu", "libxpm")
end
if is_plat("linux") then
add_extsources("apt::libxaw7-dev")
end
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("XawInitializeWidgetSet", {includes = "X11/Xaw/XawInit.h"}))
end)

@ -0,0 +1,17 @@
package("libxmu")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libxmu")
set_description("X.Org: X miscellaneous utility routines library")
add_urls("https://www.x.org/archive/individual/lib/libXmu-$(version).tar.gz")
add_versions("1.1.3", "5bd9d4ed1ceaac9ea023d86bf1c1632cd3b172dce4a193a72a94e1d9df87a62e")
add_deps("libxt", "libxext")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("XmuNewArea", {includes = "X11/Xmu/Xmu.h"}))
end)

@ -0,0 +1,17 @@
package("libxpm")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libxpm")
set_description("X.Org: X Pixmap (XPM) image file format library")
add_urls("https://www.x.org/archive/individual/lib/libXpm-$(version).tar.gz")
add_versions("3.5.13", "e3dfb0fb8c1f127432f2a498c7856b37ce78a61e8da73f1aab165a73dd97ad00")
add_deps("libx11", "xorgproto", "gettext")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("XpmCreatePixmapFromData", {includes = "X11/xpm.h"}))
end)

@ -0,0 +1,17 @@
package("libxt")
set_homepage("https://gitlab.freedesktop.org/xorg/lib/libxt")
set_description("X.Org: X Toolkit Intrinsics library")
add_urls("https://www.x.org/archive/individual/lib/libXt-$(version).tar.gz")
add_versions("1.2.1", "6da1bfa9dd0ed87430a5ce95b129485086394df308998ebe34d98e378e3dfb33")
add_deps("libx11", "libsm")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("XtConvertAndStore", {includes = "X11/Intrinsic.h"}))
end)

@ -0,0 +1,34 @@
package("xtensor-blas")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/xtensor-stack/xtensor-blas/")
set_description("BLAS extension to xtensor")
set_license("BSD-3-Clause")
add_urls("https://github.com/xtensor-stack/xtensor-blas/archive/refs/tags/$(version).tar.gz")
add_versions("0.19.1", "c77cc4e2297ebd22d0d1c6e8d0a6cf0975176afa8cb99dbfd5fb2be625a0248f")
add_configs("vendor", {description = "Set BLAS vendor.", default = "openblas", type = "string", values = {"mkl", "openblas"}})
add_deps("cmake")
add_deps("xtensor")
on_load("windows", "linux", function (package)
package:add("deps", package:config("vendor"))
end)
on_install("windows", "linux", function (package)
import("package.tools.cmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <xtensor/xarray.hpp>
#include <xtensor-blas/xlinalg.hpp>
void test() {
xt::xarray<double> t1arg_0 = {{0, 1, 2},
{3, 4, 5},
{6, 7, 8}};
auto t1res = xt::linalg::matrix_power(t1arg_0, 2);
}
]]}, {configs = {languages = "c++14"}}))
end)
Loading…
Cancel
Save