|
|
@ -12,12 +12,12 @@ package("msys2") |
|
|
|
local msystem = package:config("msystem") |
|
|
|
local msystem = package:config("msystem") |
|
|
|
if msystem then |
|
|
|
if msystem then |
|
|
|
package:addenv("MSYSTEM", msystem) |
|
|
|
package:addenv("MSYSTEM", msystem) |
|
|
|
local pacman = path.join(msys2_base:installdir("usr/bin"), "pacman.exe") |
|
|
|
local bash = path.join(msys2_base:installdir("usr/bin"), "bash.exe") |
|
|
|
if msystem == "MINGW64" then |
|
|
|
if msystem == "MINGW64" then |
|
|
|
os.vrunv(pacman, {"--noconfirm", "-S", "--needed", "--overwrite", "*", "mingw-w64-x86_64-toolchain"}) |
|
|
|
os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -S --needed --overwrite * mingw-w64-x86_64-toolchain"}) |
|
|
|
package:addenv("PATH", msys2_base:installdir("mingw64/bin")) |
|
|
|
package:addenv("PATH", msys2_base:installdir("mingw64/bin")) |
|
|
|
elseif msystem == "MINGW32" then |
|
|
|
elseif msystem == "MINGW32" then |
|
|
|
os.vrunv(pacman, {"--noconfirm", "-S", "--needed", "--overwrite", "*", "mingw-w64-i686-toolchain"}) |
|
|
|
os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -S --needed --overwrite * mingw-w64-i686-toolchain"}) |
|
|
|
package:addenv("PATH", msys2_base:installdir("mingw32/bin")) |
|
|
|
package:addenv("PATH", msys2_base:installdir("mingw32/bin")) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|