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.

58 lines
1.6 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_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  20. PKG_BUILD_DEPENDS:=lua/host luac/host
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/lualanes
  23. SUBMENU:=Lua
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. TITLE:=LuaLanes
  27. URL:=http://luaforge.net/projects/lanes/
  28. DEPENDS:=+lua +luac +liblua +libpthread
  29. MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru>
  30. endef
  31. define Package/lualanes/description
  32. Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2.
  33. endef
  34. define Build/Compile
  35. $(MAKE) -C $(PKG_BUILD_DIR) all \
  36. CC="$(TARGET_CC)" \
  37. LUA="$(STAGING_DIR_HOST)/bin/lua" \
  38. LUAC="$(STAGING_DIR_HOST)/bin/luac" \
  39. OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield"
  40. endef
  41. define Package/lualanes/install
  42. $(INSTALL_DIR) $(1)/usr/lib/lua
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/
  44. $(INSTALL_DIR) $(1)/usr/lib/lua/lanes
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so
  46. endef
  47. $(eval $(call BuildPackage,lualanes))