From ce629e9b207ed5ca9dec6db96ba54fce422e3d13 Mon Sep 17 00:00:00 2001 From: Caleb Kiage <747955+calebkiage@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:14:29 +0300 Subject: Try to get the mingw package prefix from the environment first --- xmake/modules/package/manager/pacman/find_package.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/modules/package/manager/pacman/find_package.lua b/xmake/modules/package/manager/pacman/find_package.lua index 119a8169e..ccbb590cf 100644 --- a/xmake/modules/package/manager/pacman/find_package.lua +++ b/xmake/modules/package/manager/pacman/find_package.lua @@ -113,7 +113,9 @@ function main(name, opt) -- for msys2/mingw? mingw-w64-[i686|x86_64]-xxx if is_subhost("msys") and opt.plat == "mingw" then - name = (opt.arch == "x86_64" and "mingw-w64-x86_64-" or "mingw-w64-i686-") .. name + -- try to get the package prefix from the environment first + -- https://www.msys2.org/docs/package-naming/ + name = (os.getenv("MINGW_PACKAGE_PREFIX") or (opt.arch == "x86_64" and "mingw-w64-x86_64" or "mingw-w64-i686")) .. "-" .. name end -- get package files list -- cgit v1.3.1