aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/deps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/deps.lua')
-rw-r--r--src/luarocks/deps.lua18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index bcd6ccf5..3217a18f 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -187,30 +187,24 @@ end
187-- nil and an error message if any test failed, followed by an optional 187-- nil and an error message if any test failed, followed by an optional
188-- error code. 188-- error code.
189function deps.fulfill_dependencies(rockspec, depskey, deps_mode) 189function deps.fulfill_dependencies(rockspec, depskey, deps_mode)
190 if rockspec.supported_platforms then 190 if rockspec.supported_platforms and next(rockspec.supported_platforms) then
191 if not deps.platforms_set then 191 local supported = false
192 deps.platforms_set = values_set(cfg.platforms)
193 end
194 local supported = nil
195 for _, plat in pairs(rockspec.supported_platforms) do 192 for _, plat in pairs(rockspec.supported_platforms) do
196 local neg 193 local neg
197 neg, plat = plat:match("^(!?)(.*)") 194 neg, plat = plat:match("^(!?)(.*)")
198 if neg == "!" then 195 if neg == "!" then
199 if deps.platforms_set[plat] then 196 if cfg.is_platform(plat) then
200 return nil, "This rockspec for "..rockspec.package.." does not support "..plat.." platforms." 197 return nil, "This rockspec for "..rockspec.package.." does not support "..plat.." platforms."
201 end 198 end
202 else 199 else
203 if deps.platforms_set[plat] then 200 if cfg.is_platform(plat) then
204 supported = true 201 supported = true
205 else 202 break
206 if supported == nil then
207 supported = false
208 end
209 end 203 end
210 end 204 end
211 end 205 end
212 if supported == false then 206 if supported == false then
213 local plats = table.concat(cfg.platforms, ", ") 207 local plats = cfg.print_platforms()
214 return nil, "This rockspec for "..rockspec.package.." does not support "..plats.." platforms." 208 return nil, "This rockspec for "..rockspec.package.." does not support "..plats.." platforms."
215 end 209 end
216 end 210 end