package/luarocks: bump to version 3.2.1
PATCH 1/3 package/luarocks: bump to version 3.2.1
Signed-off-by Francois Perrad <[email protected]>
--- .../luarocks/0001-allow-libluajit-detection.patch | 12 ++++++------ package/luarocks/luarocks.hash | 2 +- package/luarocks/luarocks.mk | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
package/luarocks/0001-allow-libluajit-detection.patch +6 -6
@@ -1,6 +1,6 @@ -From 961269271134e711bcfffebb0f179ffddcbf3d5a Mon Sep 17 00:00:00 2001 +From fedd1259e47a6f6cb97bce8c9bf31eeb261b93be Mon Sep 17 00:00:00 2001 From: Francois Perrad <[email protected]> -Date: Sun, 29 Jul 2018 11:17:34 +0200 +Date: Sat, 27 Jul 2019 15:26:26 +0200 Subject: [PATCH] allow libluajit detection This detection was done only if luarocks is runned by luajit.
@@ -14,21 +14,21 @@ Signed-off-by: Francois Perrad <[email protected]> 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua -index 8403f12..c1c0220 100644 +index cb85764..02cdda6 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua -@@ -544,10 +544,8 @@ function deps.check_lua(vars) +@@ -555,10 +555,8 @@ function deps.check_lua_libdir(vars) "lua-" .. cfg.lua_version, "lua-" .. shortv, "lua", + "luajit-" .. cfg.lua_version, } -- if cfg.luajit_version then +- if ljv then - table.insert(libnames, 1, "luajit-" .. cfg.lua_version) - end local cache = {} for _, libname in ipairs(libnames) do local ok = check_external_dependency("LUA", { library = libname }, vars, "build", cache) -- -2.17.1 +2.20.1
package/luarocks/luarocks.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 c573435f495aac159e34eaa0a3847172a2298eb6295fcdc35d565f9f9b990513 luarocks-3.1.3.tar.gz +sha256 f27e20c9cdb3ffb991ccdb85796c36a0690566676f8e1a59b0d0ee6598907d04 luarocks-3.2.1.tar.gz sha256 542ad0ee9b8ba582437ca7b4d0959c9b9432f25d2067f144d017188a7a84dd2f COPYING
package/luarocks/luarocks.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LUAROCKS_VERSION = 3.1.3 +LUAROCKS_VERSION = 3.2.1 LUAROCKS_SITE = http://luarocks.org/releases LUAROCKS_LICENSE = MIT LUAROCKS_LICENSE_FILES = COPYING
Signature · 1 line
2.20.1
PATCH 2/3 package/luarocks: fix generated configuration when luajit
this trick removes the need of the patch
Signed-off-by Francois Perrad <[email protected]>
--- .../0001-allow-libluajit-detection.patch | 34 ------------------- package/luarocks/luarocks.mk | 7 ++++ 2 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 package/luarocks/0001-allow-libluajit-detection.patch
package/luarocks/0001-allow-libluajit-detection.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From fedd1259e47a6f6cb97bce8c9bf31eeb261b93be Mon Sep 17 00:00:00 2001 -From: Francois Perrad <[email protected]> -Date: Sat, 27 Jul 2019 15:26:26 +0200 -Subject: [PATCH] allow libluajit detection - -This detection was done only if luarocks is runned by luajit. -But on Buildroot, luarocks is always runned by lua. - -See https://github.com/luarocks/luarocks/pull/883 - -Signed-off-by: Francois Perrad <[email protected]> ---- - src/luarocks/deps.lua | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua -index cb85764..02cdda6 100644 ---- a/src/luarocks/deps.lua -+++ b/src/luarocks/deps.lua -@@ -555,10 +555,8 @@ function deps.check_lua_libdir(vars) - "lua-" .. cfg.lua_version, - "lua-" .. shortv, - "lua", -+ "luajit-" .. cfg.lua_version, - } -- if ljv then -- table.insert(libnames, 1, "luajit-" .. cfg.lua_version) -- end - local cache = {} - for _, libname in ipairs(libnames) do - local ok = check_external_dependency("LUA", { library = libname }, vars, "build", cache) --- -2.20.1 -
package/luarocks/luarocks.mk +7 -0
@@ -33,10 +33,17 @@ define HOST_LUAROCKS_CONFIGURE_CMDS cd $(@D) && ./configure $(HOST_LUAROCKS_CONF_OPTS) endef +ifeq ($(BR2_PACKAGE_LUAJIT),y) +define LUAROCKS_CONFIGURE_INTERPRETER_LUAJIT + echo "lua_interpreter = [[luajit]]" >> $(LUAROCKS_CONFIG_FILE) +endef +endif + define HOST_LUAROCKS_INSTALL_CMDS rm -f $(LUAROCKS_CONFIG_FILE) $(MAKE1) -C $(@D) install cat $(HOST_LUAROCKS_PKGDIR)/luarocks-br-config.lua >> $(LUAROCKS_CONFIG_FILE) + $(LUAROCKS_CONFIGURE_INTERPRETER_LUAJIT) endef $(eval $(host-generic-package))
Signature · 1 line
2.20.1
PATCH 3/3 package/luarocks: refactor our BR addon with new API
In reply to Francois Perradthe wellknown module argparse is now used by LuaRocks 3.2.0, instead of a homemade parsing argurment.
Signed-off-by Francois Perrad <[email protected]>
--- package/luarocks/buildroot.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
package/luarocks/buildroot.lua +12 -12
@@ -10,15 +10,20 @@ local search = require("luarocks.search") local download = require("luarocks.download") local fetch = require("luarocks.fetch") -buildroot.help_summary = "generate buildroot package files of a rock." -buildroot.help_arguments = "rockname [brname]" -buildroot.help = [[ +function buildroot.add_to_parser(parser) + local cmd = parser:command("buildroot", [[ This addon generates Buildroot package files of a rock. First argument is the name of a rock, the second argument is optional and needed when Buildroot uses another name (usually prefixed by lua-). Files are generated with the source content of the rock and more especially the rockspec. So, the rock is downloaded and unpacked. -]] +]], util.see_also()) + :summary("generate buildroot package files of a rock.") + + cmd:argument("rockname", "the name of a rock to be fetched and unpacked.") + cmd:argument("brname", "the name used by Buildroot.") + :args("?") +end local function brname (name) return name:upper():gsub('-', '_')
@@ -309,15 +314,10 @@ local function generate_test (rockspec, lcname) end --- Driver function for the "buildroot" command. --- @param rockname string: the name of a rock to be fetched and unpacked. --- @param brname string: the name used by Buildroot (optional) -- @return boolean: true if successful -function buildroot.command(flags, rockname, fsname) - if type(rockname) ~= 'string' then - return nil, "Argument missing. "..util.see_help('buildroot') - end - fsname = fsname or rockname - assert(type(fsname) == 'string') +function buildroot.command(args) + local rockname = assert(args.rockname) + local fsname = args.brname or rockname local query = queries.new(rockname:lower(), nil, false, 'src') local url, err = search.find_suitable_rock(query)
Signature · 1 line
2.20.1
PATCH 1/3 package/luarocks: bump to version 3.2.1
In reply to Francois PerradQuoted 6 lines · On Tue, 10 Sep 2019 05:30:07 +0200 Francois Perrad <[email protected]> wrote:
Signed-off-by Francois Perrad <[email protected]>--- .../luarocks/0001-allow-libluajit-detection.patch | 12 ++++++------ package/luarocks/luarocks.hash | 2 +- package/luarocks/luarocks.mk | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com