From 8622df1fc36b9108a2417c926fc4fdfc3f88797e Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 8 Feb 2025 14:08:40 +0800 Subject: [PATCH] rename libsdl2 deps --- packages/b/blah/xmake.lua | 4 ++-- packages/c/centurion/xmake.lua | 10 +++++----- packages/c/cimgui/port/xmake.lua | 4 ++-- packages/c/cimgui/xmake.lua | 4 ++-- packages/j/johnnyengine/xmake.lua | 4 ++-- packages/m/magnum/xmake.lua | 2 +- packages/p/pdcurses/xmake.lua | 10 +++++----- packages/p/pdcursesmod/xmake.lua | 14 +++++++------- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/b/blah/xmake.lua b/packages/b/blah/xmake.lua index 64fd38c9e41..02a734eaa3a 100644 --- a/packages/b/blah/xmake.lua +++ b/packages/b/blah/xmake.lua @@ -7,7 +7,7 @@ package("blah") add_versions("2023.01.03", "a0cccca457cfb91213fae6e4e994d1c181c358fe") add_deps("cmake") - add_deps("libsdl >=2.26") + add_deps("libsdl2 >=2.26") if is_plat("macosx") then add_frameworks("ForceFeedback", "CoreVideo", "CoreGraphics", "CoreFoundation", "Foundation", "AppKit", "IOKit") @@ -21,7 +21,7 @@ package("blah") 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")) io.replace("CMakeLists.txt", "if (NOT DEFINED BLAH_SDL2_LIBS)", "IF(FALSE)", {plain = true}) - import("package.tools.cmake").build(package, configs, {buildir = "build", packagedeps = "libsdl"}) + import("package.tools.cmake").build(package, configs, {buildir = "build", packagedeps = "libsdl2"}) os.cp("include", package:installdir()) os.trycp("build/*.a", package:installdir("lib")) os.trycp("build/*.so", package:installdir("lib")) diff --git a/packages/c/centurion/xmake.lua b/packages/c/centurion/xmake.lua index 2e576c3bfd0..e37d6e77fb8 100644 --- a/packages/c/centurion/xmake.lua +++ b/packages/c/centurion/xmake.lua @@ -28,8 +28,8 @@ package("centurion") add_includedirs("include", "include/SDL2") on_load(function (package) - package:add("deps", "libsdl", { configs = { shared = package:config("shared") } }) - + package:add("deps", "libsdl2", { configs = { shared = package:config("shared") } }) + if not package:config("pragma_once") then package:add("defines", "CENTURION_NO_PRAGMA_ONCE") end @@ -38,17 +38,17 @@ package("centurion") end if package:config("sdl_image") then - package:add("deps", "libsdl_image", { configs = { shared = package:config("shared") } }) + package:add("deps", "libsdl2_image", { configs = { shared = package:config("shared") } }) else package:add("defines", "CENTURION_NO_SDL_IMAGE") end if package:config("sdl_mixer") then - package:add("deps", "libsdl_mixer", { configs = { shared = package:config("shared") } }) + package:add("deps", "libsdl2_mixer", { configs = { shared = package:config("shared") } }) else package:add("defines", "CENTURION_NO_SDL_MIXER") end if package:config("sdl_ttf") then - package:add("deps", "libsdl_ttf", { configs = { shared = package:config("shared") } }) + package:add("deps", "libsdl2_ttf", { configs = { shared = package:config("shared") } }) else package:add("defines", "CENTURION_NO_SDL_TTF") end diff --git a/packages/c/cimgui/port/xmake.lua b/packages/c/cimgui/port/xmake.lua index 5931e7804cf..bef1bd1b138 100644 --- a/packages/c/cimgui/port/xmake.lua +++ b/packages/c/cimgui/port/xmake.lua @@ -14,7 +14,7 @@ if has_config("glfw") then end if has_config("sdl2") then - add_requires("libsdl") + add_requires("libsdl2") end if has_config("vulkan") then @@ -63,7 +63,7 @@ target("cimgui") add_files("imgui/backends/imgui_impl_sdl.cpp") add_headerfiles("imgui/(backends/imgui_impl_sdl.h)") end - add_packages("libsdl") + add_packages("libsdl2") end if has_config("vulkan") then diff --git a/packages/c/cimgui/xmake.lua b/packages/c/cimgui/xmake.lua index 845896e1356..b0b295af2b9 100644 --- a/packages/c/cimgui/xmake.lua +++ b/packages/c/cimgui/xmake.lua @@ -27,7 +27,7 @@ package("cimgui") on_load(function (package) if package:config("sdl2") then - package:add("deps", "libsdl") + package:add("deps", "libsdl2") package:add("defines", "CIMGUI_USE_SDL2") end if package:config("opengl2") then @@ -49,7 +49,7 @@ package("cimgui") end end) - on_install("windows|x64", "windows|x86", "linux", "macosx", function (package) + on_install("windows|x64", "windows|x86", "linux|!arm64", "macosx|!arm64", function (package) os.vrun("git -c core.fsmonitor=false submodule foreach --recursive git checkout " .. package:config("imgui")) local envs = {} diff --git a/packages/j/johnnyengine/xmake.lua b/packages/j/johnnyengine/xmake.lua index f25fd5d58b3..8c18119cbff 100644 --- a/packages/j/johnnyengine/xmake.lua +++ b/packages/j/johnnyengine/xmake.lua @@ -8,9 +8,9 @@ package("johnnyengine") add_versions("1.0.1", "53c11b827bea6fe30f9bca27adbd712eec85a0853c0402407930bae78ad54a8f") add_patches("1.0.1", path.join(os.scriptdir(), "patches", "1.0.1", "win32_shared_fix.patch"), "fbe22cb5a9f0485982c7755936d14de6da3ce80a42394d48946b14b922847611") - add_deps("glew", "libsdl", "libsdl_ttf", "libsdl_mixer", "libsdl_gfx", "box2d", "assimp", "stb", "tmxparser") + add_deps("glew", "libsdl2", "libsdl2_ttf", "libsdl2_mixer", "libsdl2_gfx", "box2d", "assimp", "stb", "tmxparser") - on_install("windows", "linux", "macosx", function (package) + on_install("windows|x86", "windows|x64", "linux", "macosx", function (package) import("package.tools.xmake").install(package, {kind = (package:config("shared") and "shared" or "static")}) end) diff --git a/packages/m/magnum/xmake.lua b/packages/m/magnum/xmake.lua index 26aec78356e..18d3e597c9d 100644 --- a/packages/m/magnum/xmake.lua +++ b/packages/m/magnum/xmake.lua @@ -57,7 +57,7 @@ package("magnum") package:add("deps", "glfw") end if package:config("sdl2") then - package:add("deps", "libsdl", {configs = {sdlmain = false}}) + package:add("deps", "libsdl2", {configs = {sdlmain = false}}) end if package:config("glx") then package:add("deps", "libx11") diff --git a/packages/p/pdcurses/xmake.lua b/packages/p/pdcurses/xmake.lua index 403fd5d9804..e8408ba3854 100644 --- a/packages/p/pdcurses/xmake.lua +++ b/packages/p/pdcurses/xmake.lua @@ -14,18 +14,18 @@ package("pdcurses") on_load(function (package) if package:config("port") == "sdl2" then - package:add("deps", "libsdl") + package:add("deps", "libsdl2") else package:add("syslinks", "user32", "advapi32") end end) - + on_install("linux", "macosx", "mingw", "windows", function (package) io.writefile("xmake.lua", [[ add_rules("mode.debug", "mode.release") option("port", {description = "Set the target port."}) if is_config("port", "sdl2") then - add_requires("libsdl") + add_requires("libsdl2") end target("pdcurses") set_kind("$(kind)") @@ -35,10 +35,10 @@ package("pdcurses") if is_config("port", "wincon") then add_defines("PDC_WIDE", "PDC_FORCE_UTF8") end - add_packages("libsdl") + add_packages("libsdl2") ]]) local configs = {} - if package:config("shared") then + if package:config("shared") then configs.kind = "shared" end configs.port = package:config("port") diff --git a/packages/p/pdcursesmod/xmake.lua b/packages/p/pdcursesmod/xmake.lua index a8f7e3e8583..25f29227fe0 100644 --- a/packages/p/pdcursesmod/xmake.lua +++ b/packages/p/pdcursesmod/xmake.lua @@ -20,9 +20,9 @@ package("pdcursesmod") on_load(function (package) if package:config("port") == "sdl2" then - package:add("deps", "libsdl") + package:add("deps", "libsdl2") if package:config("utf8") then - package:add("deps", "libsdl_ttf") + package:add("deps", "libsdl2_ttf") end end if package:config("utf8") then @@ -32,7 +32,7 @@ package("pdcursesmod") package:add("defines", "PDC_DLL_BUILD") end end) - + on_install("linux", "macosx", "mingw", "windows", function (package) io.writefile("xmake.lua", [[ add_rules("mode.debug", "mode.release") @@ -40,9 +40,9 @@ package("pdcursesmod") option("utf8", {description = "Treat all narrow characters as UTF-8."}) add_defines("PDC_WIDE", "PDC_FORCE_UTF8") if is_config("port", "sdl2") then - add_requires("libsdl") + add_requires("libsdl2") if has_config("utf8") then - add_requires("libsdl_ttf") + add_requires("libsdl2_ttf") end end target("pdcursesmod") @@ -53,13 +53,13 @@ package("pdcursesmod") if is_kind("shared") then add_defines("PDC_DLL_BUILD") end - add_packages("libsdl", "libsdl_ttf") + add_packages("libsdl2", "libsdl2_ttf") if is_plat("windows", "mingw") then add_syslinks("user32", "advapi32", "winmm") end ]]) local configs = {} - if package:config("shared") then + if package:config("shared") then configs.kind = "shared" end configs.port = package:config("port")