aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Danomi Manchego <danomimanchego123@gmail.com>2014-01-16 22:10:25 -0500
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-01-20 22:40:35 +0100
commit95f72b283ef70b765da947454b4244f680b9deee (patch)
treef9d5586d5fea5c7fe25e4494fe197cc61980982e
parent493e2f0bd50add8e23fba44bd821d6f8b36ec387 (diff)
downloadbuildroot-95f72b283ef70b765da947454b4244f680b9deee.tar.gz
buildroot-95f72b283ef70b765da947454b4244f680b9deee.tar.bz2
ljsyscall: new package
An FFI implementation of the Linux and NetBSD kernel ABIs for LuaJIT. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/Config.in1
-rw-r--r--package/ljsyscall/Config.in14
-rw-r--r--package/ljsyscall/ljsyscall.mk37
3 files changed, 52 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 0bb0d2df41..8c8f6163fa 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -369,6 +369,7 @@ source "package/cgilua/Config.in"
source "package/copas/Config.in"
source "package/coxpcall/Config.in"
source "package/lbase64/Config.in"
+source "package/ljsyscall/Config.in"
source "package/lua-cjson/Config.in"
source "package/lua-ev/Config.in"
source "package/lua-msgpack-native/Config.in"
diff --git a/package/ljsyscall/Config.in b/package/ljsyscall/Config.in
new file mode 100644
index 0000000000..dcbd52185e
--- /dev/null
+++ b/package/ljsyscall/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LJSYSCALL
+ bool "ljsyscall"
+ # ljsyscall is specifically for LuaJIT, not Lua.
+ depends on BR2_PACKAGE_LUAJIT
+ # ljsyscall is only available for some target architectures
+ depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_arm || BR2_armeb
+ help
+ An FFI implementation of the Linux and NetBSD kernel ABIs for LuaJIT.
+
+ http://github.com/justincormack/ljsyscall
+
+comment "ljsyscall needs LuaJIT"
+ depends on !BR2_PACKAGE_LUAJIT && (BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_arm || BR2_armeb)
+
diff --git a/package/ljsyscall/ljsyscall.mk b/package/ljsyscall/ljsyscall.mk
new file mode 100644
index 0000000000..1f36dc71c2
--- /dev/null
+++ b/package/ljsyscall/ljsyscall.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# ljsyscall
+#
+################################################################################
+
+LJSYSCALL_VERSION = v0.9
+LJSYSCALL_SITE = $(call github,justincormack,ljsyscall,$(LJSYSCALL_VERSION))
+LJSYSCALL_LICENSE = MIT
+LJSYSCALL_LICENSE_FILES = COPYRIGHT
+
+ifeq ($(BR2_i386),y)
+LJSYSCALL_ARCH = x86
+else ifeq ($(BR2_x86_64),y)
+LJSYSCALL_ARCH = x64
+else ifeq ($(BR2_powerpc),y)
+LJSYSCALL_ARCH = ppc
+else ifeq ($(LJSYSCALL_ARCH),)
+LJSYSCALL_ARCH = $(BR2_ARCH)
+endif
+
+LJSYSCALL_TARGET_DIR = $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)
+
+define LJSYSCALL_INSTALL_TARGET_CMDS
+ $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall
+ $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/ $(@D)/syscall.lua
+ $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall $(@D)/syscall/*.lua
+
+ $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall/linux/$(LJSYSCALL_ARCH)
+ $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/linux/ $(@D)/syscall/linux/*.lua
+ $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/linux/$(LJSYSCALL_ARCH) $(@D)/syscall/linux/$(LJSYSCALL_ARCH)/*.lua
+
+ $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall/shared
+ $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/shared/ $(@D)/syscall/shared/*.lua
+endef
+
+$(eval $(generic-package))