Compare commits

...

22 Commits

Author SHA1 Message Date
ruki 30b4ce1c4c
Add PortableBuildTools (#5819) 18 hours ago
star9029 3486564e4d
microsoft-apsi: add package (#5804) 20 hours ago
star9029 01f5ddee30 antlr4: improve copy file 21 hours ago
ruki 12d0c21d50
Auto-update openh264 to v2.5.0 (#5785) 22 hours ago
ruki f9fe39c0ca
Auto-update actor-framework to 1.0.2 (#5811) 1 day ago
Inari0 3bdee46dea
add dartpy support (#5712) 1 day ago
star9029 2a24b22dcf
arkari: add package (#5818) 1 day ago
qudix 593814514a
glaze: update to `v4.0.1` (#5758) 2 days ago
ruki 3f46507d43
fix boost fetch (#5816) 2 days ago
star9029 ff961fffbc
alembic: support more platform (#5813) 2 days ago
star9029 5ef78d33d7
openexr: support more platform (#5814) 2 days ago
star9029 0ac9acd09e libdeflate: fix pdb 2 days ago
ruki f4442f7364
Update arduinojson to v7.2.1 (#5812) 2 days ago
star9029 32b4e3ac1d
imath: support more platform (#5807) 2 days ago
ruki ac1b35f0bc
Update ngtcp2 to 1.9.0 (#5809) 2 days ago
ruki 55d7d577c3
Update simsimd to v6.1.1 (#5810) 2 days ago
c8ef bab551e93f
update liburing to 2.8 (#5806) 3 days ago
Linpeng Zhang 3f0127bf98
fix clang-cl ldflag (#5805) 3 days ago
ruki 34a98b7225
Update efsw to 1.4.1 (#5778) 3 days ago
ruki 264c489a85
Auto-update aws-c-io to v0.15.3 (#5793) 3 days ago
ruki 2d84247187
Update openexr to v3.3.2 (#5800) 3 days ago
ruki 8636af22c5
Update re-flex to v5.0.1 (#5802) 3 days ago
  1. 6
      packages/a/actor-framework/xmake.lua
  2. 64
      packages/a/alembic/xmake.lua
  3. 5
      packages/a/antlr4/xmake.lua
  4. 1
      packages/a/arduinojson/xmake.lua
  5. 25
      packages/a/arkari/xmake.lua
  6. 1
      packages/a/aws-c-common/xmake.lua
  7. 1
      packages/a/aws-c-io/xmake.lua
  8. 32
      packages/b/boost/fetch.lua
  9. 4
      packages/c/catch2/xmake.lua
  10. 68
      packages/d/dartsim/patches/6.14.5/dartpy.patch
  11. 80
      packages/d/dartsim/xmake.lua
  12. 1
      packages/e/efsw/xmake.lua
  13. 5
      packages/f/flatbuffers/xmake.lua
  14. 8
      packages/f/freeglut/xmake.lua
  15. 9
      packages/g/glaze/xmake.lua
  16. 11
      packages/g/glut/xmake.lua
  17. 23
      packages/i/imath/xmake.lua
  18. 5
      packages/l/libdeflate/xmake.lua
  19. 1
      packages/l/liburing/xmake.lua
  20. 9
      packages/l/log4cplus/xmake.lua
  21. 69
      packages/m/microsoft-apsi/xmake.lua
  22. 5
      packages/m/microsoft-seal/xmake.lua
  23. 1
      packages/n/ngtcp2/xmake.lua
  24. 58
      packages/o/openexr/xmake.lua
  25. 3
      packages/o/openh264/xmake.lua
  26. 2
      packages/o/openscenegraph/xmake.lua
  27. 17
      packages/p/portablebuildtools/xmake.lua
  28. 10
      packages/p/pybind11/xmake.lua
  29. 1
      packages/r/re-flex/xmake.lua
  30. 1
      packages/s/simsimd/xmake.lua
  31. 2
      packages/u/urdfdom/xmake.lua
  32. 4
      scripts/new.lua

@ -6,6 +6,7 @@ package("actor-framework")
add_urls("https://github.com/actor-framework/actor-framework/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/actor-framework/actor-framework/archive/refs/tags/$(version).tar.gz",
"https://github.com/actor-framework/actor-framework.git") "https://github.com/actor-framework/actor-framework.git")
add_versions("1.0.2", "ef4dd00ca7c59cd61dc336b6a8efbd6150ca85c404d213ecb61f6bcee4094ffc")
add_versions("1.0.1", "635bdd6e3b70886f1d9aa75c48e5bdb4084afae1f159bbfe5ea91f99b0460f6b") add_versions("1.0.1", "635bdd6e3b70886f1d9aa75c48e5bdb4084afae1f159bbfe5ea91f99b0460f6b")
add_versions("1.0.0", "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b") add_versions("1.0.0", "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b")
add_versions("0.19.6", "48dc4c4abf5ab5a7c6f84b9259cc8be1b02c601d31893647ab44e143cdc4b6d5") add_versions("0.19.6", "48dc4c4abf5ab5a7c6f84b9259cc8be1b02c601d31893647ab44e143cdc4b6d5")
@ -13,7 +14,7 @@ package("actor-framework")
add_configs("profiler", {description = "Enable experimental profiler API", default = false, type = "boolean"}) add_configs("profiler", {description = "Enable experimental profiler API", default = false, type = "boolean"})
add_configs("runtime_checks", {description = "Build CAF with extra runtime assertions", default = false, type = "boolean"}) add_configs("runtime_checks", {description = "Build CAF with extra runtime assertions", default = false, type = "boolean"})
add_configs("exceptions", {description = "Build CAF with support for exceptions", default = false, type = "boolean"}) add_configs("exceptions", {description = "Build CAF with support for exceptions", default = true, type = "boolean"})
add_configs("io", {description = "Build legacy networking I/O module", default = false, type = "boolean"}) add_configs("io", {description = "Build legacy networking I/O module", default = false, type = "boolean"})
add_configs("net", {description = "Build networking I/O module", default = false, type = "boolean"}) add_configs("net", {description = "Build networking I/O module", default = false, type = "boolean"})
add_configs("openssl", {description = "Build OpenSSL module", default = false, type = "boolean"}) add_configs("openssl", {description = "Build OpenSSL module", default = false, type = "boolean"})
@ -35,6 +36,9 @@ package("actor-framework")
end) end)
on_install("windows", "linux", "macosx", "bsd", function (package) on_install("windows", "linux", "macosx", "bsd", function (package)
io.replace("CMakeLists.txt", "add_library(libcaf_test)", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory(libcaf_test)", "", {plain = true})
local configs = local configs =
{ {
"-DCAF_ENABLE_EXAMPLES=OFF", "-DCAF_ENABLE_EXAMPLES=OFF",

@ -1,30 +1,76 @@
package("alembic") package("alembic")
set_homepage("https://alembic.io/") set_homepage("https://alembic.io/")
set_description("Open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.") set_description("Open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.")
set_license("BSD-3-Clause") set_license("BSD-3-Clause")
add_urls("https://github.com/alembic/alembic/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/alembic/alembic/archive/refs/tags/$(version).tar.gz",
"https://github.com/alembic/alembic.git") "https://github.com/alembic/alembic.git")
add_versions("1.8.7", "6de0b97cd14dcfb7b2d0d788c951b6da3c5b336c47322ea881d64f18575c33da") add_versions("1.8.7", "6de0b97cd14dcfb7b2d0d788c951b6da3c5b336c47322ea881d64f18575c33da")
add_versions("1.8.6", "c572ebdea3a5f0ce13774dd1fceb5b5815265cd1b29d142cf8c144b03c131c8c") add_versions("1.8.6", "c572ebdea3a5f0ce13774dd1fceb5b5815265cd1b29d142cf8c144b03c131c8c")
add_versions("1.8.5", "180a12f08d391cd89f021f279dbe3b5423b1db751a9898540c8059a45825c2e9") add_versions("1.8.5", "180a12f08d391cd89f021f279dbe3b5423b1db751a9898540c8059a45825c2e9")
add_deps("cmake", "imath") add_configs("arnold", {description = "Include Arnold stuff", default = false, type = "boolean"})
if is_plat("linux") then add_configs("hdf5", {description = "Include HDF5 stuff", default = false, type = "boolean"})
add_syslinks("m") add_configs("maya", {description = "Include maya stuff", default = false, type = "boolean"})
add_configs("prman", {description = "Include prman stuff", default = false, type = "boolean"})
add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
if is_plat("linux", "bsd") then
add_syslinks("m", "pthread")
end end
on_load("windows", function (package)
if package:config("shared") then add_deps("cmake", "imath")
on_load(function (package)
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "ALEMBIC_DLL") package:add("defines", "ALEMBIC_DLL")
end end
if package:config("tools") then
package:config_set("hdf5", true)
end
if package:config("hdf5") then
package:add("deps", "hdf5", {configs = {zlib = true}})
end
end) end)
on_install("windows", "macosx", "linux", function (package) on_install(function (package)
local configs = {"-DBUILD_TESTING=OFF"} if package:is_plat("windows", "mingw") then
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) io.replace("lib/Alembic/Ogawa/OStream.cpp", "#include <stdexcept>", "#include <stdexcept>\n#include <Windows.h>", {plain = true})
end
local configs = {
"-DBUILD_TESTING=OFF",
"-DUSE_TESTS=OFF",
"-DALEMBIC_DEBUG_WARNINGS_AS_ERRORS=OFF",
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DALEMBIC_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DALEMBIC_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
table.insert(configs, "-DUSE_ARNOLD=" .. (package:config("arnold") and "ON" or "OFF"))
table.insert(configs, "-DUSE_MAYA=" .. (package:config("maya") and "ON" or "OFF"))
table.insert(configs, "-DUSE_PRMAN=" .. (package:config("prman") and "ON" or "OFF"))
table.insert(configs, "-DUSE_BINARIES=" .. (package:config("tools") and "ON" or "OFF"))
local hdf5 = package:dep("hdf5")
if hdf5 then
table.insert(configs, "-DUSE_HDF5=ON")
table.insert(configs, "-DUSE_STATIC_HDF5=" .. (hdf5:config("shared") and "OFF" or "ON"))
else
table.insert(configs, "-DUSE_HDF5=OFF")
end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.vcp(path.join(package:buildir(), "lib/**.pdb"), dir)
os.vcp(path.join(package:buildir(), "bin/**.pdb"), package:installdir("bin"))
end
end) end)
on_test(function (package) on_test(function (package)

@ -25,10 +25,7 @@ package("antlr4")
end) end)
on_install("@windows", "@linux", "@macosx", function (package) on_install("@windows", "@linux", "@macosx", function (package)
local source = "antlr-" .. package:version() .. "-complete.jar" os.vcp(package:originfile(), path.join(package:installdir("lib"), "antlr-complete.jar"))
local target = path.join(package:installdir("lib"), "antlr-complete.jar")
os.vcp("../" .. source, package:installdir("lib"))
os.vmv(package:installdir("lib", source), target)
end) end)
on_test(function (package) on_test(function (package)

@ -7,6 +7,7 @@ package("arduinojson")
add_urls("https://github.com/bblanchon/ArduinoJson/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/bblanchon/ArduinoJson/archive/refs/tags/$(version).tar.gz",
"https://github.com/bblanchon/ArduinoJson.git") "https://github.com/bblanchon/ArduinoJson.git")
add_versions("v7.2.1", "2780504927533d64cf4256c57de51412b835b327ef4018c38d862b0664d36d4f")
add_versions("v7.2.0", "d20aefd14f12bd907c6851d1dfad173e4fcd2d993841fa8c91a1d8ab5a71188b") add_versions("v7.2.0", "d20aefd14f12bd907c6851d1dfad173e4fcd2d993841fa8c91a1d8ab5a71188b")
add_versions("v7.1.0", "74bc745527a274bcab85c6498de77da749627113c4921ccbcaf83daa7ac35dee") add_versions("v7.1.0", "74bc745527a274bcab85c6498de77da749627113c4921ccbcaf83daa7ac35dee")
add_versions("v7.0.4", "98ca14d98e9f1e8978ce5ad3ca0eeda3d22419d17586c60f299f369078929917") add_versions("v7.0.4", "98ca14d98e9f1e8978ce5ad3ca0eeda3d22419d17586c60f299f369078929917")

@ -0,0 +1,25 @@
package("arkari")
set_kind("toolchain")
set_homepage("https://github.com/KomiMoe/Arkari")
set_description("Yet another llvm based obfuscator based on goron.")
set_license("Apache-2.0")
local version_map = {
["19.1.3"] = "1.6.0"
}
add_urls("https://github.com/KomiMoe/Arkari/releases/download/$(version)/$(version).7z", {version = function (version)
local llvm_ver = tostring(version)
local obf_ver = version_map[llvm_ver]
return string.format("Win64-MT-%s-obf%s", llvm_ver, obf_ver)
end})
add_versions("19.1.3", "9a181798ef3648cf8acb2f83941792f948d589a94b9d579a783b97331770ce93")
on_install("windows|x64", function (package)
os.mv("*", package:installdir())
end)
on_test(function (package)
os.vrun("llvm-config --version")
end)

@ -6,6 +6,7 @@ package("aws-c-common")
add_urls("https://github.com/awslabs/aws-c-common/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/awslabs/aws-c-common/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-common.git") "https://github.com/awslabs/aws-c-common.git")
add_versions("v0.10.3", "15cc7282cfe4837fdaf1c3bb44105247da712ae97706a8717866f8e73e1d4fd9")
add_versions("v0.10.0", "1fc7dea83f1d5a4b6fa86e3c8458200ed6e7f69c65707aa7b246900701874ad1") add_versions("v0.10.0", "1fc7dea83f1d5a4b6fa86e3c8458200ed6e7f69c65707aa7b246900701874ad1")
add_versions("v0.9.28", "bf265e9e409d563b0eddcb66e1cb00ff6b371170db3e119348478d911d054317") add_versions("v0.9.28", "bf265e9e409d563b0eddcb66e1cb00ff6b371170db3e119348478d911d054317")
add_versions("v0.9.27", "0c0eecbd7aa04f85b1bdddf6342789bc8052737c6e9aa2ca35e26caed41d06ba") add_versions("v0.9.27", "0c0eecbd7aa04f85b1bdddf6342789bc8052737c6e9aa2ca35e26caed41d06ba")

@ -6,6 +6,7 @@ package("aws-c-io")
add_urls("https://github.com/awslabs/aws-c-io/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/awslabs/aws-c-io/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-io.git") "https://github.com/awslabs/aws-c-io.git")
add_versions("v0.15.3", "d8cb4d7d3ec4fb27cbce158d6823a1f2f5d868e116f1d6703db2ab8159343c3f")
add_versions("v0.15.1", "70f119b44f2758fc482872141cb712122f1c3c82fea16d203b7286a98c139a71") add_versions("v0.15.1", "70f119b44f2758fc482872141cb712122f1c3c82fea16d203b7286a98c139a71")
add_versions("v0.15.0", "a8fbc39721395c12fd66bf2ce39b4cac24df395b35700b9ae718a7923d229df4") add_versions("v0.15.0", "a8fbc39721395c12fd66bf2ce39b4cac24df395b35700b9ae718a7923d229df4")
add_versions("v0.14.19", "127aa30608084affbcc0b7b26982ab4d98404d1aa103b91693d0e76b564da21d") add_versions("v0.14.19", "127aa30608084affbcc0b7b26982ab4d98404d1aa103b91693d0e76b564da21d")

@ -21,11 +21,14 @@ function _get_python_libs()
end end
function _add_info(linkinfo, result) function _add_info(linkinfo, result)
if linkinfo then table.insert(result.linkdirs, linkinfo.linkdir)
table.insert(result.linkdirs, linkinfo.linkdir) if linkinfo.filename then
table.insert(result.libfiles, linkinfo.filename) local filepath = path.join(linkinfo.linkdir, linkinfo.filename)
table.insert(result.links, linkinfo.link) if os.isfile(filepath) then
table.insert(result.libfiles, filepath)
end
end end
table.insert(result.links, linkinfo.link)
end end
function main(package, opt) function main(package, opt)
@ -38,7 +41,7 @@ function main(package, opt)
"/usr/local/lib", "/usr/local/lib",
"/usr/lib/x86_64-linux-gnu", "/usr/lib/x86_64-linux-gnu",
} }
local result = { local result = {
libfiles = {}, libfiles = {},
linkdirs = {}, linkdirs = {},
@ -51,23 +54,32 @@ function main(package, opt)
} }
local sub_libs_map = libs.get_sub_libs(package) local sub_libs_map = libs.get_sub_libs(package)
sub_libs_map["python"] = _get_python_libs() sub_libs_map.python = _get_python_libs()
table.insert(sub_libs_map.test, "test_exec_monitor") table.insert(sub_libs_map.test, "test_exec_monitor")
local found
libs.for_each(function (libname) libs.for_each(function (libname)
local sub_libs = sub_libs_map[libname] local sub_libs = sub_libs_map[libname]
if sub_libs then if sub_libs then
for _, sub_libname in ipairs(sub_libs) do for _, sub_libname in ipairs(sub_libs) do
local linkinfo = find_library("boost_" .. sub_libname, paths, opt) local linkinfo = find_library("boost_" .. sub_libname, paths, opt)
_add_info(linkinfo, result) if linkinfo then
_add_info(linkinfo, result)
found = true
end
end end
else else
local linkinfo = find_library("boost_" .. libname, paths, opt) local linkinfo = find_library("boost_" .. libname, paths, opt)
_add_info(linkinfo, result) if linkinfo then
_add_info(linkinfo, result)
found = true
end
end end
end) end)
result.linkdirs = table.unique(result.linkdirs) if found then
return result result.linkdirs = table.unique(result.linkdirs)
return result
end
end end
end end

@ -69,7 +69,7 @@ package("catch2")
end end
component:add("links", link) component:add("links", link)
if package:is_plat("windows") and package:version():le("3.0") then if package:is_plat("windows") and package:version():le("3.0") then
if package:has_tool("cxx", "cl") then if package:has_tool("cxx", "cl", "clang-cl") then
component:add("ldflags", "-subsystem:console") component:add("ldflags", "-subsystem:console")
elseif package:has_tool("cxx", "clang", "clangxx") then elseif package:has_tool("cxx", "clang", "clangxx") then
component:add("ldflags", "-Wl,/subsystem:console") component:add("ldflags", "-Wl,/subsystem:console")
@ -81,7 +81,7 @@ package("catch2")
if package:version():ge("3.0") then if package:version():ge("3.0") then
if package:is_plat("windows") then if package:is_plat("windows") then
local main_component = package:component("main") local main_component = package:component("main")
if package:has_tool("cxx", "cl") then if package:has_tool("cxx", "cl", "clang-cl") then
main_component:add("ldflags", "-subsystem:console") main_component:add("ldflags", "-subsystem:console")
elseif package:has_tool("cxx", "clang", "clangxx") then elseif package:has_tool("cxx", "clang", "clangxx") then
main_component:add("ldflags", "-Wl,/subsystem:console") main_component:add("ldflags", "-Wl,/subsystem:console")

@ -0,0 +1,68 @@
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 37cadf4..bd29874 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -6,13 +6,7 @@ if(NOT DART_BUILD_DARTPY)
endif()
# Set up pybind11
-include(FetchContent)
-FetchContent_Declare(
- pybind11
- GIT_REPOSITORY https://github.com/pybind/pybind11
- GIT_TAG v2.12.0
-)
-FetchContent_MakeAvailable(pybind11)
+find_package(pybind11 CONFIG)
if(NOT pybind11_FOUND)
message(WARNING "Disabling [dartpy] due to missing pybind11 >= 2.2.0.")
@@ -22,9 +16,6 @@ endif()
set(DART_DARTPY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/dartpy")
add_subdirectory(dartpy)
-add_subdirectory(tests)
-add_subdirectory(examples)
-add_subdirectory(tutorials)
message(STATUS "")
message(STATUS "[ dartpy ]")
diff --git a/python/dartpy/CMakeLists.txt b/python/dartpy/CMakeLists.txt
index b316e86..d33c16f 100644
--- a/python/dartpy/CMakeLists.txt
+++ b/python/dartpy/CMakeLists.txt
@@ -6,12 +6,7 @@
#
# This file is provided under the "BSD-style" License
-execute_process(COMMAND ${Python3_EXECUTABLE} -c
- "from distutils.sysconfig import get_python_lib;\
- print(get_python_lib(plat_specific=True))"
- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
+set(PYTHON_SITE_PACKAGES "lib/site-packages")
if(NOT IS_ABSOLUTE ${PYTHON_SITE_PACKAGES})
set(PYTHON_SITE_PACKAGES "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES}")
endif()
@@ -29,7 +24,6 @@ set(pybind_module dartpy)
#
pybind11_add_module(${pybind_module}
MODULE
- EXCLUDE_FROM_ALL
${dartpy_headers}
${dartpy_sources}
)
@@ -91,9 +85,9 @@ endif()
# TODO: Fix installing dartpy to site-packages directory
# Install the pybind module to site-packages directory
-# install(TARGETS ${pybind_module}
-# LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}"
-# )
+install(TARGETS ${pybind_module}
+ LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}"
+)
list(REMOVE_ITEM dartpy_headers
${CMAKE_CURRENT_LIST_DIR}/eigen_geometry_pybind.h

@ -12,9 +12,11 @@ package("dartsim")
add_versions("v6.13.0", "4da3ff8cee056252a558b05625a5ff29b21e71f2995e6d7f789abbf6261895f7") add_versions("v6.13.0", "4da3ff8cee056252a558b05625a5ff29b21e71f2995e6d7f789abbf6261895f7")
add_versions("v6.14.2", "6bbaf452f8182b97bf22adeab6cc7f3dc1cd2733358543131fa130e07c0860fc") add_versions("v6.14.2", "6bbaf452f8182b97bf22adeab6cc7f3dc1cd2733358543131fa130e07c0860fc")
add_patches("6.x", "patches/6.14.5/dartpy.patch", "c8f989317ac8e20259a91e76d28b986b3d4bda01a8e4d0fc13704f6e4f0e144b")
add_configs("dartpy", {description = "Build dartpy interface.", default = false, type = "boolean"}) add_configs("dartpy", {description = "Build dartpy interface.", default = false, type = "boolean"})
add_configs("gui", {description = "Build GLUT GUI.", default = false, type = "boolean"})
local configdeps = {bullet3 = "Bullet", local configdeps = {bullet3 = "Bullet",
freeglut = "GLUT",
nlopt = "NLOPT", nlopt = "NLOPT",
ode = "ODE", ode = "ODE",
openscenegraph = "OpenSceneGraph", openscenegraph = "OpenSceneGraph",
@ -32,6 +34,8 @@ package("dartsim")
set_policy("package.cmake_generator.ninja", false) set_policy("package.cmake_generator.ninja", false)
end end
set_policy("platform.longpaths", true)
add_deps("cmake") add_deps("cmake")
add_deps("assimp", "libccd", "eigen", "fcl", "octomap", "fmt") add_deps("assimp", "libccd", "eigen", "fcl", "octomap", "fmt")
on_load("windows|x64", "linux", "macosx", function (package) on_load("windows|x64", "linux", "macosx", function (package)
@ -40,24 +44,42 @@ package("dartsim")
package:add("deps", config) package:add("deps", config)
end end
end end
if package:config("gui") or package:config("dartpy") then
package:add("deps", "glut")
end
if package:config("dartpy") then if package:config("dartpy") then
package:add("deps", "tinyxml2")
package:add("deps", "urdfdom")
package:add("deps", "openscenegraph")
package:add("deps", "imgui", {configs = {opengl2 = true}})
package:add("deps", "python 3.x") package:add("deps", "python 3.x")
package:add("deps", "pybind11")
end end
if package:config("openscenegraph") then if package:config("openscenegraph") then
package:add("deps", "imgui") package:add("deps", "imgui", {configs = {opengl2 = true}})
end end
end) end)
on_install("windows|x64", "linux", "macosx", function (package) on_install("windows|x64", "linux", "macosx", function (package)
import("detect.tools.find_python3")
-- remove after xmake 2.9.7
io.insert("CMakeLists.txt", 1, "set(CMAKE_MODULE_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS}\")\n")
io.replace("CMakeLists.txt", "/GL", "", {plain = true}) io.replace("CMakeLists.txt", "/GL", "", {plain = true})
io.replace("CMakeLists.txt", "if(TARGET dart)", "if(FALSE)", {plain = true}) io.replace("CMakeLists.txt", "if(TARGET dart)", "if(FALSE)", {plain = true})
io.replace("CMakeLists.txt", "-D_CRT_SECURE_NO_WARNINGS", "-DWIN32 -D_CRT_SECURE_NO_WARNINGS", {plain = true})
io.replace("CMakeLists.txt", "CMAKE_SHARED_LINKER_FLAGS \"-Wl,--no-undefined\"", "CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined\"", {plain = true})
io.replace("dart/CMakeLists.txt", "/LTCG", "", {plain = true}) io.replace("dart/CMakeLists.txt", "/LTCG", "", {plain = true})
io.replace("python/CMakeLists.txt", "add_subdirectory(tests)", "", {plain = true})
io.replace("python/CMakeLists.txt", "add_subdirectory(examples)", "", {plain = true})
io.replace("python/CMakeLists.txt", "add_subdirectory(tutorials)", "", {plain = true})
io.replace("cmake/DARTFindDependencies.cmake", "dart_check_required_package(assimp \"assimp\")", "dart_check_required_package(assimp \"assimp\")\nfind_package(ZLIB)\ntarget_link_libraries(assimp INTERFACE ZLIB::ZLIB)", {plain = true}) io.replace("cmake/DARTFindDependencies.cmake", "dart_check_required_package(assimp \"assimp\")", "dart_check_required_package(assimp \"assimp\")\nfind_package(ZLIB)\ntarget_link_libraries(assimp INTERFACE ZLIB::ZLIB)", {plain = true})
io.replace("cmake/DARTFindDependencies.cmake", "dart_check_required_package(fcl \"fcl\")", "dart_check_required_package(fcl \"fcl\")\ntarget_link_libraries(fcl INTERFACE ccd)", {plain = true}) io.replace("cmake/DARTFindDependencies.cmake", "dart_check_required_package(fcl \"fcl\")", "dart_check_required_package(fcl \"fcl\")\ntarget_link_libraries(fcl INTERFACE ccd)", {plain = true})
io.replace("cmake/DARTFindDependencies.cmake", "check_cxx_source_compiles%(.-\".-\".-(ASSIMP.-DEFINED)%)", "set(%1 1)") io.replace("cmake/DARTFindDependencies.cmake", "check_cxx_source_compiles%(.-\".-\".-(ASSIMP.-DEFINED)%)", "set(%1 1)")
io.replace("cmake/DARTFindOpenSceneGraph.cmake", "osg osgViewer osgManipulator osgGA osgDB osgShadow osgUtil", "osgManipulator osgShadow osgViewer osgGA osgDB osgUtil osg", {plain = true})
io.replace("cmake/DARTFindOpenSceneGraph.cmake", "target_link_libraries(osg::osg", "target_compile_definitions(osg::osg INTERFACE OSG_LIBRARY_STATIC)\ntarget_link_libraries(osg::osg", {plain = true})
local glut_extra = "find_package(GLUT QUIET MODULE)\ntarget_compile_definitions(GLUT::GLUT INTERFACE FREEGLUT_STATIC)"
if package:is_plat("linux") then
glut_extra = glut_extra .. "\ntarget_link_libraries(GLUT::GLUT INTERFACE Xrandr Xrender Xxf86vm X11)"
end
io.replace("cmake/DARTFindGLUT.cmake", "find_package(GLUT QUIET MODULE)", glut_extra, {plain = true})
local configs = { local configs = {
"-DDART_USE_SYSTEM_IMGUI=ON", "-DDART_USE_SYSTEM_IMGUI=ON",
"-DDART_SKIP_lz4=ON", "-DDART_SKIP_lz4=ON",
@ -66,22 +88,58 @@ package("dartsim")
"-DDART_SKIP_pagmo=ON", "-DDART_SKIP_pagmo=ON",
"-DDART_SKIP_DOXYGEN=ON", "-DDART_SKIP_DOXYGEN=ON",
"-DDART_TREAT_WARNINGS_AS_ERRORS=OFF", "-DDART_TREAT_WARNINGS_AS_ERRORS=OFF",
"-DDART_VERBOSE=ON"
} }
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) 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")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
for config, dep in pairs(configdeps) do for config, dep in pairs(configdeps) do
table.insert(configs, "-DDART_SKIP_" .. dep .. "=" .. (package:config(config) and "OFF" or "ON")) table.insert(configs, "-DDART_SKIP_" .. dep .. "=" .. (package:dep(config) and "OFF" or "ON"))
end end
if package:is_plat("windows") then if package:is_plat("windows") then
table.insert(configs, "-DDART_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "/MT" or "/MD")) table.insert(configs, "-DDART_RUNTIME_LIBRARY=" .. (package:has_runtime("MT", "MTd") and "/MT" or "/MD"))
end end
table.insert(configs, "-DDART_BUILD_DARTPY=" .. (package:config("dartpy") and "ON" or "OFF")) table.insert(configs, "-DDART_BUILD_DARTPY=" .. (package:config("dartpy") and "ON" or "OFF"))
table.insert(configs, "-DDART_BUILD_GUI_OSG=" .. (package:config("openscenegraph") and "ON" or "OFF")) table.insert(configs, "-DDART_SKIP_GLUT=" .. ((package:config("gui") or package:config("dartpy")) and "OFF" or "ON"))
import("package.tools.cmake").install(package, configs) table.insert(configs, "-DDART_BUILD_GUI_OSG=" .. (package:dep("openscenegraph") and "ON" or "OFF"))
if package:config("dartpy") then
local python = find_python3()
local pythondir = path.directory(python)
if pythondir and path.is_absolute(pythondir) then
table.insert(configs, "-DPython_ROOT_DIR=" .. pythondir)
table.insert(configs, "-DPython3_ROOT_DIR=" .. pythondir)
end
end
local deps = {"imgui"}
if package:is_plat("linux") then
table.insert(deps, "freeglut")
end
import("package.tools.cmake").install(package, configs, {packagedeps = deps})
local suffix = package:is_debug() and "d" or "" local suffix = package:is_debug() and "d" or ""
for _, lib in ipairs({"dart-collision-bullet", "dart-collision-ode", "dart-gui-osg", "dart-gui", "dart-optimizer-ipopt", "dart-optimizer-nlopt", "dart-optimizer-pagmo", "dart-utils-urdf", "dart-utils", "dart", "dart-external-odelcpsolver", "dart-external-lodepng"}) do for _, lib in ipairs({"dart-collision-bullet", "dart-collision-ode", "dart-gui-osg", "dart-gui", "dart-optimizer-ipopt", "dart-optimizer-nlopt", "dart-optimizer-pagmo", "dart-utils-urdf", "dart-utils", "dart", "dart-external-odelcpsolver", "dart-external-lodepng"}) do
package:add("links", lib .. suffix) package:add("links", lib .. suffix)
end end
if package:config("dartpy") then
os.vrunv("python", {"-m", "pip", "install", "numpy"})
local pythonpath = path.join(package:installdir("lib"), "site-packages")
package:addenv("PYTHONPATH", pythonpath)
if package:is_plat("windows") then
-- after python3.8 dll can not be loaded from PATH
for _, lib in ipairs(package:librarydeps()) do
if lib:name() ~= "python" then
local fetchinfo = lib:fetch()
local libfiles = fetchinfo and fetchinfo.libfiles or {}
for _, file in ipairs(libfiles) do
if file:endswith(".dll") then
os.trycp(file, pythonpath)
end
end
end
end
if package:config("shared") then
os.trycp(path.join(package:installdir("bin"), "*.dll"), pythonpath)
end
end
end
end) end)
on_test(function (package) on_test(function (package)
@ -91,4 +149,8 @@ package("dartsim")
dart::simulation::WorldPtr world = dart::simulation::World::create(); dart::simulation::WorldPtr world = dart::simulation::World::create();
} }
]]}, {configs = {languages = "c++17"}})) ]]}, {configs = {languages = "c++17"}}))
if package:config("dartpy") then
local python = package:is_plat("windows") and "python" or "python3"
os.vrunv(python, {"-c", "import dartpy"})
end
end) end)

@ -5,6 +5,7 @@ package("efsw")
set_urls("https://github.com/SpartanJ/efsw/archive/refs/tags/$(version).tar.gz", set_urls("https://github.com/SpartanJ/efsw/archive/refs/tags/$(version).tar.gz",
"https://github.com/SpartanJ/efsw.git") "https://github.com/SpartanJ/efsw.git")
add_versions("1.4.1", "f0ddee587928737c6a3dc92eb88266a804c77279cbdf29d47e5e6f6ad6c7fd9a")
add_versions("1.4.0", "9eed5fc8471767faa44134f5379d4de02825e3756007dafa482fd1656e42bc4a") add_versions("1.4.0", "9eed5fc8471767faa44134f5379d4de02825e3756007dafa482fd1656e42bc4a")
add_versions("1.3.1", "3c0efe023258712d25644977227f07cf7edf7e5dc00ffa8d88733f424fa6af86") add_versions("1.3.1", "3c0efe023258712d25644977227f07cf7edf7e5dc00ffa8d88733f424fa6af86")
add_versions("1.3.0", "e190b72f23d92c42e1a0dab9bb6354a56f75c7535fd1f3e3a10b1c317e05f8f6") add_versions("1.3.0", "e190b72f23d92c42e1a0dab9bb6354a56f75c7535fd1f3e3a10b1c317e05f8f6")

@ -15,6 +15,7 @@ package("flatbuffers")
add_deps("cmake") add_deps("cmake")
on_install(function(package) on_install(function(package)
io.replace("CMakeLists.txt", "/MT", "", {plain = true})
io.replace("CMakeLists.txt", io.replace("CMakeLists.txt",
"RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}", "RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}",
"RUNTIME DESTINATION bin", {plain = true}) "RUNTIME DESTINATION bin", {plain = true})
@ -36,9 +37,7 @@ package("flatbuffers")
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib") os.trymv(package:installdir("lib/flatc.pdb"), package:installdir("bin"))
os.trycp(path.join(package:buildir(), "flatc.pdb"), package:installdir("bin"))
os.trycp(path.join(package:buildir(), "flatbuffers.pdb"), dir)
end end
end) end)

@ -31,7 +31,7 @@ package("freeglut")
on_load("windows", "mingw", function (package) on_load("windows", "mingw", function (package)
if not package:config("shared") then if not package:config("shared") then
package:add("defines", "FREEGLUT_STATIC=1") package:add("defines", "FREEGLUT_STATIC")
end end
package:add("defines", "FREEGLUT_LIB_PRAGMAS=0") package:add("defines", "FREEGLUT_LIB_PRAGMAS=0")
package:add("syslinks", "gdi32", "winmm", "user32", "advapi32") package:add("syslinks", "gdi32", "winmm", "user32", "advapi32")
@ -61,7 +61,7 @@ package("freeglut")
table.insert(opt.cxflags, "-DFREEGLUT_LIB_PRAGMAS=0") table.insert(opt.cxflags, "-DFREEGLUT_LIB_PRAGMAS=0")
else else
table.insert(opt.cxflags, "-DFREEGLUT_LIB_PRAGMAS=0") table.insert(opt.cxflags, "-DFREEGLUT_LIB_PRAGMAS=0")
table.insert(opt.cxflags, "-DFREEGLUT_STATIC=1") table.insert(opt.cxflags, "-DFREEGLUT_STATIC")
end end
if package:is_arch("arm64") then if package:is_arch("arm64") then
local vs = package:toolchain("msvc"):config("vs") local vs = package:toolchain("msvc"):config("vs")
@ -78,6 +78,10 @@ package("freeglut")
import("package.tools.cmake").install(package, configs, opt) import("package.tools.cmake").install(package, configs, opt)
os.trycp(path.join("include", "GL", "glut.h"), package:installdir("include", "GL")) os.trycp(path.join("include", "GL", "glut.h"), package:installdir("include", "GL"))
if package:is_plat("windows") and not package:config("shared") then
os.trycp(path.join(package:installdir("lib"), "freeglut_static.lib"), path.join(package:installdir("lib"), "freeglut.lib"))
package:add("links", "freeglut")
end
end) end)
on_test(function (package) on_test(function (package)

@ -7,6 +7,7 @@ package("glaze")
add_urls("https://github.com/stephenberry/glaze/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/stephenberry/glaze/archive/refs/tags/$(version).tar.gz",
"https://github.com/stephenberry/glaze.git") "https://github.com/stephenberry/glaze.git")
add_versions("v4.0.1", "0026aca33201ee6d3a820fb5926f36ba8c838bfd3120e2e179b0eee62b5bd231")
add_versions("v3.6.2", "74b14656b7a47c0a03d0a857adf5059e8c2351a7a84623593be0dd16b293216c") add_versions("v3.6.2", "74b14656b7a47c0a03d0a857adf5059e8c2351a7a84623593be0dd16b293216c")
add_versions("v3.6.0", "d394fed35440bd1cb1a2aec059b967acc43fc04764ecb0915ba24b9f5a9ca0a3") add_versions("v3.6.0", "d394fed35440bd1cb1a2aec059b967acc43fc04764ecb0915ba24b9f5a9ca0a3")
add_versions("v3.3.2", "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad") add_versions("v3.3.2", "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad")
@ -21,6 +22,8 @@ package("glaze")
add_versions("v2.2.0", "1d6e36029a58bf8c4bdd035819e1ab02b87d8454dd80fa2f5d46c96a1e6d600c") add_versions("v2.2.0", "1d6e36029a58bf8c4bdd035819e1ab02b87d8454dd80fa2f5d46c96a1e6d600c")
add_versions("v1.3.5", "de5d59cb7f31193d45f67f25d8ced1499df50c0d926a1461432b87f2b2368817") add_versions("v1.3.5", "de5d59cb7f31193d45f67f25d8ced1499df50c0d926a1461432b87f2b2368817")
add_patches("4.0.1", "https://github.com/stephenberry/glaze/commit/8f35df43bcb1210a0c1e07a68b99608e29ecea43.patch", "66eba4c0eea1469c1bf21b2b6ea31cb320391d1095ffe06c5a7ff3dfda796763")
add_deps("cmake") add_deps("cmake")
if on_check then if on_check then
@ -75,20 +78,18 @@ package("glaze")
on_test(function (package) on_test(function (package)
assert(package:check_cxxsnippets({test = [[ assert(package:check_cxxsnippets({test = [[
#include <glaze/glaze.hpp>
struct obj_t { struct obj_t {
double x{}; double x{};
float y{}; float y{};
}; };
template <> template <>
struct glz::meta<obj_t> { struct glz::meta<obj_t> {
using T = obj_t; static constexpr auto value = object("x", &obj_t::x, "y", &obj_t::y);
static constexpr auto value = object("x", &T::x);
}; };
void test() { void test() {
std::string buffer{}; std::string buffer{};
obj_t obj{}; obj_t obj{};
glz::write_json(obj, buffer); glz::write_json(obj, buffer);
} }
]]}, {configs = {languages = "c++2b"}})) ]]}, {configs = {languages = "c++2b"}, includes = "glaze/glaze.hpp"}))
end) end)

@ -1,5 +1,5 @@
package("glut") package("glut")
set_kind("library", {headeronly = true})
set_homepage("https://www.opengl.org/resources/libraries/glut/") set_homepage("https://www.opengl.org/resources/libraries/glut/")
set_description("OpenGL utility toolkit") set_description("OpenGL utility toolkit")
@ -12,10 +12,9 @@ package("glut")
if package:is_plat("macosx") then if package:is_plat("macosx") then
return {frameworks = {"GLUT", "OpenGL"}, defines = "GL_SILENCE_DEPRECATION"} return {frameworks = {"GLUT", "OpenGL"}, defines = "GL_SILENCE_DEPRECATION"}
end end
else
local freeglut = package:dep("freeglut")
if freeglut then
return freeglut:fetch(opt)
end
end end
end) end)
on_install("windows", "mingw", "macosx", "linux", function (package)
-- do nothing, only to keep dep available
end)

@ -1,11 +1,11 @@
package("imath") package("imath")
set_homepage("https://github.com/AcademySoftwareFoundation/Imath/") set_homepage("https://github.com/AcademySoftwareFoundation/Imath/")
set_description("Imath is a C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics") set_description("Imath is a C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics")
set_license("BSD-3-Clause") set_license("BSD-3-Clause")
add_urls("https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/$(version).tar.gz",
"https://github.com/AcademySoftwareFoundation/Imath.git") "https://github.com/AcademySoftwareFoundation/Imath.git")
add_versions("v3.1.12", "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da") add_versions("v3.1.12", "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da")
add_versions("v3.1.10", "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10") add_versions("v3.1.10", "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10")
add_versions("v3.1.0", "211c907ab26d10bd01e446da42f073ee7381e1913d8fa48084444bc4e1b4ef87") add_versions("v3.1.0", "211c907ab26d10bd01e446da42f073ee7381e1913d8fa48084444bc4e1b4ef87")
@ -18,17 +18,26 @@ package("imath")
add_versions("v3.1.11", "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063") add_versions("v3.1.11", "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063")
add_includedirs("include", "include/Imath") add_includedirs("include", "include/Imath")
on_load(function (package)
if not package.is_built or package:is_built() then add_deps("cmake")
package:add("deps", "cmake")
on_install(function (package)
if package:is_plat("windows", "mingw") and package:config("shared") then
package:add("defines", "IMATH_DLL")
end end
end)
on_install("windows", "macosx", "linux", "mingw@windows", "mingw@msys", function (package)
local configs = {"-DBUILD_TESTING=OFF"} local configs = {"-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.vcp(path.join(package:buildir(), "**.pdb"), dir)
end
end) end)
on_test(function (package) on_test(function (package)

@ -41,6 +41,11 @@ package("libdeflate")
table.insert(configs, "-DLIBDEFLATE_BUILD_STATIC_LIB=" .. (package:config("shared") and "OFF" or "ON")) table.insert(configs, "-DLIBDEFLATE_BUILD_STATIC_LIB=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DLIBDEFLATE_BUILD_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DLIBDEFLATE_BUILD_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.trycp(path.join(package:buildir(), "deflate.pdb"), dir)
end
end) end)
on_test(function (package) on_test(function (package)

@ -6,6 +6,7 @@ package("liburing")
add_urls("https://github.com/axboe/liburing/archive/refs/tags/liburing-$(version).tar.gz", add_urls("https://github.com/axboe/liburing/archive/refs/tags/liburing-$(version).tar.gz",
"https://github.com/axboe/liburing.git") "https://github.com/axboe/liburing.git")
add_versions("2.8", "3ed7891d1b2bbe743ef3fb6d0a4970e630aa02d7c7bd3b0212791fb7be815984")
add_versions("2.7", "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1") add_versions("2.7", "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1")
add_versions("2.6", "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc") add_versions("2.6", "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc")
add_versions("2.5", "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98") add_versions("2.5", "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98")

@ -23,10 +23,17 @@ package("log4cplus")
if package:config("unicode") then if package:config("unicode") then
package:add("defines", "UNICODE") package:add("defines", "UNICODE")
end end
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "LOG4CPLUS_BUILD_DLL")
end
end) end)
on_install(function (package) on_install(function (package)
local configs = {"-DLOG4CPLUS_BUILD_TESTING=OFF", "-DWITH_UNIT_TESTS=OFF"} local configs = {
"-DLOG4CPLUS_BUILD_TESTING=OFF",
"-DWITH_UNIT_TESTS=OFF",
"-DLOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME=OFF",
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DUNICODE=" .. (package:config("unicode") and "ON" or "OFF")) table.insert(configs, "-DUNICODE=" .. (package:config("unicode") and "ON" or "OFF"))

@ -0,0 +1,69 @@
package("microsoft-apsi")
set_homepage("https://github.com/microsoft/APSI")
set_description("APSI is a C++ library for Asymmetric (unlabeled or labeled) Private Set Intersection.")
set_license("MIT")
add_urls("https://github.com/microsoft/APSI.git")
add_versions("v0.12.0", "b967a126b4e1c682b039afc2d76a98ea2c993230")
add_configs("log4cplus", {description = "Use Log4cplus for logging", default = false, type = "boolean"})
add_configs("cppzmq", {description = "Use ZeroMQ for networking", default = false, type = "boolean"})
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
add_deps("cmake")
add_deps("microsoft-seal", {configs = {ms_gsl = true, zstd = true, throw_tran = false}})
add_deps("microsoft-kuku", "flatbuffers", "jsoncpp")
if on_check then
on_check(function (package)
-- TODO: To support cross-compilation, need host flatc tool and target flatbuffers library
-- Remove cmake try_run, replace check_cxx_source_runs to check_cxx_source_compiles
if not package:is_arch64() or package:is_cross() then
raise("package(microsoft-apsi) unsupported cross-compilation")
end
end)
end
on_load(function (package)
if package:config("log4cplus") then
package:add("deps", "log4cplus", {configs = {unicode = false}})
end
if package:config("cppzmq") then
package:add("deps", "cppzmq")
end
local version = package:version()
if version then
package:add("includedirs", format("include/APSI-%s.%s", version:major(), version:minor()))
else
package:add("includedirs", "include/APSI-0.12")
end
end)
on_install("windows", "linux", "macosx", "bsd", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
table.insert(configs, "-DAPSI_USE_LOG4CPLUS=" .. (package:config("log4cplus") and "ON" or "OFF"))
table.insert(configs, "-DAPSI_USE_ZMQ=" .. (package:config("cppzmq") and "ON" or "OFF"))
local opt = {}
if package:has_tool("cxx", "cl") then
opt.cxflags = {"/utf-8", "/EHsc"}
end
import("package.tools.cmake").install(package, configs, opt)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
using namespace apsi;
void test() {
ThreadPoolMgr::SetThreadCount(4);
}
]]}, {configs = {languages = "c++17"}, includes = {"apsi/sender.h"}}))
end)

@ -86,11 +86,6 @@ package("microsoft-seal")
table.insert(configs, "-DSEAL_USE_ALIGNED_ALLOC=OFF") table.insert(configs, "-DSEAL_USE_ALIGNED_ALLOC=OFF")
end end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.vcp(path.join(package:buildir(), "**.pdb"), dir)
end
end) end)
on_test(function (package) on_test(function (package)

@ -4,6 +4,7 @@ package("ngtcp2")
set_license("MIT") set_license("MIT")
add_urls("https://github.com/ngtcp2/ngtcp2/releases/download/v$(version)/ngtcp2-$(version).tar.gz") add_urls("https://github.com/ngtcp2/ngtcp2/releases/download/v$(version)/ngtcp2-$(version).tar.gz")
add_versions("1.9.0", "6be7577b96af9f8444e369d7f41fbe0b3182d934807f8fe24554c1ac5054cadb")
add_versions("1.8.1", "72b544d2509b8fb58c493f9d3d71fe93959f94bca48aa0c87ddd56bf61178cee") add_versions("1.8.1", "72b544d2509b8fb58c493f9d3d71fe93959f94bca48aa0c87ddd56bf61178cee")
add_versions("1.8.0", "f39ca500b10c432204dda5621307e29bdbdf26611fabbc90b1718f9f39eb3203") add_versions("1.8.0", "f39ca500b10c432204dda5621307e29bdbdf26611fabbc90b1718f9f39eb3203")
add_versions("1.7.0", "59dccb5c9a615eaf9de3e3cc3299134c22a88513b865b78a3e91d873c08a0664") add_versions("1.7.0", "59dccb5c9a615eaf9de3e3cc3299134c22a88513b865b78a3e91d873c08a0664")

@ -1,11 +1,12 @@
package("openexr") package("openexr")
set_homepage("https://www.openexr.com/") set_homepage("https://www.openexr.com/")
set_description("OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.") set_description("OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.")
set_license("BSD-3-Clause") set_license("BSD-3-Clause")
add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/$(version).tar.gz",
"https://github.com/AcademySoftwareFoundation/openexr.git") "https://github.com/AcademySoftwareFoundation/openexr.git")
add_versions("v3.3.2", "5013e964de7399bff1dd328cbf65d239a989a7be53255092fa10b85a8715744d")
add_versions("v3.3.1", "58aad2b32c047070a52f1205b309bdae007442e0f983120e4ff57551eb6f10f1") add_versions("v3.3.1", "58aad2b32c047070a52f1205b309bdae007442e0f983120e4ff57551eb6f10f1")
add_versions("v3.3.0", "58b00f50d2012f3107573c4b7371f70516d2972c2b301a50925e1b4a60a7be6f") add_versions("v3.3.0", "58b00f50d2012f3107573c4b7371f70516d2972c2b301a50925e1b4a60a7be6f")
add_versions("v3.2.4", "81e6518f2c4656fdeaf18a018f135e96a96e7f66dbe1c1f05860dd94772176cc") add_versions("v3.2.4", "81e6518f2c4656fdeaf18a018f135e96a96e7f66dbe1c1f05860dd94772176cc")
@ -20,14 +21,30 @@ package("openexr")
add_versions("v3.1.5", "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec") add_versions("v3.1.5", "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec")
add_versions("v3.2.1", "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b") add_versions("v3.2.1", "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b")
add_deps("cmake")
add_deps("zlib")
add_configs("build_both", {description = "Build both static library and shared library. (deprecated)", default = false, type = "boolean"}) add_configs("build_both", {description = "Build both static library and shared library. (deprecated)", default = false, type = "boolean"})
add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
if is_plat("linux", "bsd") then
add_syslinks("pthread")
end
add_includedirs("include/OpenEXR", "include") add_includedirs("include/OpenEXR", "include")
on_load("windows", "macosx", "linux", "mingw@windows", "mingw@msys", function (package) add_deps("cmake")
add_deps("zlib", "libdeflate")
if on_check then
on_check("windows", function (package)
local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
if vs_toolset and package:is_arch("arm.*") then
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
assert(minor and minor >= 30, "package(openexr) dep(libdeflate) requires vs_toolset >= 14.3")
end
end)
end
on_load(function (package)
local ver = package:version() local ver = package:version()
local suffix = format("-%d_%d", ver:major(), ver:minor()) local suffix = format("-%d_%d", ver:major(), ver:minor())
local links = {} local links = {}
@ -45,9 +62,23 @@ package("openexr")
end end
end) end)
on_install("macosx", "linux", "windows|x64", "windows|x86", "mingw@windows", "mingw@msys", function (package) on_install(function (package)
local configs = {"-DBUILD_TESTING=OFF", "-DINSTALL_OPENEXR_EXAMPLES=OFF", "-DINSTALL_OPENEXR_DOCS=OFF", "-DOPENEXR_BUILD_UTILS=ON"} io.replace("CMakeLists.txt", "add_subdirectory(website/src)", "", {plain = true})
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
local configs = {
"-DBUILD_TESTING=OFF",
"-DINSTALL_OPENEXR_EXAMPLES=OFF",
"-DOPENEXR_BUILD_EXAMPLES=OFF",
"-DINSTALL_OPENEXR_DOCS=OFF",
"-DBUILD_WEBSITE=OFF",
"-DCMAKE_DEBUG_POSTFIX=''",
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
table.insert(configs, "-DOPENEXR_BUILD_TOOLS=" .. (package:config("tools") and "ON" or "OFF"))
table.insert(configs, "-DOPENEXR_BUILD_UTILS=" .. (package:config("tools") and "ON" or "OFF"))
if package:version():ge("3.0") then if package:version():ge("3.0") then
if package:is_plat("windows") and package:version():le("3.1.4") then if package:is_plat("windows") and package:version():le("3.1.4") then
local vs_toolset = import("core.tool.toolchain").load("msvc"):config("vs_toolset") local vs_toolset = import("core.tool.toolchain").load("msvc"):config("vs_toolset")
@ -70,14 +101,17 @@ package("openexr")
table.insert(configs, "-DPYILMBASE_ENABLE=OFF") table.insert(configs, "-DPYILMBASE_ENABLE=OFF")
end end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
os.vcp(path.join(package:buildir(), "bin/*.pdb"), package:installdir("bin"))
os.vcp(path.join(package:buildir(), "src/lib/*.pdb"), package:installdir("lib"))
end
end) end)
on_test(function (package) on_test(function (package)
assert(package:check_cxxsnippets({test = [[ assert(package:check_cxxsnippets({test = [[
#include <stdio.h>
void test() { void test() {
printf( OPENEXR_PACKAGE_STRING ); Imf::RgbaInputFile file("hello.exr");
} }
]]}, {configs = {languages = "c++14"}, ]]}, {configs = {languages = "c++14"}, includes = {"ImfRgbaFile.h"}}))
includes = {"OpenEXR/OpenEXRConfig.h"}}))
end) end)

@ -6,6 +6,7 @@ package("openh264")
set_urls("https://github.com/cisco/openh264/archive/refs/tags/$(version).tar.gz", set_urls("https://github.com/cisco/openh264/archive/refs/tags/$(version).tar.gz",
"https://github.com/cisco/openh264.git") "https://github.com/cisco/openh264.git")
add_versions("v2.5.0", "94c8ca364db990047ec4ec3481b04ce0d791e62561ef5601443011bdc00825e3")
add_versions("v2.4.1", "8ffbe944e74043d0d3fb53d4a2a14c94de71f58dbea6a06d0dc92369542958ea") add_versions("v2.4.1", "8ffbe944e74043d0d3fb53d4a2a14c94de71f58dbea6a06d0dc92369542958ea")
add_versions("v2.1.1", "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678") add_versions("v2.1.1", "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678")
@ -22,6 +23,8 @@ package("openh264")
end) end)
on_install("!android and !bsd and !wasm", function (package) on_install("!android and !bsd and !wasm", function (package)
io.replace("meson.build", "-Werror", "", {plain = true})
if package:gitref() or package:version():ge("2.4.1") then if package:gitref() or package:version():ge("2.4.1") then
import("package.tools.meson") import("package.tools.meson")

@ -71,7 +71,7 @@ package("openscenegraph")
end end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
local suffix = package:is_debug() and "d" or "" local suffix = package:is_debug() and "d" or ""
for _, lib in ipairs({"osg", "osgGA", "osgUtil", "osgDB", "osgText", "osgWidget", "osgTerrain", "osgFX", "osgViewer", "osgVolume", "osgManipulator", "osgAnimation", "osgParticle", "osgShadow", "osgPresentation", "osgSim", "OpenThreads"}) do for _, lib in ipairs({"osgPresentation", "osgSim", "osgShadow", "osgParticle", "osgAnimation", "osgManipulator", "osgTerrain", "osgVolume", "osgWidget", "osgUI", "osgViewer", "osgText", "osgFX", "osgGA", "osgDB", "osgUtil", "osg", "OpenThreads"}) do
package:add("links", lib .. suffix) package:add("links", lib .. suffix)
end end
end) end)

@ -0,0 +1,17 @@
package("portablebuildtools")
set_kind("toolchain")
set_homepage("https://github.com/Data-Oriented-House/PortableBuildTools")
set_description("Portable VS Build Tools installer")
add_urls("https://github.com/Data-Oriented-House/PortableBuildTools/releases/download/$(version)/PortableBuildTools.exe")
add_versions("v2.8", "d3a419be62856ab8896004f91af58f5928ce7c536954398d02a8b99202c4808f")
on_install("@windows", "@msys", function (package)
os.cp(package:originfile(), package:installdir("bin"))
end)
on_test(function (package)
os.runv("PortableBuildTools.exe", {"list"})
end)

@ -21,7 +21,15 @@ package("pybind11")
add_deps("cmake", "python 3.x") add_deps("cmake", "python 3.x")
on_install("windows|native", "macosx", "linux", function (package) on_install("windows|native", "macosx", "linux", function (package)
import("package.tools.cmake").install(package, {"-DPYBIND11_TEST=OFF"}) import("detect.tools.find_python3")
local configs = {"-DPYBIND11_TEST=OFF"}
local python = find_python3()
local pythondir = path.directory(python)
if pythondir and path.is_absolute(pythondir) then
table.insert(configs, "-DPython_ROOT_DIR=" .. pythondir)
end
import("package.tools.cmake").install(package, configs)
end) end)
on_test(function (package) on_test(function (package)

@ -6,6 +6,7 @@ package("re-flex")
add_urls("https://github.com/Genivia/RE-flex/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/Genivia/RE-flex/archive/refs/tags/$(version).tar.gz",
"https://github.com/Genivia/RE-flex.git") "https://github.com/Genivia/RE-flex.git")
add_versions("v5.0.1", "b74430fe63a6e3e665676d23601e332fcf12714efb798661bf307cb7a230ca4f")
add_versions("v4.5.0", "30a503087c4ea7c2f81ef8b7f1c54ea10c3f26ab3a372d2c874273ee5e643472") add_versions("v4.5.0", "30a503087c4ea7c2f81ef8b7f1c54ea10c3f26ab3a372d2c874273ee5e643472")
add_versions("v4.4.0", "3b34d0c88f91db6b5387355a64a84bfa6464d90fb182aab05c367605db28d2e8") add_versions("v4.4.0", "3b34d0c88f91db6b5387355a64a84bfa6464d90fb182aab05c367605db28d2e8")
add_versions("v4.3.0", "1658c1be9fa95bf948a657d75d2cef0df81b614bc6052284935774d4d8551d95") add_versions("v4.3.0", "1658c1be9fa95bf948a657d75d2cef0df81b614bc6052284935774d4d8551d95")

@ -7,6 +7,7 @@ package("simsimd")
add_urls("https://github.com/ashvardanian/SimSIMD/archive/refs/tags/$(version).tar.gz", add_urls("https://github.com/ashvardanian/SimSIMD/archive/refs/tags/$(version).tar.gz",
"https://github.com/ashvardanian/SimSIMD.git") "https://github.com/ashvardanian/SimSIMD.git")
add_versions("v6.1.1", "994d278ee5db99794d8acd03380dc7c50c53fb9d0e2c20ad1e34a42d81c6e07a")
add_versions("v6.0.5", "d8366bc43bf60187ee04563af81a940ef28cff95643bb01b1c6bc6f11772881c") add_versions("v6.0.5", "d8366bc43bf60187ee04563af81a940ef28cff95643bb01b1c6bc6f11772881c")
add_versions("v5.9.6", "657a3571f2be4f5f4f39719d6a37ef3ae9f627e899bf7c2672ca850372c39f21") add_versions("v5.9.6", "657a3571f2be4f5f4f39719d6a37ef3ae9f627e899bf7c2672ca850372c39f21")
add_versions("v5.6.4", "cc337970f16cf4d3997a62165fb4ec565ca5798bc24e7d9643972fd7307ea9b6") add_versions("v5.6.4", "cc337970f16cf4d3997a62165fb4ec565ca5798bc24e7d9643972fd7307ea9b6")

@ -12,6 +12,8 @@ package("urdfdom")
add_patches("1.0.4", path.join(os.scriptdir(), "patches", "1.0.4", "build.patch"), "1f51148afccef7b9bf079ef4137c12d578fb7a76f7aed6e282ca2ceaf4a188ba") add_patches("1.0.4", path.join(os.scriptdir(), "patches", "1.0.4", "build.patch"), "1f51148afccef7b9bf079ef4137c12d578fb7a76f7aed6e282ca2ceaf4a188ba")
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
add_deps("cmake") add_deps("cmake")
add_deps("urdfdom-headers", "console-bridge") add_deps("urdfdom-headers", "console-bridge")
on_load("windows", "linux", "macosx", function (package) on_load("windows", "linux", "macosx", function (package)

@ -172,7 +172,7 @@ function generate_package(reponame, get_data)
deps = {}, deps = {},
priority = 1, priority = 1,
install = function(configs, package) install = function(configs, package)
return [=[ return ([=[
io.writefile("xmake.lua", [[ io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug") add_rules("mode.release", "mode.debug")
target("%s") target("%s")
@ -180,7 +180,7 @@ function generate_package(reponame, get_data)
add_files("src/*.c") add_files("src/*.c")
add_headerfiles("src/(*.h)") add_headerfiles("src/(*.h)")
]]) ]])
import("package.tools.xmake").install(package)]=] import("package.tools.xmake").install(package)]=]):format(packagename)
end, end,
}, },
["CMakeLists.txt"] = { ["CMakeLists.txt"] = {

Loading…
Cancel
Save