diff --git a/repo/packages/a/aarch64-smart-musleabi/xmake.lua b/repo/packages/a/aarch64-smart-musleabi/xmake.lua index 506db46..387b683 100644 --- a/repo/packages/a/aarch64-smart-musleabi/xmake.lua +++ b/repo/packages/a/aarch64-smart-musleabi/xmake.lua @@ -26,15 +26,27 @@ do set_homepage("https://musl.cc/") set_description("aarch64 embedded compiler for rt-smart.") + local version = os.getenv("RT_XMAKE_TOOLCHAIN_AARCH64_VERSION") + local sha256 = os.getenv("RT_XMAKE_TOOLCHAIN_AARCH64_SHA256") + if is_host("windows") then - add_urls("http://117.143.63.254:9012/www/rt-smart/aarch64-linux-musleabi_for_i686-w64-mingw32_$(version).zip") + add_urls( + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/aarch64-linux-musleabi_for_i686-w64-mingw32_$(version).zip") - add_versions("188177", "01dae6cea76959e7a2684630ca1c295e71ca65a288b4787a6595e93d45edba1e") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("188177", "01dae6cea76959e7a2684630ca1c295e71ca65a288b4787a6595e93d45edba1e") + end elseif is_host("linux") then add_urls( - "http://117.143.63.254:9012/www/rt-smart/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") - add_versions("188177", "e4e2720c0269eb0b00231f865abe2340f1e994490dfbc3d8617eee48098dbc1d") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("188177", "e4e2720c0269eb0b00231f865abe2340f1e994490dfbc3d8617eee48098dbc1d") + end end on_install("@windows", "@linux|x86_64", function(package) diff --git a/repo/packages/a/arm-smart-musleabi/xmake.lua b/repo/packages/a/arm-smart-musleabi/xmake.lua index 60cdec0..fb5664a 100644 --- a/repo/packages/a/arm-smart-musleabi/xmake.lua +++ b/repo/packages/a/arm-smart-musleabi/xmake.lua @@ -12,7 +12,7 @@ -- -- Copyright (C) 2023-2023 RT-Thread Development Team -- --- @author xqyjlj +-- @author xqyjlj -- @file xmake.lua -- -- Change Logs: @@ -26,15 +26,27 @@ do set_homepage("https://musl.cc/") set_description("arm embedded compiler for rt-smart.") + local version = os.getenv("RT_XMAKE_TOOLCHAIN_ARM_VERSION") + local sha256 = os.getenv("RT_XMAKE_TOOLCHAIN_ARM_SHA256") + if is_host("windows") then - add_urls("http://117.143.63.254:9012/www/rt-smart/arm-linux-musleabi_for_i686-w64-mingw32_$(version).zip") + add_urls( + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/arm-linux-musleabi_for_i686-w64-mingw32_$(version).zip") - add_versions("174629", "c059a516917a5703456c8414eecb29f1456560ff60707c8a5b352f5ef58bdb72") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("174629", "c059a516917a5703456c8414eecb29f1456560ff60707c8a5b352f5ef58bdb72") + end elseif is_host("linux") then add_urls( - "http://117.143.63.254:9012/www/rt-smart/arm-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/arm-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") - add_versions("174629", "b187482fa807fbfd822eb79ee5a8c0e4e576ad3de4aa088d73b12e21c8de174a") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("174629", "b187482fa807fbfd822eb79ee5a8c0e4e576ad3de4aa088d73b12e21c8de174a") + end end on_install("@windows", "@linux|x86_64", function(package) diff --git a/repo/packages/r/riscv64gc-unknown-smart-musl/xmake.lua b/repo/packages/r/riscv64gc-unknown-smart-musl/xmake.lua index 05b56c5..13406b1 100644 --- a/repo/packages/r/riscv64gc-unknown-smart-musl/xmake.lua +++ b/repo/packages/r/riscv64gc-unknown-smart-musl/xmake.lua @@ -12,7 +12,7 @@ -- -- Copyright (C) 2023-2023 RT-Thread Development Team -- --- @author xqyjlj +-- @author xqyjlj -- @file xmake.lua -- -- Change Logs: @@ -26,16 +26,27 @@ do set_homepage("https://musl.cc/") set_description("riscv64 embedded compiler for rt-smart.") + local version = os.getenv("RT_XMAKE_TOOLCHAIN_RISCV64GC_VERSION") + local sha256 = os.getenv("RT_XMAKE_TOOLCHAIN_RISCV64GC_SHA256") + if is_host("windows") then add_urls( - "https://download.rt-thread.org/rt-smart/riscv64/riscv64-linux-musleabi_for_i686-w64-mingw32_$(version).zip") + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_i686-w64-mingw32_$(version).zip") - add_versions("180881", "7b385fe663559985d70936832dc0f6c017ce3bddbdbfaff673996cc3a20faf6c") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("180881", "7b385fe663559985d70936832dc0f6c017ce3bddbdbfaff673996cc3a20faf6c") + end elseif is_host("linux") then add_urls( - "https://download.rt-thread.org/rt-smart/riscv64/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") + "https://download-redirect.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_$(version).tar.bz2") - add_versions("180881", "21ad2cbd9b4e73e61efd8211b88c3989acaa033a374ac2f26b4e15a7ec7370b6") + if (version and sha256) then + add_versions(version, sha256) + else + add_versions("180881", "21ad2cbd9b4e73e61efd8211b88c3989acaa033a374ac2f26b4e15a7ec7370b6") + end end on_install("@windows", "@linux|x86_64", function(package) diff --git a/repo/packages/x/x86_64-linux-musl/xmake.lua b/repo/packages/x/x86_64-linux-musl/xmake.lua index 7e1d6c4..2bfe883 100644 --- a/repo/packages/x/x86_64-linux-musl/xmake.lua +++ b/repo/packages/x/x86_64-linux-musl/xmake.lua @@ -12,7 +12,7 @@ -- -- Copyright (C) 2023-2023 RT-Thread Development Team -- --- @author xqyjlj +-- @author xqyjlj -- @file xmake.lua -- -- Change Logs: @@ -27,10 +27,12 @@ do set_description("x86_64 cross compiler for linux.") if is_host("windows") then - add_urls("https://download.rt-thread.org/rt-smart/native/$(version)/x86_64-linux-musl-cross.win.zip") + add_urls( + "https://download-redirect.rt-thread.org/download/rt-smart/native/toolchains/x86_64-linux-musl-cross-$(version).win.zip") add_versions("20210202", "3a13f8bb3694b26ffbe3fe97d45db6cabadb662161cd5fc9cc80fc0adfb02091") elseif is_host("linux") then - add_urls("https://download.rt-thread.org/rt-smart/native/$(version)/x86_64-linux-musl-cross.linux.tgz") + add_urls( + "https://download-redirect.rt-thread.org/download/rt-smart/native/toolchains/x86_64-linux-musl-cross-$(version).linux.tgz") add_versions("20210202", "37ef7b69d4c4a20bb2c5e7e01ec7c60c1ac7de2c33b029eaa6c0d8b9e1869c6b") end