diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-24 22:47:03 +0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-25 13:18:05 -0300 |
commit | a6778a07c6669a3a4c15d628d2a2aea453290170 (patch) | |
tree | 4dba07e4753ef28252080c5e3bb199df9c54a7db | |
parent | 741b67beb9b224a409e8b56df16756bea9cb8ecd (diff) | |
download | luarocks-a6778a07c6669a3a4c15d628d2a2aea453290170.tar.gz luarocks-a6778a07c6669a3a4c15d628d2a2aea453290170.tar.bz2 luarocks-a6778a07c6669a3a4c15d628d2a2aea453290170.zip |
write_rockspec: Add support for Lua 5.4
-rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 13 |
1 files 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. | |||
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 |