Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[53_14] Upgrade to tbox 1.7.6 #2131

Merged
merged 2 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions xmake/packages/t/tbox/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package("tbox")

set_homepage("https://tboox.org")
set_description("A glib-like multi-platform c library")

add_urls("https://gitee.com/tboox/tbox.git")
add_urls("https://github.com/tboox/tbox.git")

add_versions("v1.7.6", "v1.7.6")

add_configs("micro", {description = "Compile micro core library for the embed system.", default = false, type = "boolean"})
add_configs("float", {description = "Enable or disable the float type.", default = true, type = "boolean"})
add_configs("force-utf8", {description = "Forcely regard all tb_char* as utf-8.", default = false, type = "boolean"})
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
add_configs(name, {description = "Enable the " .. name .. " module.", default = false, type = "boolean"})
end
for _, name in ipairs({"zlib", "mysql", "sqlite3", "openssl", "polarssl", "mbedtls", "pcre2", "pcre"}) do
add_configs(name, {description = "Enable the " .. name .. " package.", default = false, type = "boolean"})
end

if is_plat("windows") then
add_syslinks("ws2_32", "user32", "kernel32")
elseif is_plat("mingw") then
add_syslinks("ws2_32", "pthread")
elseif is_plat("macosx", "iphoneos") then
add_frameworks("Foundation", "CoreServices", "CoreFoundation")
elseif is_plat("linux") then
add_syslinks("pthread", "m", "dl")
elseif is_plat("bsd") then
add_syslinks("execinfo", "pthread", "m", "dl")
elseif not is_plat("android") then
add_syslinks("pthread")
end

on_load(function (package)
if package:debug() then
package:add("defines", "__tb_debug__")
end
for _, dep in ipairs({"mbedtls", "openssl", "sqlite3", "pcre2", "pcre", "mysql", "zlib"}) do
if package:config(dep) then
package:add("deps", dep)
end
end
end)

on_install(function (package)
local configs = {demo = false}
if package:config("micro") then
configs.micro = true
end
if not package:config("float") then
configs["float"] = false
end
if package:config("force-utf8") then
configs["force-utf8"] = true
end
for _, name in ipairs({"xml", "zip", "hash", "regex", "object", "charset", "database", "coroutine"}) do
if package:config(name) then
configs[name] = true
end
end
for _, name in ipairs({"zlib", "mysql", "sqlite3", "openssl", "polarssl", "mbedtls", "pcre2", "pcre"}) do
if package:config(name) then
configs[name] = true
end
end
import("package.tools.xmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("tb_exit", {includes = "tbox/tbox.h", configs = {languages = "c99"}}))
end)
3 changes: 1 addition & 2 deletions xmake/vars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ STABLE_VERSION = TEXMACS_VERSION
STABLE_RELEASE = 1

-- XmacsLabs dependencies
TBOX_VERSION = "1.7.5"
TBOX_VERSION = "1.7.6"
LOLLY_VERSION = "1.4.26"

-- Third-party dependencies
Expand All @@ -29,7 +29,6 @@ TREESITTER_CPP_VERSION = "0.22.2"
TREESITTER_SCHEME_VERSION = "0.6.2"
QT6_VERSION = "6.5.3"
QTIFW_VERSION = "4.6.0"
TBOX_VERSION = "1.7.5"
CPR_VERSION = "1.10.5"
CURL_VERSION = "8.4.0"
PDFHUMMUS_VERSION = "4.6.2"
Expand Down
Loading