Patchwork [06/12] luabitop: New package

login
register
mail settings
Submitter Assaf Inbal
Date May 20, 2013, 12:56 p.m.
Message ID <1369054604-26139-6-git-send-email-shmuelzon@gmail.com>
Download mbox | patch
Permalink /patch/245026/
State Accepted
Headers show

Comments

Assaf Inbal - May 20, 2013, 12:56 p.m.
Lua library for binary operations

Signed-off-by: Assaf Inbal <shmuelzon@gmail.com>
---
 package/Config.in            |  1 +
 package/luabitop/Config.in   |  7 +++++++
 package/luabitop/luabitop.mk | 27 +++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 package/luabitop/Config.in
 create mode 100644 package/luabitop/luabitop.mk
Peter Korsgaard - June 16, 2013, 8:03 p.m.
>>>>> "Assaf" == Assaf Inbal <shmuelzon@gmail.com> writes:

 Assaf> Lua library for binary operations
 Assaf> Signed-off-by: Assaf Inbal <shmuelzon@gmail.com>
 Assaf> ---
 Assaf>  package/Config.in            |  1 +
 Assaf>  package/luabitop/Config.in   |  7 +++++++
 Assaf>  package/luabitop/luabitop.mk | 27 +++++++++++++++++++++++++++
 Assaf>  3 files changed, 35 insertions(+)
 Assaf>  create mode 100644 package/luabitop/Config.in
 Assaf>  create mode 100644 package/luabitop/luabitop.mk

 Assaf> diff --git a/package/Config.in b/package/Config.in
 Assaf> index e94cb39..1089533 100644
 Assaf> --- a/package/Config.in
 Assaf> +++ b/package/Config.in
 Assaf> @@ -308,6 +308,7 @@ source "package/cgilua/Config.in"
 Assaf>  source "package/copas/Config.in"
 Assaf>  source "package/coxpcall/Config.in"
 Assaf>  source "package/lbase64/Config.in"
 Assaf> +source "package/luabitop/Config.in"
 Assaf>  source "package/luacjson/Config.in"
 Assaf>  source "package/luaexpat/Config.in"
 Assaf>  source "package/luafilesystem/Config.in"
 Assaf> diff --git a/package/luabitop/Config.in b/package/luabitop/Config.in
 Assaf> new file mode 100644
 Assaf> index 0000000..83a85b1
 Assaf> --- /dev/null
 Assaf> +++ b/package/luabitop/Config.in
 Assaf> @@ -0,0 +1,7 @@
 Assaf> +config BR2_PACKAGE_LUABITOP
 Assaf> +	bool "luabitop"
 Assaf> +	help
 Assaf> +	  Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise
 Assaf> +	  operations on numbers.
 Assaf> +
 Assaf> +	  http://bitop.luajit.org
 Assaf> diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk
 Assaf> new file mode 100644
 Assaf> index 0000000..aaa01cd
 Assaf> --- /dev/null
 Assaf> +++ b/package/luabitop/luabitop.mk
 Assaf> @@ -0,0 +1,27 @@
 Assaf> +#############################################################
 Assaf> +#
 Assaf> +# luabitop
 Assaf> +#
 Assaf> +#############################################################
 Assaf> +
 Assaf> +LUABITOP_VERSION = 1.0.2
 Assaf> +LUABITOP_SOURCE = LuaBitOp-$(LUABITOP_VERSION).tar.gz
 Assaf> +LUABITOP_SITE = http://bitop.luajit.org/download
 Assaf> +LUABITOP_LICENSE = MIT
 Assaf> +LUABITOP_LICENSE_FILES = README
 Assaf> +LUABITOP_DEPENDENCIES = lua
 Assaf> +
 Assaf> +define LUABITOP_BUILD_CMDS
 Assaf> +	$(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)"

TARGET_CONFIGURE_OPTS should be used instead.

Committed with that fixed, thanks.

Patch

diff --git a/package/Config.in b/package/Config.in
index e94cb39..1089533 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -308,6 +308,7 @@  source "package/cgilua/Config.in"
 source "package/copas/Config.in"
 source "package/coxpcall/Config.in"
 source "package/lbase64/Config.in"
+source "package/luabitop/Config.in"
 source "package/luacjson/Config.in"
 source "package/luaexpat/Config.in"
 source "package/luafilesystem/Config.in"
diff --git a/package/luabitop/Config.in b/package/luabitop/Config.in
new file mode 100644
index 0000000..83a85b1
--- /dev/null
+++ b/package/luabitop/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_LUABITOP
+	bool "luabitop"
+	help
+	  Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise
+	  operations on numbers.
+
+	  http://bitop.luajit.org
diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk
new file mode 100644
index 0000000..aaa01cd
--- /dev/null
+++ b/package/luabitop/luabitop.mk
@@ -0,0 +1,27 @@ 
+#############################################################
+#
+# luabitop
+#
+#############################################################
+
+LUABITOP_VERSION = 1.0.2
+LUABITOP_SOURCE = LuaBitOp-$(LUABITOP_VERSION).tar.gz
+LUABITOP_SITE = http://bitop.luajit.org/download
+LUABITOP_LICENSE = MIT
+LUABITOP_LICENSE_FILES = README
+LUABITOP_DEPENDENCIES = lua
+
+define LUABITOP_BUILD_CMDS
+	$(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define LUABITOP_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/lib/lua
+	$(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua
+endef
+
+define LUABITOP_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))