From cfb1d9acf2a92677fe7747160f10b2688fa813e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 4 Apr 2024 01:46:27 +0200 Subject: [PATCH] Update libsdl to 2.30.2 and libffi to 3.4.6 (#3666) * Update libsdl to 2.30.2 * Update libffi to 3.4.6 * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua --- packages/l/libffi/port/xmake.lua | 15 +++++++++++---- packages/l/libffi/xmake.lua | 8 +++++++- packages/l/libsdl/xmake.lua | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/l/libffi/port/xmake.lua b/packages/l/libffi/port/xmake.lua index f86dbc20c..038289cfc 100644 --- a/packages/l/libffi/port/xmake.lua +++ b/packages/l/libffi/port/xmake.lua @@ -53,9 +53,7 @@ else end set_configvar("TARGET", targetarch) -includes("check_cfuncs.lua") -includes("check_cincludes.lua") -includes("check_csnippets.lua") +includes("@builtin/check") set_configvar("STDC_HEADERS", 1) set_configvar("LT_OBJDIR", ".libs/") @@ -125,6 +123,9 @@ target("ffi") if is_plat("windows") and is_kind("shared") then add_defines("FFI_BUILDING_DLL") end + if is_kind("static") then + add_defines("FFI_STATIC_BUILD") + end set_configdir("include") add_configfiles("fficonfig.h.in") add_configfiles("include/ffi.h.in", {pattern = "@(.-)@"}) @@ -166,7 +167,13 @@ target("ffi") elseif is_arch("riscv") then add_files("src/riscv/ffi.c", "src/riscv/sysv.S") add_headerfiles("src/riscv/ffitarget.h") + elseif is_arch("wasm32") then + add_files("src/wasm32/ffi.c") + add_headerfiles("src/wasm32/ffitarget.h") end before_build(function (target) - io.replace("include/ffi.h", "!defined FFI_BUILDING", target:is_static() and "0" or "1", {plain = true}) + import("core.base.semver") + if semver.compare(target:version(), "v3.4.4") <= 0 then + io.replace("include/ffi.h", "!defined FFI_BUILDING", target:is_static() and "0" or "1", {plain = true}) + end end) diff --git a/packages/l/libffi/xmake.lua b/packages/l/libffi/xmake.lua index 894da0781..9647c6d88 100644 --- a/packages/l/libffi/xmake.lua +++ b/packages/l/libffi/xmake.lua @@ -1,5 +1,4 @@ package("libffi") - set_homepage("https://sourceware.org/libffi/") set_description("Portable Foreign Function Interface library.") set_license("MIT") @@ -10,6 +9,7 @@ package("libffi") add_versions("3.3", "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056") add_versions("3.4.2", "540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620") add_versions("3.4.4", "d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676") + add_versions("3.4.6", "b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e") if is_plat("linux") then add_extsources("apt::libffi-dev", "pacman::libffi") @@ -17,6 +17,12 @@ package("libffi") add_extsources("brew::libffi") end + on_load("windows", function (package) + if not package:config("shared") then + package:add("defines", "FFI_STATIC_BUILD") + end + end) + on_load("macosx", "linux", "bsd", "mingw", function (package) if package:gitref() then package:add("deps", "autoconf", "automake", "libtool") diff --git a/packages/l/libsdl/xmake.lua b/packages/l/libsdl/xmake.lua index b8c139df6..70c2e84fa 100644 --- a/packages/l/libsdl/xmake.lua +++ b/packages/l/libsdl/xmake.lua @@ -38,6 +38,7 @@ package("libsdl") add_versions("archive:2.28.5", "97bd14ee0ec67494d2b93f1a4f7da2bf891103c57090d96fdcc2b019d885c76a") add_versions("archive:2.30.0", "80b0c02b6018630cd40639ac9fc8e5c1d8eec14d8fe3e6dfa76343e3ba8b78d9") add_versions("archive:2.30.1", "c15ded54e9f32f8a1f9ed3e3dc072837a320ed23c5d0e95b7c18ecbe05c1187b") + add_versions("archive:2.30.2", "09a822abf6e97f80d09cf9c46115faebb3476b0d56c1c035aec8ec3f88382ae7") add_versions("github:2.0.8", "release-2.0.8") add_versions("github:2.0.12", "release-2.0.12") add_versions("github:2.0.14", "release-2.0.14") @@ -61,6 +62,7 @@ package("libsdl") add_versions("github:2.28.5", "release-2.28.5") add_versions("github:2.30.0", "release-2.30.0") add_versions("github:2.30.1", "release-2.30.1") + add_versions("github:2.30.2", "release-2.30.2") add_patches("2.30.0", path.join(os.scriptdir(), "patches", "2.30.0", "fix_mingw.patch"), "ab54eebc2e58d88653b257bc5b48a232c5fb0e6fad5d63661b6388215a7b0cd0")