* [Buildroot] [git commit] package/luarocks: fix generated configuration when luajit
@ 2019-09-15 13:53 Thomas Petazzoni
0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2019-09-15 13:53 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=f947d52b3978491e032dd28f75141552fcb94993
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
this trick removes the need of the patch
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
.../luarocks/0001-allow-libluajit-detection.patch | 34 ----------------------
package/luarocks/luarocks.mk | 7 +++++
2 files changed, 7 insertions(+), 34 deletions(-)
diff --git a/package/luarocks/0001-allow-libluajit-detection.patch b/package/luarocks/0001-allow-libluajit-detection.patch
deleted file mode 100644
index e0ff85d409..0000000000
--- a/package/luarocks/0001-allow-libluajit-detection.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From fedd1259e47a6f6cb97bce8c9bf31eeb261b93be Mon Sep 17 00:00:00 2001
-From: Francois Perrad <francois.perrad@gadz.org>
-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 <francois.perrad@gadz.org>
----
- 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
-
diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
index 4505612280..cd547e280b 100644
--- a/package/luarocks/luarocks.mk
+++ b/package/luarocks/luarocks.mk
@@ -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))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-15 13:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 13:53 [Buildroot] [git commit] package/luarocks: fix generated configuration when luajit Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.