diff options
| author | ruki <[email protected]> | 2020-11-12 00:03:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-12 00:03:15 +0800 |
| commit | 65e9807729ed2a9a87e6e8d6a1a2187cdc30b9ca (patch) | |
| tree | b226580d2ea7056bdbcdddf04037866bd53aaf41 /xmake/modules | |
| parent | edfb83cbc469d7f867f4dee74fb378fd1be08d72 (diff) | |
install pacman package on msys2/mingw
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/manager/pacman/find_package.lua | 5 | ||||
| -rw-r--r-- | xmake/modules/package/manager/pacman/install_package.lua | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/pacman/find_package.lua b/xmake/modules/package/manager/pacman/find_package.lua index b2d211d53..8c2f4ccd7 100644 --- a/xmake/modules/package/manager/pacman/find_package.lua +++ b/xmake/modules/package/manager/pacman/find_package.lua @@ -39,6 +39,11 @@ function main(name, opt) return end + -- for msys2/mingw? mingw-w64-[i686|x86_64]-xxx + if opt.plat == "mingw" then + name = (opt.arch == "x86_64" and "mingw-w64-x86_64-" or "mingw-w64-i686-") .. name + end + -- get package files list local list = try { function() return os.iorunv(pacman.program, {"-Q", "-l", name}) end } if not list then diff --git a/xmake/modules/package/manager/pacman/install_package.lua b/xmake/modules/package/manager/pacman/install_package.lua index 941759a90..651914581 100644 --- a/xmake/modules/package/manager/pacman/install_package.lua +++ b/xmake/modules/package/manager/pacman/install_package.lua @@ -41,6 +41,11 @@ function main(name, opt) raise("pacman not found!") end + -- for msys2/mingw? mingw-w64-[i686|x86_64]-xxx + if opt.plat == "mingw" then + name = (opt.arch == "x86_64" and "mingw-w64-x86_64-" or "mingw-w64-i686-") .. name + end + -- init argv local argv = {"-Sy", "--noconfirm", "--needed", "--disable-download-timeout", opt.pacman or name} if opt.verbose or option.get("verbose") then |
