You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2009-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lua-coxpcall
  9. PKG_VERSION:=1.17.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_MIRROR_HASH:=e037c1aa1d2a2b213fca144d86cd5b5cf2cd77cec6d8f52d056add7ea806f0dc
  15. PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=ea22f44e490430e40217f0792bf82eaeaec51903
  18. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/lua-coxpcall
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=Lua-Coxpcall
  26. URL:=https://github.com/keplerproject/coxpcall
  27. DEPENDS:=+lua
  28. endef
  29. define Package/lua-coxpcall/description
  30. Coxpcall encapsulates the protected calls with a coroutine based loop,
  31. so errors can be dealed without the usual pcall/xpcall issues with coroutines.
  32. endef
  33. TARGET_CFLAGS += $(FPIC)
  34. # add make variable overrides here
  35. MAKE_FLAGS +=
  36. define Build/Configure
  37. endef
  38. define Build/Compile
  39. $(MAKE) -C $(PKG_BUILD_DIR) \
  40. T="$(BUILD_VARIANT)" \
  41. LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  42. install
  43. endef
  44. define Package/lua-coxpcall/install
  45. $(INSTALL_DIR) $(1)/usr/lib/lua
  46. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua
  47. endef
  48. $(eval $(call BuildPackage,lua-coxpcall))