@@ -283,6 +283,12 @@ HOSTCC := $(CCACHE) $(HOSTCC)
HOSTCXX := $(CCACHE) $(HOSTCXX)
endif
+ifeq ($(BR2_PACKAGE_LUA),y)
+ LUA_INTERPRETER = lua
+else ifeq ($(BR2_PACKAGE_LUAJIT),y)
+ LUA_INTERPRETER = luajit
+endif
+
#############################################################
#
# You should probably leave this stuff alone unless you know
@@ -6,7 +6,7 @@
COPAS_VERSION = 1.1.6
COPAS_SITE = http://github.com/downloads/keplerproject/copas
-COPAS_DEPENDENCIES = lua coxpcall luasocket
+COPAS_DEPENDENCIES = coxpcall luasocket
define COPAS_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \
@@ -6,7 +6,6 @@
COXPCALL_VERSION = 1.13.0
COXPCALL_SITE = http://luaforge.net/frs/download.php/3406
-COXPCALL_DEPENDENCIES = lua
define COXPCALL_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/src/coxpcall.lua \
@@ -6,7 +6,7 @@
LUACJSON_VERSION = 2.1.0
LUACJSON_SOURCE = lua-cjson-$(LUACJSON_VERSION).tar.gz
LUACJSON_SITE = http://www.kyne.com.au/~mark/software/download
-LUACJSON_DEPENDENCIES = lua
+LUACJSON_DEPENDENCIES = $(LUA_INTERPRETER)
define LUACJSON_BUILD_CMDS
$(MAKE) -C $(@D) \
@@ -6,7 +6,7 @@
LUAEXPAT_VERSION = 1.2.0
LUAEXPAT_SITE = http://matthewwild.co.uk/projects/luaexpat
-LUAEXPAT_DEPENDENCIES = lua expat
+LUAEXPAT_DEPENDENCIES = $(LUA_INTERPRETER) expat
LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501
@@ -6,7 +6,7 @@
LUAFILESYSTEM_VERSION = 1.5.0
LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem
-LUAFILESYSTEM_DEPENDENCIES = lua
+LUAFILESYSTEM_DEPENDENCIES = $(LUA_INTERPRETER)
ifeq ($(BR2_LARGEFILE),y)
LFS_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
new file mode 100644
@@ -0,0 +1,17 @@
+Install includes in /usr/include
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,7 @@
+ INSTALL_BIN= $(DPREFIX)/bin
+ INSTALL_LIB= $(DPREFIX)/lib
+ INSTALL_SHARE= $(DPREFIX)/share
+-INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
++INSTALL_INC= $(DPREFIX)/include
+
+ INSTALL_JITLIB= $(INSTALL_SHARE)/luajit-$(VERSION)/jit
+ INSTALL_LMOD= $(INSTALL_SHARE)/lua/$(ABIVER)
@@ -6,7 +6,7 @@
LUASOCKET_VERSION = 2.0.2
LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664
-LUASOCKET_DEPENDENCIES = lua
+LUASOCKET_DEPENDENCIES = $(LUA_INTERPRETER)
define LUASOCKET_BUILD_CMDS
$(MAKE) -C $(@D) -f makefile \
@@ -6,7 +6,7 @@
RINGS_VERSION = 1.2.3
RINGS_SITE = http://github.com/downloads/keplerproject/rings
-RINGS_DEPENDENCIES = lua
+RINGS_DEPENDENCIES = $(LUA_INTERPRETER)
define RINGS_BUILD_CMDS
$(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -fPIC"
@@ -6,7 +6,7 @@
XAVANTE_VERSION = 2.2.1
XAVANTE_SITE = http://github.com/downloads/keplerproject/xavante
-XAVANTE_DEPENDENCIES = cgilua copas coxpcall lua luafilesystem luasocket wsapi
+XAVANTE_DEPENDENCIES = cgilua copas coxpcall luafilesystem luasocket wsapi
define XAVANTE_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) PREFIX=/usr \