From 1ed80a15d215f5b924008f61f4a30da6139ca1bf Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 19 Feb 2024 20:21:32 -0300 Subject: fix: let runtime detection handle LUALIB filename This should be more flexible than hardcoding a value that may become incorrect once people reconfigure their LuaRocks to point to another Lua distribution, especially on Windows. Fixes #905. --- src/luarocks/core/cfg.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index a420bb44..a3a7d6cb 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -293,14 +293,13 @@ local function make_defaults(lua_version, target_cpu, platforms, home) defaults.variables.LD = os.getenv("LINK") or "link" defaults.variables.MT = os.getenv("MT") or "mt" defaults.variables.AR = os.getenv("AR") or "lib" - defaults.variables.LUALIB = "lua"..lua_version..".lib" defaults.variables.CFLAGS = os.getenv("CFLAGS") or "/nologo /MD /O2" defaults.variables.LDFLAGS = os.getenv("LDFLAGS") defaults.variables.LIBFLAG = "/nologo /dll" defaults.external_deps_patterns = { bin = { "?.exe", "?.bat" }, - lib = { "?.lib", "?.dll", "lib?.dll" }, + lib = { "?.lib", "lib?.lib", "?.dll", "lib?.dll" }, include = { "?.h" } } defaults.runtime_external_deps_patterns = { @@ -443,7 +442,6 @@ local function make_defaults(lua_version, target_cpu, platforms, home) defaults.variables.MT = os.getenv("MT") or nil defaults.variables.AR = os.getenv("AR") or "ar" defaults.variables.RANLIB = os.getenv("RANLIB") or "ranlib" - defaults.variables.LUALIB = "liblua"..lua_version..".dll.a" defaults.variables.CFLAGS = os.getenv("CFLAGS") or "-O2 -fPIC" if not defaults.variables.CFLAGS:match("-fPIC") then -- cgit v1.2.3-55-g6feb