aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/cfg.lua4
-rw-r--r--src/luarocks/deps.lua15
2 files changed, 14 insertions, 5 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index d141bdee..0d991849 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -239,12 +239,12 @@ if detected.unix then
239 defaults.variables.LIBFLAG = "-shared" 239 defaults.variables.LIBFLAG = "-shared"
240 defaults.external_deps_patterns = { 240 defaults.external_deps_patterns = {
241 bin = { "?" }, 241 bin = { "?" },
242 lib = { "lib?.a", "lib?.so" }, 242 lib = { "lib?.a", "lib?.so", "lib?.so.*" },
243 include = { "?.h" } 243 include = { "?.h" }
244 } 244 }
245 defaults.runtime_external_deps_patterns = { 245 defaults.runtime_external_deps_patterns = {
246 bin = { "?" }, 246 bin = { "?" },
247 lib = { "lib?.so" }, 247 lib = { "lib?.so", "lib?.so.*" },
248 include = { "?.h" } 248 include = { "?.h" }
249 } 249 }
250 defaults.local_cache = home.."/.cache/luarocks" 250 defaults.local_cache = home.."/.cache/luarocks"
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index b10594a3..4f16c2a6 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -543,9 +543,18 @@ function check_external_deps(rockspec, mode)
543 if f:match("%.so$") or f:match("%.dylib$") or f:match("%.dll$") then 543 if f:match("%.so$") or f:match("%.dylib$") or f:match("%.dll$") then
544 f = f:gsub("%.[^.]+$", "."..cfg.external_lib_extension) 544 f = f:gsub("%.[^.]+$", "."..cfg.external_lib_extension)
545 end 545 end
546 local testfile = dir.path(dirdata.dir, f) 546 if f:match("%*") then
547 if fs.exists(testfile) then 547 local replaced = f:gsub("%.", "%%."):gsub("%*", ".*")
548 found = true 548 for _, entry in ipairs(fs.list_dir(dirdata.dir)) do
549 if entry:match(replaced) then
550 found = true
551 break
552 end
553 end
554 else
555 found = fs.exists(dir.path(dirdata.dir, f))
556 end
557 if found then
549 break 558 break
550 else 559 else
551 if failed_file then 560 if failed_file then