aboutsummaryrefslogtreecommitdiff
path: root/lang/luabitop
diff options
context:
space:
mode:
authorMaxim Storchak <m.storchak@gmail.com>2014-06-11 08:52:53 +0300
committerMaxim Storchak <m.storchak@gmail.com>2014-06-11 08:52:53 +0300
commitb17a792d7df93b2e3aedfd5285838006bfeebf0e (patch)
treede2dcc7e8eb9f540fa759fc2f1858e5976a71745 /lang/luabitop
parenta27c76ba56ad24720143b6d9f7d71ac2529f44d0 (diff)
luabitop: import from packages
Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Diffstat (limited to 'lang/luabitop')
-rw-r--r--lang/luabitop/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/lang/luabitop/Makefile b/lang/luabitop/Makefile
new file mode 100644
index 000000000..33727f5e4
--- /dev/null
+++ b/lang/luabitop/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=luabitop
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+
+_BASENAME:=LuaBitOp
+
+PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://bitop.luajit.org/download/
+PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luabitop
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=luabitop
+ URL:=http://bitop.luajit.org/
+ DEPENDS:=+lua
+endef
+
+define Package/luabitop/description
+Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
+endef
+
+define Build/Configure
+endef
+
+
+TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
+
+define Build/Compile
+ $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c
+endef
+
+define Package/luabitop/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,luabitop))