* Update xmake.lua

* add msys2

* dump files

* add install script

* add msystem

* limit arch

* fix arch

* Update xmake.lua

* improve pacman conf

* improve cosmocc
pull/3314/head
ruki 9 months ago committed by GitHub
parent 0961175290
commit d885463d7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/c/cosmocc/xmake.lua
  2. 32
      packages/m/msys2/xmake.lua

@ -7,6 +7,10 @@ package("cosmocc")
"https://github.com/xmake-mirror/cosmopolitan/releases/download/$(version)/cosmocc-$(version).zip") "https://github.com/xmake-mirror/cosmopolitan/releases/download/$(version)/cosmocc-$(version).zip")
add_versions("3.2.4", "d2fa6dbf6f987310494581deff5b915dbdc5ca701f20f7613bb0dcf1de2ee511") add_versions("3.2.4", "d2fa6dbf6f987310494581deff5b915dbdc5ca701f20f7613bb0dcf1de2ee511")
on_load("@windows|x64", function (package)
package:add("deps", "msys2")
end)
on_install("@windows", "@macosx", "@linux", "@bsd", "@cygwin", "@msys", function (package) on_install("@windows", "@macosx", "@linux", "@bsd", "@cygwin", "@msys", function (package)
if is_host("windows") then if is_host("windows") then
import("lib.detect.find_tool") import("lib.detect.find_tool")

@ -0,0 +1,32 @@
package("msys2")
set_kind("toolchain")
set_homepage("https://www.msys2.org/")
set_description("Software Distribution and Building Platform for Windows")
add_urls("https://github.com/msys2/msys2-installer/releases/download/$(version).tar.xz", {version = function (version)
return version:gsub("%.", "-") .. "/msys2-base-x86_64-" .. version:gsub("%.", "")
end})
add_versions("2024.01.13", "04456a44a956d3c0b5f9b6c754918bf3a8c3d87c858be7a0c94c9171ab13c58c")
add_configs("msystem", {description = "Set msys2 system.", type = "string", values = {"MSYS", "MINGW32", "MINGW64", "UCRT64", "CLANG32", "CLANG64", "CLANGARM64"}})
on_install("@windows|x64", function (package)
-- reduce time required to install packages by disabling pacman's disk space checking
io.gsub("etc/pacman.conf", "^CheckSpace", "#CheckSpace")
os.cp("*", package:installdir())
package:addenv("PATH", "usr/bin")
local msystem = package:config("msystem")
if msystem then
package:addenv("MSYSTEM", msystem)
end
end)
on_test(function (package)
os.vrun("sh --version")
os.vrun("perl --version")
os.vrun("ls -l")
os.vrun("grep --version")
os.vrun("uname -a")
end)
Loading…
Cancel
Save