* update simdjson

* add scotch

* use set_symbols instead of explicit cflag

* improve scotch

* Update xmake.lua

Co-authored-by: ruki <waruqi@gmail.com>
pull/641/head
Hoildkv 3 years ago committed by GitHub
parent bcd693ba02
commit 7bc9647b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 48
      packages/s/scotch/xmake.lua
  2. 1
      packages/s/simdjson/xmake.lua
  3. 1
      packages/z/zlib/xmake.lua

@ -0,0 +1,48 @@
package("scotch")
set_homepage("https://www.labri.fr/perso/pelegrin/scotch/")
set_description("Scotch: a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering")
add_urls("https://gitlab.inria.fr/scotch/scotch/-/archive/$(version)/scotch-$(version).zip",
"https://gitlab.inria.fr/scotch/scotch.git")
add_versions("v6.1.1", "21d001c390ec63ac60f987b9921f33cc1967b41cf07567e22cbf3253cda8962a")
add_deps("zlib")
if is_plat("linux") then
add_syslinks("pthread")
end
on_install("macosx|x86_64", "linux", function (package)
os.cd("src")
if package:is_plat("macosx") then
os.cp("Make.inc/Makefile.inc.i686_mac_darwin10", "Makefile.inc")
elseif package:is_plat("linux") then
local basename
if package:is_arch("x86_64") then
basename = "Make.inc/Makefile.inc.x86-64_pc_linux2"
elseif package:is_arch("x86") then
basename = "Make.inc/Makefile.inc.i686_pc_linux2"
end
os.cp(basename .. (package:config("shared") and ".shlib" or ""), "Makefile.inc")
end
io.replace("Makefile.inc", "CFLAGS%s+=", "CFLAGS := $(CFLAGS)")
io.replace("Makefile.inc", "LDFLAGS%s+=", "LDFLAGS := $(LDFLAGS)")
local envs = import("package.tools.make").buildenvs(package)
local zlib = package:dep("zlib"):fetch()
if zlib then
local cflags, ldflags
for _, includedir in ipairs(zlib.sysincludedirs or zlib.includedirs) do
cflags = (cflags or "") .. " -I" .. includedir
end
for _, linkdir in ipairs(zlib.linkdirs) do
ldflags = (ldflags or "") .. " -L" .. linkdir
end
envs.CFLAGS = cflags
envs.LDFLAGS = ldflags
end
os.vrunv("make", {"scotch"}, {envs = envs})
os.vrunv("make", {"prefix=" .. package:installdir(), "install"}, {envs = envs})
end)
on_test(function (package)
assert(package:has_cfuncs("SCOTCH_graphInit", {includes = {"stdio.h", "stdlib.h", "scotch.h"}}))
end)

@ -8,6 +8,7 @@ package("simdjson")
"https://github.com/simdjson/simdjson.git")
add_versions("v0.9.5", "db69582fc5e4ece8c0a6a64894efeef475fe22fe466bd67195422de11b08b4d2")
add_versions("v0.9.7", "a21279ae4cf0049234a822c5c3550f99ec1707d3cda12156d331dcc8cd411ba0")
add_versions("v1.0.0", "fe54be1459b37e88abd438b01968144ed4774699d1272dd47a790b9362c5df42")
add_configs("threads", { description = "Enable threads.", default = true, type = "boolean"})
add_configs("noexceptions", { description = "Disable exceptions.", default = false, type = "boolean"})

@ -50,6 +50,7 @@ package("zlib")
add_defines("ZLIB_DLL")
end
else
add_defines("ZEXPORT=__attribute__((visibility(\"default\")))")
add_defines("_LARGEFILE64_SOURCE=1")
end
]])

Loading…
Cancel
Save