Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] luajit: point /usr/bin/lua to luajit if lua not selected
@ 2014-11-09  3:22 Danomi Manchego
  2014-11-18 22:47 ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Danomi Manchego @ 2014-11-09  3:22 UTC (permalink / raw)
  To: buildroot

The luajit package is a provider of a lua interpreter, but does
not install a lua executable, as it can live side by side with lua.
This is fine for scripts that explicitly invoke luajit, but not
so good for scripts that just need a lua interpreter and call lua.
This mod creates a lua symlink so that the non-jit-specific scripts
will still work.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
 package/luajit/luajit.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index 2c1f8f4..f38088c 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -64,6 +64,13 @@ define LUAJIT_INSTALL_TARGET_CMDS
 	$(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" LDCONFIG=true -C $(@D) install
 endef
 
+ifneq ($(BR2_PACKAGE_LUA),y)
+define LUAJIT_INSTALL_SYMLINK
+	ln -fs luajit $(TARGET_DIR)/usr/bin/lua
+endef
+LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK
+endif
+
 define HOST_LUAJIT_BUILD_CMDS
 	$(MAKE) PREFIX="/usr" BUILDMODE=static -C $(@D) amalg
 endef
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-18 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09  3:22 [Buildroot] [PATCH 1/1] luajit: point /usr/bin/lua to luajit if lua not selected Danomi Manchego
2014-11-18 22:47 ` Yann E. MORIN
2014-11-18 23:02   ` Danomi Manchego

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox