Skip to content

Commit

Permalink
Merge branch 'dev' into xtd
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahahbenny committed Oct 28, 2024
2 parents fe30c0d + 2f65a92 commit 106a646
Show file tree
Hide file tree
Showing 29 changed files with 456 additions and 115 deletions.
1 change: 1 addition & 0 deletions packages/a/aws-c-cal/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-cal")
add_urls("https://github.com/awslabs/aws-c-cal/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-cal.git")

add_versions("v0.8.0", "3803311ee7c73446a35466199084652ec5f76dedcf20452ebdbba8ed34d4230d")
add_versions("v0.7.4", "8020ecbe850ceb402aa9c81a1ef34e3becdbcb49587a1b19eb5c7e040f369b58")
add_versions("v0.7.2", "265938e3f1d2baa6a555ec6b0a27c74d3f505cbe7c96f7539ada42d5a848dee9")
add_versions("v0.7.1", "2fbdc04d72d1f3af28b80fe3917f03f20c0a62bc22b6c7b3450486ee9cbe77f6")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-event-stream/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-event-stream")
add_urls("https://github.com/awslabs/aws-c-event-stream/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-event-stream.git")

add_versions("v0.5.0", "3a53a9d05f9e2fd06036a12854a8b4f05a0c4858bb5b8df8a30edba9de8532b5")
add_versions("v0.4.3", "d7d82c38bae68d2287ac59972a76b2b6159e7a3d7c9b7edb1357495aa4d0c0de")
add_versions("v0.4.2", "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee")
add_versions("v0.4.1", "f8915fba57c86148f8df4c303ca6f31de6c23375de554ba8d6f9aef2a980e93e")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-http/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-http")
add_urls("https://github.com/awslabs/aws-c-http/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-http.git")

add_versions("v0.9.0", "ffba3a208e605ed247a130e2986f9d524283faf85f26da3452aac878ecefdfa2")
add_versions("v0.8.10", "f878802a4e0bcefadce9959ce443acaf77607a68d138f9d3db04a5a878f1a871")
add_versions("v0.8.7", "173ed7634c87485c2defbd9a96a246a79ec3f3659b28b235ac38e6e92d67392a")
add_versions("v0.8.2", "a76ba75e59e1ac169df3ec00c0d1c453db1a4db85ee8acd3282a85ee63d6b31c")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-io/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-io")
add_urls("https://github.com/awslabs/aws-c-io/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-io.git")

add_versions("v0.15.0", "a8fbc39721395c12fd66bf2ce39b4cac24df395b35700b9ae718a7923d229df4")
add_versions("v0.14.19", "127aa30608084affbcc0b7b26982ab4d98404d1aa103b91693d0e76b564da21d")
add_versions("v0.14.18", "44e9dee181ed7d867d1cc2944f4b4669259b569fc56bdd6dd4c7c30440fc4bf8")
add_versions("v0.14.16", "bf78ab5dbeeaec2f55cb035e18c49ce8ba4e2ea7519e8b94e18ccd8851e39f4d")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-checksums/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-checksums")
add_urls("https://github.com/awslabs/aws-checksums/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-checksums.git")

add_versions("v0.2.0", "aae619de7fb5908a52223eae3b80fae70260eed5919ad4c385b2d5a144a641f0")
add_versions("v0.1.20", "12f80085993662b6d2cbd2d090b49b4350d19396b1d218d52323712cc8dee252")
add_versions("v0.1.19", "844e5a4f659f454112c559d4f4043b7accfbb134e47a55f4c55f79d9c71bdab1")
add_versions("v0.1.18", "bdba9d0a8b8330a89c6b8cbc00b9aa14f403d3449b37ff2e0d96d62a7301b2ee")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-lc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package("aws-lc")
add_urls("https://github.com/aws/aws-lc/archive/refs/tags/$(version).tar.gz",
"https://github.com/aws/aws-lc.git")

add_versions("v1.37.0", "d5ba1bd922247ce8bdd9139289bf5a021237b121e1f29a323c0ef1730cb1ed07")
add_versions("v1.34.2", "4958ac76edd53ced46d3a064cb58be8bd11e4937bcc3857623d319c2894d0904")
add_versions("v1.32.0", "67fbb78659055c2289c9068bb4ca1c0f1b6ca27700c7f6d34c6bc2f27cd46314")

Expand Down
1 change: 1 addition & 0 deletions packages/c/cpp-httplib/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package("cpp-httplib")
set_urls("https://github.com/yhirose/cpp-httplib/archive/refs/tags/$(version).tar.gz",
"https://github.com/yhirose/cpp-httplib.git")

add_versions("v0.18.1", "405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00")
add_versions("v0.17.3", "95bd6dba4241656c59d6f0854d408d14c220f7c71e673319ee27d30aee741aaa")
add_versions("v0.17.0", "dd3ba355b6aa74b7a0bff982ad0de7af6d9672fd83af30aa84eb707974d2a903")
add_versions("v0.16.3", "c1742fc7179aaae2a67ad9bba0740b7e9ffaf4f5e62feef53101ecdef1478716")
Expand Down
1 change: 1 addition & 0 deletions packages/g/gdal/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package("gdal")
set_license("MIT")

add_urls("https://github.com/OSGeo/gdal/releases/download/v$(version)/gdal-$(version).tar.gz")
add_versions("3.9.3", "f293d8ccc6b98f617db88f8593eae37f7e4b32d49a615b2cba5ced12c7bebdae")
add_versions("3.9.2", "c9767e79ca7245f704bfbcb47d771b2dc317d743536b78d648c3e92b95fbc21e")
add_versions("3.9.1", "46cd95ad0f270af0cd317ddc28fa5e0a7ad0b0fd160a7bd22909150df53e3418")
add_versions("3.9.0", "3b29b573b60d156cf160805290474b625c4197ca36a79fd14f83ec8f77f29ba0")
Expand Down
74 changes: 67 additions & 7 deletions packages/g/gperftools/xmake.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,90 @@ package("gperftools")
set_description("gperftools is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools.")
set_license("BSD-3-Clause")

add_urls("https://github.com/gperftools/gperftools/archive/refs/tags/gperftools-$(version).tar.gz")
add_urls("https://github.com/gperftools/gperftools/archive/refs/tags/gperftools-$(version).tar.gz",
"https://github.com/gperftools/gperftools.git")

add_versions("2.16", "737be182b4e42f5c7f595da2a7aa59ce0489a73d336d0d16847f2aa52d5221b4")
add_versions("2.15", "3918ff2e21bb3dbb5a801e1daf55fb20421906f7c42fbb482bede7bdc15dfd2e")
add_versions("2.14", "ab456a74af2f57a3ee6c20462f73022d11f7ffc22e470fc06dec39692c0ee5f3")
add_versions("2.13", "fd43adbe0419cb0eaaa3e439845cc89fe7d42c22eff7fd2d6b7e87ae2acbce1d")
add_versions("2.12", "1cc42af8c0ec117695ecfa49ef518d9eaf7b215a2657b51f655daa2dc07101ce")
add_versions("2.11", "b0d32b3d82da0ddac2a347412b50f97efddeae66dfbceb49455b7262fb965434")
add_versions("2.10", "b0dcfe3aca1a8355955f4b415ede43530e3bb91953b6ffdd75c45891070fe0f1")

add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = is_plat("windows")})
if is_plat("linux") then
add_extsources("pacman::gperftools", "apt::libgoogle-perftools-dev")
elseif is_plat("macosx") then
add_extsources("brew::gperftools")
end

add_configs("minimal", {description = "Build only tcmalloc-minimal (and maybe tcmalloc-minimal-debug)", default = is_plat("windows", "mingw"), type = "boolean"})
add_configs("tcmalloc", {description = "Use tcmalloc", default = true, type = "boolean"})
add_configs("profiler", {description = "Use profiler", default = true, type = "boolean"})
if is_plat("linux") then
add_configs("unwind", {description = "Enable libunwind support.", default = false, type = "boolean"})
end

add_deps("cmake")

on_load("linux", function (package)
if package:config("unwind") then
if on_check then
on_check("windows", "mingw", function (package)
assert(package:config("minimal"), "package(gperftools): only tcmalloc_minimal is supported on Windows or MinGW")
if package:is_plat("windows") then
assert(package:version():ge("2.16") or package:version():eq("2.10"), "package(gperftools): requires version = 2.10 or >= 2.16 for Windows")
else
assert(package:version():ge("2.16"), "package(gperftools): requires version >= 2.16 for MinGW")
end
end)
on_check("macosx", function (package)
if not package:version():ge("2.14") then
if not (package:version():eq("2.10") and macos.version():le("12")) then
raise("package(gperftools): requires version >= 2.14 for macOS")
end
end
end)
end

on_load(function (package)
if package:is_plat("linux") and package:config("unwind") then
package:add("deps", "libunwind")
end

if package:config("tcmalloc") then
local libsuffix = package:config("minimal") and "_minimal" or ""
libsuffix = package:is_debug() and libsuffix .. "_debug" or libsuffix
package:add("links", "tcmalloc" .. libsuffix)
end

if package:config("profiler") then
package:add("links", "profiler")
end
end)

on_install("windows", "macosx", "linux", function (package)
on_install("windows|!arm64", "macosx", "linux", "mingw", function (package)
local configs = {"-DBUILD_TESTING=OFF", "-Dgperftools_build_benchmark=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, "-DGPERFTOOLS_BUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-Dgperftools_build_minimal=" .. (package:config("minimal") and "ON" or "OFF"))
if package:is_plat("linux") then
table.insert(configs, "-Dgperftools_enable_libunwind=" .. (package:config("unwind") and "ON" or "OFF"))
end
import("package.tools.cmake").install(package, configs)

io.replace("CMakeLists.txt", "if(MINGW OR MSVC)", "if(MINGW OR MSVC)\nlink_libraries(psapi synchronization shlwapi)", {plain = true})
io.replace("src/windows/port.h", "inline int nanosleep", "extern \"C\" inline int nanosleep", {plain = true})

if package:version():le("2.15") then
import("package.tools.cmake").install(package, configs)
else
import("package.tools.cmake").build(package, configs, {buildir = "build"})

os.trycp("build/gperftools", package:installdir("include"))
os.trycp("build/**.a", package:installdir("lib"))
os.trycp("build/**.dylib", package:installdir("lib"))
os.trycp("build/**.so", package:installdir("lib"))
os.trycp("build/**.lib", package:installdir("lib"))
os.trycp("build/**.dll", package:installdir("bin"))
end
end)

on_test(function (package)
Expand Down
28 changes: 28 additions & 0 deletions packages/g/gsound/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package("gsound")

set_homepage("https://wiki.gnome.org/Projects/GSound")
set_description("GSound is a small library for playing system sounds.")
set_license("LGPL-2.1")

add_urls("https://gitlab.gnome.org/GNOME/gsound/-/archive/1.0.3/gsound-1.0.3.tar.gz")
add_versions("1.0.3", "ebee33c77f43bcae87406c20e051acaff08e86f8960c35b92911e243fddc7a0b")

if is_plat("linux") then
add_syslinks("pthread", "dl")
end

on_load(function (package)
package:add("deps", "glib", { configs = {shared = package:config("shared")} })
package:add("deps", "libcanberra", { configs = {shared = package:config("shared")} })
end)
add_deps("meson", "ninja")

on_install("linux", function (package)
local configs = {"-Denable_vala=false", "-Dgtk_doc=false", "-Dintrospection=false"}
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
import("package.tools.meson").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("gsound_context_new", {includes = "gsound-context.h"}))
end)
56 changes: 31 additions & 25 deletions packages/i/imguizmo/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,42 @@ package("imguizmo")

set_homepage("https://github.com/CedricGuillemet/ImGuizmo")
set_description("Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui")
set_license("MIT")

add_urls("https://github.com/CedricGuillemet/ImGuizmo.git")
add_versions("1.83", "664cf2d73864a36b2a8b5091d33fc4578c885eca")
add_versions("1.89+WIP", "82e2465b8d029e2d85002905cc4ed5087e2119fe")


add_deps("imgui")
add_versions("1.89+wip", "82e2465b8d029e2d85002905cc4ed5087e2119fe")
add_versions("1.91.3+wip", "bcdd86bb8a8019b373e46921c52ef7f2fdaa8b16")

on_load(function (package)
if package:version():lt("1.90") then
package:add("deps", "imgui <=1.89.3")
else
package:add("deps", "imgui")
end
end)

on_install("macosx", "linux", "windows", "mingw", "android", "iphoneos", function (package)
local imgui = package:dep("imgui")
local configs = imgui:requireinfo().configs
if configs then
configs = string.serialize(configs, {strip = true, indent = false})
end
local xmake_lua = ([[
add_rules("mode.debug", "mode.release")
set_languages("c++14")
add_requires("imgui %s", {configs = %s})
target("imguizmo")
set_kind("static")
add_files("*.cpp")
add_headerfiles("*.h")
add_packages("imgui")
]]):format(imgui:version_str(), configs)
io.writefile("xmake.lua", xmake_lua)
import("package.tools.xmake").install(package)
end)
local imgui = package:dep("imgui")
local configs = imgui:requireinfo().configs
if configs then
configs = string.serialize(configs, {strip = true, indent = false})
end
local xmake_lua = ([[
add_rules("mode.debug", "mode.release")
set_languages("c++14")
add_requires("imgui %s", {configs = %s})
target("imguizmo")
set_kind("static")
add_files("*.cpp")
add_headerfiles("*.h")
add_packages("imgui")
]]):format(imgui:version_str(), configs)
io.writefile("xmake.lua", xmake_lua)
import("package.tools.xmake").install(package)
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
Expand All @@ -40,4 +47,3 @@ package("imguizmo")
}
]]}, {configs = {languages = "c++11"}, includes = {"imgui.h", "ImGuizmo.h"}}))
end)

43 changes: 43 additions & 0 deletions packages/l/libcanberra/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package("libcanberra")

set_homepage("https://0pointer.de/lennart/projects/libcanberra/")
set_description("libcanberra is an implementation of the XDG Sound Theme and Name Specifications")
set_license("LGPL-2.1")

add_urls("http://0pointer.de/lennart/projects/libcanberra/libcanberra-$(version).tar.xz")
add_versions("0.30", "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72")

add_deps("libtool", {kind = "library"})
add_deps("autoconf", "automake", "m4")
add_deps("libogg", "alsa-lib")

if is_plat("linux") then
add_syslinks("dl")
end

add_links("canberra", "canberra-null", "canberra-alsa", "canberra-oss", "canberra-pulse", "canberra-multi")

add_linkdirs("lib", "lib/libcanberra-0.30")

add_includedirs("include")

on_load(function (package)
if package:config("shared") then
package:add("deps", "libvorbis", {configs = {shared = true}})
else
package:add("deps", "libvorbis")
end
end)

on_install("linux", function (package)
local configs = {"--disable-dependency-tracking", "--disable-lynx"}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
table.insert(configs, "--with-systemdsystemunitdir=" .. package:installdir("system_servise"))
table.insert(configs, "LIBS=" .. "-lltdl -ldl")
import("package.tools.autoconf").install(package, configs, {packagedeps= {"libtool", "libvorbis"}})
end)

on_test(function (package)
assert(package:has_cfuncs("ca_context_create", {includes = "canberra.h"}))
end)
1 change: 1 addition & 0 deletions packages/l/libdeflate/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("libdeflate")
add_urls("https://github.com/ebiggers/libdeflate/archive/refs/tags/$(version).tar.gz",
"https://github.com/ebiggers/libdeflate.git")

add_versions("v1.22", "7f343c7bf2ba46e774d8a632bf073235e1fd27723ef0a12a90f8947b7fe851d6")
add_versions("v1.21", "50827d312c0413fbd41b0628590cd54d9ad7ebf88360cba7c0e70027942dbd01")
add_versions("v1.20", "ed1454166ced78913ff3809870a4005b7170a6fd30767dc478a09b96847b9c2a")
add_versions("v1.8", "50711ad4e9d3862f8dfb11b97eb53631a86ee3ce49c0e68ec2b6d059a9662f61")
Expand Down
79 changes: 79 additions & 0 deletions packages/l/libssh/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package("libssh")
set_homepage("https://www.libssh2.org/")
set_description("C library implementing the SSH2 protocol")
set_license("BSD-3-Clause")

add_urls("https://git.libssh.org/projects/libssh.git",
"https://gitlab.com/libssh/libssh-mirror.git")

add_urls("https://gitlab.com/libssh/libssh-mirror/-/archive/libssh-$(version)/libssh-mirror-libssh-$(version).tar.bz2", {alias = "gitlab"})
add_urls("https://www.libssh.org/files/$(version).tar.xz", {
alias = "home",
version = function (version)
return format("%d.%d/libssh-%s", version:major(), version:minor(), version)
end
})

add_versions("home:0.11.1", "14b7dcc72e91e08151c58b981a7b570ab2663f630e7d2837645d5a9c612c1b79")

add_versions("gitlab:0.11.1", "7d0d064b7d44420036f410d4dd3f05ad6ada61d21314d1e9d424a2e9970d1b68")

add_configs("zlib", {description = "Build with zlib", default = false, type = "boolean"})
add_configs("backend", {description = "Select crypto backend.", default = (is_plat("wasm", "iphoneos") and "mbedtls" or "openssl"), type = "string", values = {"openssl", "mbedtls", "libgcrypt"}})

if is_plat("windows", "mingw") then
add_syslinks("iphlpapi", "shell32")
elseif is_plat("linux", "bsd") then
add_syslinks("pthread")
end

add_deps("cmake")

on_load(function (package)
if package:config("zlib") then
package:add("deps", "zlib")
end
package:add("deps", package:config("backend"))

if package:is_plat("windows", "mingw") and not package:config("shared") then
package:add("defines", "LIBSSH_STATIC")
end
end)

on_install("!android", function (package)
io.replace("src/CMakeLists.txt", "iphlpapi", "iphlpapi\ncrypt32", {plain = true})

local configs = {
"-DWITH_EXAMPLES=OFF",
"-DWITH_GSSAPI=OFF",
"-DWITH_NACL=OFF",
}
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"))

local backend = package:config("backend")
table.insert(configs, "-DWITH_ZLIB=" .. (package:config("zlib") and "ON" or "OFF"))
table.insert(configs, "-DWITH_MBEDTLS=" .. (backend == "mbedtls" and "ON" or "OFF"))
table.insert(configs, "-DWITH_GCRYPT=" .. (backend == "libgcrypt" and "ON" or "OFF"))

local openssl = package:dep("openssl")
if openssl then
if not openssl:is_system() then
table.insert(configs, "-DOPENSSL_ROOT_DIR=" .. openssl:installdir())
end
end

if package:is_plat("windows") then
os.mkdir(path.join(package:buildir(), "src/pdb"))
end
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(), "src/*.pdb"), dir)
end
end)

on_test(function (package)
assert(package:has_cfuncs("ssh_init", {includes = "libssh/libssh.h"}))
end)
Loading

0 comments on commit 106a646

Please sign in to comment.