[Buildroot] [PATCH] ljsyscall: new package
Danomi Manchego
danomimanchego123 at gmail.com
Wed Sep 25 00:58:52 UTC 2013
An FFI implementation of the Linux and NetBSD kernel ABIs for LuaJIT.
Signed-off-by: Danomi Manchego <danomimanchego123 at gmail.com>
---
Note: this package requires LuaJIT specifically, so there is a depends-on
in the ljsyscall/Config.in, even though though it is included from a
menu with a "if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT" test around it.
---
package/Config.in | 1 +
package/ljsyscall/Config.in | 8 ++++++++
package/ljsyscall/ljsyscall.mk | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
create mode 100644 package/ljsyscall/Config.in
create mode 100644 package/ljsyscall/ljsyscall.mk
diff --git a/package/Config.in b/package/Config.in
index 1dd60d1..457e5ad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -355,6 +355,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/luabitop/Config.in"
source "package/luacjson/Config.in"
source "package/luacrypto/Config.in"
diff --git a/package/ljsyscall/Config.in b/package/ljsyscall/Config.in
new file mode 100644
index 0000000..0bed738
--- /dev/null
+++ b/package/ljsyscall/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LJSYSCALL
+ bool "ljsyscall"
+ # ljsyscall is specifically for LuaJIT, not Lua.
+ depends on BR2_PACKAGE_LUAJIT
+ help
+ An FFI implementation of the Linux and NetBSD kernel ABIs for LuaJIT.
+
+ http://github.com/justincormack/ljsyscall
diff --git a/package/ljsyscall/ljsyscall.mk b/package/ljsyscall/ljsyscall.mk
new file mode 100644
index 0000000..25a5ec9
--- /dev/null
+++ b/package/ljsyscall/ljsyscall.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# ljsyscall
+#
+################################################################################
+
+LJSYSCALL_VERSION = v0.8
+LJSYSCALL_SITE = http://github.com/justincormack/ljsyscall/tarball/$(LJSYSCALL_VERSION)
+LJSYSCALL_DEPENDENCIES = luajit
+LJSYSCALL_LICENSE = MIT
+LJSYSCALL_LICENSE_FILES = COPYRIGHT
+
+ifeq ($(BR2_i386),y)
+LJSYSCALL_ARCH = x86
+endif
+ifeq ($(BR2_x86_64),y)
+LJSYSCALL_ARCH = x64
+endif
+ifeq ($(BR2_powerpc),y)
+LJSYSCALL_ARCH = ppc
+endif
+ifeq ($(LJSYSCALL_ARCH),)
+LJSYSCALL_ARCH = $(BR2_ARCH)
+endif
+
+define LJSYSCALL_INSTALL_TARGET_CMDS
+ $(INSTALL) -d $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/syscall
+ $(INSTALL) -t $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/ $(@D)/syscall.lua
+ $(INSTALL) -t $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/syscall $(@D)/syscall/*.lua
+
+ $(INSTALL) -d $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/syscall/linux/$(LJSYSCALL_ARCH)
+ $(INSTALL) -t $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/syscall/linux/ $(@D)/syscall/linux/*.lua
+ $(INSTALL) -t $(TARGET_DIR)/usr/share/luajit-$(LUAJIT_VERSION)/syscall/linux/$(LJSYSCALL_ARCH) $(@D)/syscall/linux/$(LJSYSCALL_ARCH)/*.lua
+endef
+
+$(eval $(generic-package))
--
1.7.9.5
More information about the buildroot
mailing list