From cd83fb2bd143b2d67ef56b0b4f68694049cfe97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=93=E7=9B=B9=E7=9A=84=E6=B6=88=E9=98=B2=E8=BD=A6?= <1473454180@qq.com> Date: Sun, 23 Jan 2022 23:11:20 +0800 Subject: [PATCH] add:gnu-rm 10.3-2021.10 (#937) * add:gnu-rm 10.3-2021.10 * Update xmake.lua * Update xmake.lua Co-authored-by: ruki --- packages/g/gnu-rm/xmake.lua | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/packages/g/gnu-rm/xmake.lua b/packages/g/gnu-rm/xmake.lua index 093b94ecb..86cb5a9de 100644 --- a/packages/g/gnu-rm/xmake.lua +++ b/packages/g/gnu-rm/xmake.lua @@ -4,28 +4,37 @@ package("gnu-rm") set_homepage("https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm") set_description("GNU Arm Embedded Toolchain") + local version_map = { + ["2020.10"] = "10-2020q4/gcc-arm-none-eabi-2020.10-major", + ["2021.10"] = "10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10" + } + if is_host("windows") then - set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-major-win32.zip", {version = function (version) - return version:gsub("%-", ""):gsub("%.", "-") .. "/gcc-arm-none-eabi-" .. version:gsub("%.", "-") + set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-win32.zip", {version = function (version) + return version_map[tostring(version)] end}) - add_versions("10.2020-q4", "90057b8737b888c53ca5aee332f1f73c401d6d3873124d2c2906df4347ebef9e") + add_versions("2020.10", "90057b8737b888c53ca5aee332f1f73c401d6d3873124d2c2906df4347ebef9e") + add_versions("2021.10", "d287439b3090843f3f4e29c7c41f81d958a5323aecefcf705c203bfd8ae3f2e7") elseif is_host("linux") then if os.arch() == "arm64" then - set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-major-aarch64-linux.tar.bz2", {version = function (version) - return version:gsub("%-", ""):gsub("%.", "-") .. "/gcc-arm-none-eabi-" .. version:gsub("%.", "-") + set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-aarch64-linux.tar.bz2", {version = function (version) + return version_map[tostring(version)] end}) - add_versions("10.2020-q4", "343d8c812934fe5a904c73583a91edd812b1ac20636eb52de04135bb0f5cf36a") + add_versions("2020.10", "343d8c812934fe5a904c73583a91edd812b1ac20636eb52de04135bb0f5cf36a") + add_versions("2021.10", "f605b5f23ca898e9b8b665be208510a54a6e9fdd0fa5bfc9592002f6e7431208") else - set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-major-x86_64-linux.tar.bz2", {version = function (version) - return version:gsub("%-", ""):gsub("%.", "-") .. "/gcc-arm-none-eabi-" .. version:gsub("%.", "-") + set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-x86_64-linux.tar.bz2", {version = function (version) + return version_map[tostring(version)] end}) - add_versions("10.2020-q4", "21134caa478bbf5352e239fbc6e2da3038f8d2207e089efc96c3b55f1edcd618") + add_versions("2020.10", "21134caa478bbf5352e239fbc6e2da3038f8d2207e089efc96c3b55f1edcd618") + add_versions("2021.10", "97dbb4f019ad1650b732faffcc881689cedc14e2b7ee863d390e0a41ef16c9a3") end elseif is_host("macosx") then - set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-major-mac.tar.bz2", {version = function (version) - return version:gsub("%-", ""):gsub("%.", "-") .. "/gcc-arm-none-eabi-" .. version:gsub("%.", "-") + set_urls("https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(version)-mac.tar.bz2", {version = function (version) + return version_map[tostring(version)] end}) - add_versions("10.2020-q4", "bed12de3565d4eb02e7b58be945376eaca79a8ae3ebb785ec7344e7e2db0bdc0") + add_versions("2020.10", "bed12de3565d4eb02e7b58be945376eaca79a8ae3ebb785ec7344e7e2db0bdc0") + add_versions("2021.10", "fb613dacb25149f140f73fe9ff6c380bb43328e6bf813473986e9127e2bc283b") end on_install("@windows", "@linux", "@macosx", function (package) @@ -39,3 +48,4 @@ package("gnu-rm") end os.vrunv(gcc, {"--version"}) end) +