From 1b3848fa703ba0f5eea5ca3741cce26f7349aeb9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 May 2018 17:04:10 +0200 Subject: configure: Learn about Lua 5.4 --- configure | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 42d18f61..7bc5bced 100755 --- a/configure +++ b/configure @@ -39,7 +39,7 @@ system's package manager. --rocks-tree=DIR Root of the local tree of installed rocks. Default is \$PREFIX ---lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 +--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 Default is auto-detected. --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) @@ -163,7 +163,7 @@ do --lua-version|--with-lua-version) [ -n "$value" ] || die "Missing value in flag $key." LUA_VERSION="$value" - [ "$LUA_VERSION" = "5.1" -o "$LUA_VERSION" = "5.2" -o "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." + [ "$LUA_VERSION" = "5.1" -o "$LUA_VERSION" = "5.2" -o "$LUA_VERSION" = "5.3" -o "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." LUA_VERSION_SET=yes ;; --with-lua) @@ -224,7 +224,7 @@ then fi detect_lua_version() { - detected_lua=`$1 -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null` + detected_lua=`$1 -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null` if [ "$detected_lua" != "nil" ] then if [ "$LUA_VERSION_SET" != "yes" ] @@ -285,10 +285,13 @@ then then suffixes="5.2 52 -5.2 -52" elif [ "$LUA_VERSION_SET" = "yes" -a "$LUA_VERSION" = "5.3" ] + then + suffixes="5.4 54 -5.4 -54" + elif [ "$LUA_VERSION_SET" = "yes" -a "$LUA_VERSION" = "5.4" ] then suffixes="5.3 53 -5.3 -53" else - suffixes="5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51" + suffixes="5.4 54 -5.4 -54 5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51" fi for suffix in `echo $suffixes` "" do @@ -400,7 +403,7 @@ else die "Could not determine processor architecture. 'uname -m' failed." fi -for v in 5.1 5.2 5.3; do +for v in 5.1 5.2 5.3 5.4; do if [ "$v" != "$LUA_VERSION" ]; then if [ -e "$PREFIX/share/lua/$v/luarocks/site_config.lua" ]; then LUA_OTHER_VERSION="$v" -- cgit v1.2.3-55-g6feb From 741b67beb9b224a409e8b56df16756bea9cb8ecd Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 May 2018 17:20:19 +0200 Subject: Whitelist Lua 5.4 --- src/luarocks/core/cfg.lua | 2 +- src/luarocks/util.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index f036aa44..834dba79 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -15,7 +15,7 @@ local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, local cfg = {} -cfg.lua_version = _VERSION:match(" (5%.[123])$") or "5.1" +cfg.lua_version = _VERSION:match(" (5%.[1234])$") or "5.1" local version_suffix = cfg.lua_version:gsub("%.", "_") -- Load site-local global configurations diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 7fdefce0..ff36aa50 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua @@ -310,7 +310,7 @@ function util.variable_substitutions(tbl, vars) end function util.lua_versions() - local versions = { "5.1", "5.2", "5.3" } + local versions = { "5.1", "5.2", "5.3", "5.4" } local i = 0 return function() i = i + 1 -- cgit v1.2.3-55-g6feb From a6778a07c6669a3a4c15d628d2a2aea453290170 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 May 2018 22:47:03 +0200 Subject: write_rockspec: Add support for Lua 5.4 --- src/luarocks/cmd/write_rockspec.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 88223857..53be404c 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua @@ -33,8 +33,9 @@ rockspec, and is not guaranteed to be complete or correct. --summary="" A short one-line description summary. --detailed="" A longer description string. --homepage= Project homepage. ---lua-version= Supported Lua versions. Accepted values are "5.1", "5.2", - "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". +--lua-version= Supported Lua versions. Accepted values are: "5.1", "5.2", + "5.3", "5.4", "5.1,5.2", "5.2,5.3", "5.3,5.4", "5.1,5.2,5.3", + "5.2,5.3,5.4", or "5.1,5.2,5.3,5.4" --rockspec-format= Rockspec format version, such as "1.0" or "1.1". --tag= Tag to use. Will attempt to extract version number from it. --lib=[,] A comma-separated list of libraries that C files need to @@ -68,12 +69,20 @@ local function configure_lua_version(rockspec, luaver) table.insert(rockspec.dependencies, "lua ~> 5.2") elseif luaver == "5.3" then table.insert(rockspec.dependencies, "lua ~> 5.3") + elseif luaver == "5.4" then + table.insert(rockspec.dependencies, "lua ~> 5.4") elseif luaver == "5.1,5.2" then table.insert(rockspec.dependencies, "lua >= 5.1, < 5.3") elseif luaver == "5.2,5.3" then table.insert(rockspec.dependencies, "lua >= 5.2, < 5.4") + elseif luaver == "5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.3, < 5.5") elseif luaver == "5.1,5.2,5.3" then table.insert(rockspec.dependencies, "lua >= 5.1, < 5.4") + elseif luaver == "5.2,5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.2, < 5.5") + elseif luaver == "5.1,5.2,5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.1, < 5.5") else util.warning("Please specify supported Lua version with --lua-version=. "..util.see_help("write_rockspec")) end -- cgit v1.2.3-55-g6feb From 2478fb2d24aa8a5fc02debb24dbd2cd2c844cc94 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Thu, 15 Mar 2018 22:13:39 +0300 Subject: Update install.bat for 5.4 support --- install.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.bat b/install.bat index 09cf9aa2..0ca8639f 100644 --- a/install.bat +++ b/install.bat @@ -127,7 +127,7 @@ Configuring the destinations: if you create a self contained installation. Configuring the Lua interpreter: -/LV [version] Lua version to use; either 5.1, 5.2, or 5.3. +/LV [version] Lua version to use; either 5.1, 5.2, 5.3, or 5.4. Default is auto-detected. /LUA [dir] Location where Lua is installed - e.g. c:\lua\5.1\ If not provided, the installer will search the system @@ -250,8 +250,8 @@ local function check_flags() die("Bundled Lua version is 5.1, cannot install "..vars.LUA_VERSION) end end - if not vars.LUA_VERSION:match("^5%.[123]$") then - die("Bad argument: /LV must either be 5.1, 5.2, or 5.3") + if not vars.LUA_VERSION:match("^5%.[1234]$") then + die("Bad argument: /LV must either be 5.1, 5.2, 5.3, or 5.4") end if USE_MSVC_MANUAL and USE_MINGW then die("Cannot combine option /MSVC and /MW") @@ -269,7 +269,7 @@ local function detect_lua_version(interpreter_path) local full_version = handler:read("*a") handler:close() - local version = full_version:match(" (5%.[123])$") + local version = full_version:match(" (5%.[1234])$") if not version then return nil, "unknown interpreter version '" .. full_version .. "'" end @@ -281,7 +281,7 @@ local function look_for_interpreter(directory) if lua_version_set then names = {S"lua$LUA_VERSION.exe", S"lua$LUA_SHORTV.exe"} else - names = {"lua5.3.exe", "lua53.exe", "lua5.2.exe", "lua52.exe", "lua5.1.exe", "lua51.exe"} + names = {"lua5.4.exe", "lua54.exe", "lua5.3.exe", "lua53.exe", "lua5.2.exe", "lua52.exe", "lua5.1.exe", "lua51.exe"} end table.insert(names, "lua.exe") table.insert(names, "luajit.exe") -- cgit v1.2.3-55-g6feb