diff options
| -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 |
