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.

57 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2007-2014 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:=lualanes
  9. PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e
  10. PKG_VERSION:=3.9.4
  11. PKG_RELEASE=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
  13. PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=$(PKG_REV)
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=lua/host luac/host
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/lualanes
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=LuaLanes
  26. URL:=http://luaforge.net/projects/lanes/
  27. DEPENDS:=+lua +luac +liblua +libpthread
  28. MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru>
  29. endef
  30. define Package/lualanes/description
  31. Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2.
  32. endef
  33. define Build/Compile
  34. $(MAKE) -C $(PKG_BUILD_DIR) all \
  35. CC="$(TARGET_CC)" \
  36. LUA="$(STAGING_DIR)/host/bin/lua" \
  37. LUAC="$(STAGING_DIR)/host/bin/luac" \
  38. OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield"
  39. endef
  40. define Package/lualanes/install
  41. $(INSTALL_DIR) $(1)/usr/lib/lua
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/
  43. $(INSTALL_DIR) $(1)/usr/lib/lua/lanes
  44. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so
  45. endef
  46. $(eval $(call BuildPackage,lualanes))