diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-19 11:18:02 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:51:13 -0300 |
commit | 1da8ee2d0f9c2014e80677cd28a337c9ad6f9830 (patch) | |
tree | c728a34a967284984174e3858ee066b06b967d67 /src | |
parent | 1eee434b7e6313e721f8ff638f7b78cfb21960db (diff) | |
download | luarocks-1da8ee2d0f9c2014e80677cd28a337c9ad6f9830.tar.gz luarocks-1da8ee2d0f9c2014e80677cd28a337c9ad6f9830.tar.bz2 luarocks-1da8ee2d0f9c2014e80677cd28a337c9ad6f9830.zip |
rockspecs: use cfg.each_platform()
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/rockspecs.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/luarocks/rockspecs.lua b/src/luarocks/rockspecs.lua index e9fb73be..fe4a6d74 100644 --- a/src/luarocks/rockspecs.lua +++ b/src/luarocks/rockspecs.lua | |||
@@ -21,9 +21,9 @@ end | |||
21 | -- subset of its "platforms" field. The "platforms" field should | 21 | -- subset of its "platforms" field. The "platforms" field should |
22 | -- be a table containing subtables keyed with strings representing | 22 | -- be a table containing subtables keyed with strings representing |
23 | -- platform names. Names that match the contents of the global | 23 | -- platform names. Names that match the contents of the global |
24 | -- cfg.platforms setting are used. For example, if | 24 | -- detected platforms setting are used. For example, if |
25 | -- cfg.platforms= {"foo"}, then the fields of | 25 | -- platform "unix" is detected, then the fields of |
26 | -- tbl.platforms.foo will overwrite those of tbl with the same | 26 | -- tbl.platforms.unix will overwrite those of tbl with the same |
27 | -- names. For table values, the operation is performed recursively | 27 | -- names. For table values, the operation is performed recursively |
28 | -- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of | 28 | -- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of |
29 | -- tbl.x are preserved). | 29 | -- tbl.x are preserved). |
@@ -35,7 +35,7 @@ local function platform_overrides(tbl) | |||
35 | if not tbl then return end | 35 | if not tbl then return end |
36 | 36 | ||
37 | if tbl.platforms then | 37 | if tbl.platforms then |
38 | for _, platform in ipairs(cfg.platforms) do | 38 | for platform in cfg.each_platform() do |
39 | local platform_tbl = tbl.platforms[platform] | 39 | local platform_tbl = tbl.platforms[platform] |
40 | if platform_tbl then | 40 | if platform_tbl then |
41 | util.deep_merge(tbl, platform_tbl) | 41 | util.deep_merge(tbl, platform_tbl) |