new package: LuaExpat
authorDanomi Manchego <danomimanchego123@gmail.com>
Mon, 16 Jul 2012 02:59:26 +0000 (22:59 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 17 Jul 2012 21:30:42 +0000 (23:30 +0200)
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/luaexpat/Config.in [new file with mode: 0644]
package/luaexpat/luaexpat.mk [new file with mode: 0644]

index 99257b426f352826239ff3052c9a1874eb79edd7..5126f1a76ce18a5340dd68d0440fb0467f0a33e6 100644 (file)
@@ -250,6 +250,7 @@ menu "LUA libraries/modules"
 source "package/cgilua/Config.in"
 source "package/copas/Config.in"
 source "package/coxpcall/Config.in"
+source "package/luaexpat/Config.in"
 source "package/luafilesystem/Config.in"
 source "package/luasocket/Config.in"
 source "package/rings/Config.in"
diff --git a/package/luaexpat/Config.in b/package/luaexpat/Config.in
new file mode 100644 (file)
index 0000000..186c5c9
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LUAEXPAT
+       bool "luaexpat"
+       select BR2_PACKAGE_EXPAT
+       help
+         LuaExpat is a SAX XML parser based on the Expat library.
+
+         http://matthewwild.co.uk/projects/luaexpat/
diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk
new file mode 100644 (file)
index 0000000..400d7b4
--- /dev/null
@@ -0,0 +1,38 @@
+#############################################################
+#
+# luaexpat
+#
+#############################################################
+
+LUAEXPAT_VERSION      = 1.2.0
+LUAEXPAT_SITE         = http://matthewwild.co.uk/projects/luaexpat
+LUAEXPAT_DEPENDENCIES = lua expat
+
+
+LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501
+LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include/lua
+LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include
+LUAEXPAT_MFLAGS += LIBNAME=lxp.so
+LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)"
+LUAEXPAT_MFLAGS += CC="$(TARGET_CC) -fPIC $(TARGET_CFLAGS)"
+
+
+define LUAEXPAT_BUILD_CMDS
+       $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS)
+endef
+
+define LUAEXPAT_INSTALL_TARGET_CMDS
+       $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/lxp.so
+       $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/lxp/lom.lua
+endef
+
+define LUAEXPAT_UNINSTALL_TARGET_CMDS
+       rm -f $(TARGET_DIR)/usr/lib/lua/lxp.so
+       rm -f $(TARGET_DIR)/usr/share/lua/lxp/lom.lua
+endef
+
+define LUAEXPAT_CLEAN_CMDS
+       $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS) clean
+endef
+
+$(eval $(generic-package))