summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-02 22:43:12 +0800
committerruki <[email protected]>2023-03-02 22:43:12 +0800
commit38a4a383cd9df2ec732ccd78194666cd97299050 (patch)
treefda92e77472879ac65a47dd1df793a94f2ed08b1 /xmake/modules/private/action/require/impl/package.lua
parent415c4ad77003cd20d9f4edeb813fafb6dd31b3ba (diff)
improve plat/arch for package
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index f85a0095c..01236d4e1 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -212,9 +212,10 @@ end
-- load package package from repositories
function _load_package_from_repository(packagename, opt)
+ opt = opt or {}
local packagedir, repo = repository.packagedir(packagename, opt)
if packagedir then
- return core_package.load_from_repository(packagename, repo, packagedir)
+ return core_package.load_from_repository(packagename, repo, packagedir, {plat = opt.plat, arch = opt.arch})
end
end
@@ -750,7 +751,10 @@ function _load_package(packagename, requireinfo, opt)
local from_repo = false
if not package then
package = _load_package_from_repository(packagename, {
- name = requireinfo.reponame, locked_repo = locked_requireinfo and locked_requireinfo.repo})
+ plat = requireinfo.plat,
+ arch = requireinfo.arch,
+ name = requireinfo.reponame,
+ locked_repo = locked_requireinfo and locked_requireinfo.repo})
if package then
from_repo = true
end