diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-25 13:22:14 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-25 13:22:14 -0300 |
| commit | 09496341c97961dc0c8d07632ef8bf026e6f390f (patch) | |
| tree | c4ff3069b79a1b37be10c81df9bba054b1cb5314 /src | |
| parent | 42992d6504d6cd111f000dd3aae912f18510e8e2 (diff) | |
| parent | 2478fb2d24aa8a5fc02debb24dbd2cd2c844cc94 (diff) | |
| download | luarocks-09496341c97961dc0c8d07632ef8bf026e6f390f.tar.gz luarocks-09496341c97961dc0c8d07632ef8bf026e6f390f.tar.bz2 luarocks-09496341c97961dc0c8d07632ef8bf026e6f390f.zip | |
Merge branch 'Zash-lua54'
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 13 | ||||
| -rw-r--r-- | src/luarocks/core/cfg.lua | 2 | ||||
| -rw-r--r-- | src/luarocks/util.lua | 2 |
3 files changed, 13 insertions, 4 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. | |||
| 33 | --summary="<txt>" A short one-line description summary. | 33 | --summary="<txt>" A short one-line description summary. |
| 34 | --detailed="<txt>" A longer description string. | 34 | --detailed="<txt>" A longer description string. |
| 35 | --homepage=<url> Project homepage. | 35 | --homepage=<url> Project homepage. |
| 36 | --lua-version=<ver> Supported Lua versions. Accepted values are "5.1", "5.2", | 36 | --lua-version=<ver> Supported Lua versions. Accepted values are: "5.1", "5.2", |
| 37 | "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". | 37 | "5.3", "5.4", "5.1,5.2", "5.2,5.3", "5.3,5.4", "5.1,5.2,5.3", |
| 38 | "5.2,5.3,5.4", or "5.1,5.2,5.3,5.4" | ||
| 38 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". | 39 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". |
| 39 | --tag=<tag> Tag to use. Will attempt to extract version number from it. | 40 | --tag=<tag> Tag to use. Will attempt to extract version number from it. |
| 40 | --lib=<lib>[,<lib>] A comma-separated list of libraries that C files need to | 41 | --lib=<lib>[,<lib>] A comma-separated list of libraries that C files need to |
| @@ -68,12 +69,20 @@ local function configure_lua_version(rockspec, luaver) | |||
| 68 | table.insert(rockspec.dependencies, "lua ~> 5.2") | 69 | table.insert(rockspec.dependencies, "lua ~> 5.2") |
| 69 | elseif luaver == "5.3" then | 70 | elseif luaver == "5.3" then |
| 70 | table.insert(rockspec.dependencies, "lua ~> 5.3") | 71 | table.insert(rockspec.dependencies, "lua ~> 5.3") |
| 72 | elseif luaver == "5.4" then | ||
| 73 | table.insert(rockspec.dependencies, "lua ~> 5.4") | ||
| 71 | elseif luaver == "5.1,5.2" then | 74 | elseif luaver == "5.1,5.2" then |
| 72 | table.insert(rockspec.dependencies, "lua >= 5.1, < 5.3") | 75 | table.insert(rockspec.dependencies, "lua >= 5.1, < 5.3") |
| 73 | elseif luaver == "5.2,5.3" then | 76 | elseif luaver == "5.2,5.3" then |
| 74 | table.insert(rockspec.dependencies, "lua >= 5.2, < 5.4") | 77 | table.insert(rockspec.dependencies, "lua >= 5.2, < 5.4") |
| 78 | elseif luaver == "5.3,5.4" then | ||
| 79 | table.insert(rockspec.dependencies, "lua >= 5.3, < 5.5") | ||
| 75 | elseif luaver == "5.1,5.2,5.3" then | 80 | elseif luaver == "5.1,5.2,5.3" then |
| 76 | table.insert(rockspec.dependencies, "lua >= 5.1, < 5.4") | 81 | table.insert(rockspec.dependencies, "lua >= 5.1, < 5.4") |
| 82 | elseif luaver == "5.2,5.3,5.4" then | ||
| 83 | table.insert(rockspec.dependencies, "lua >= 5.2, < 5.5") | ||
| 84 | elseif luaver == "5.1,5.2,5.3,5.4" then | ||
| 85 | table.insert(rockspec.dependencies, "lua >= 5.1, < 5.5") | ||
| 77 | else | 86 | else |
| 78 | util.warning("Please specify supported Lua version with --lua-version=<ver>. "..util.see_help("write_rockspec")) | 87 | util.warning("Please specify supported Lua version with --lua-version=<ver>. "..util.see_help("write_rockspec")) |
| 79 | end | 88 | end |
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, | |||
| 15 | 15 | ||
| 16 | local cfg = {} | 16 | local cfg = {} |
| 17 | 17 | ||
| 18 | cfg.lua_version = _VERSION:match(" (5%.[123])$") or "5.1" | 18 | cfg.lua_version = _VERSION:match(" (5%.[1234])$") or "5.1" |
| 19 | local version_suffix = cfg.lua_version:gsub("%.", "_") | 19 | local version_suffix = cfg.lua_version:gsub("%.", "_") |
| 20 | 20 | ||
| 21 | -- Load site-local global configurations | 21 | -- 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) | |||
| 310 | end | 310 | end |
| 311 | 311 | ||
| 312 | function util.lua_versions() | 312 | function util.lua_versions() |
| 313 | local versions = { "5.1", "5.2", "5.3" } | 313 | local versions = { "5.1", "5.2", "5.3", "5.4" } |
| 314 | local i = 0 | 314 | local i = 0 |
| 315 | return function() | 315 | return function() |
| 316 | i = i + 1 | 316 | i = i + 1 |
