summaryrefslogtreecommitdiffstats
path: root/package/luarocks
diff options
context:
space:
mode:
authorDanomi Manchego <danomimanchego123@gmail.com>2016-12-23 20:50:55 -0500
committerPeter Korsgaard <peter@korsgaard.com>2016-12-28 23:55:11 +0100
commite298cf06f6fe04bf6b52bddeee1a816054195ac4 (patch)
tree3a621a9321ad9a2a27e4d3252e62f1a45166c02d /package/luarocks
parent2ffd07aaae4504c8b8681235e88c984e6b0d75a5 (diff)
downloadbuildroot-e298cf06f6fe04bf6b52bddeee1a816054195ac4.tar.gz
buildroot-e298cf06f6fe04bf6b52bddeee1a816054195ac4.zip
luarocks: fix target-finalize hook processing
The LUAROCKS_TARGET_FINALIZE_HOOKS is not running, so detritus is being left in /usr/lib/luarocks. This is because host-luarocks is built by being a dependency in the luarocks package infrastructure, not by being selected by kconfig symbol. This means that the $(PKG)_KCONFIG_VAR in pkg-generic.mk is not met, and (HOST_)LUAROCKS_TARGET_FINALIZE_HOOKS is not added to the global TARGET_FINALIZE_HOOKS. This mod fixes this issue by adding the host-luarocks hook directly to TARGET_FINALIZE_HOOKS when either lua or luajit is enabled. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/luarocks')
-rw-r--r--package/luarocks/luarocks.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
index 4e0d537ff7..d18056a527 100644
--- a/package/luarocks/luarocks.mk
+++ b/package/luarocks/luarocks.mk
@@ -60,4 +60,7 @@ define LUAROCKS_FINALIZE_TARGET
rm -rf $(TARGET_DIR)/usr/lib/luarocks
endef
-LUAROCKS_TARGET_FINALIZE_HOOKS += LUAROCKS_FINALIZE_TARGET
+# Apply to global variable directly, as pkg-generic does not
+ifneq ($(BR2_PACKAGE_LUAJIT)$(BR2_PACKAGE_LUA),)
+TARGET_FINALIZE_HOOKS += LUAROCKS_FINALIZE_TARGET
+endif
OpenPOWER on IntegriCloud