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.

66 lines
1.9 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_VERSION:=3.13.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/LuaLanes/lanes/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=53a17d7ee11f17ca0543ae5aa640208dcb62d37862a0d0ea450455fae12c8ff1
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/lanes-$(PKG_VERSION)
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=lua/host
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/lualanes
  20. SUBMENU:=Lua
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=LuaLanes
  24. URL:=http://lualanes.github.io/lanes/
  25. DEPENDS:=+lua +luac +liblua +libpthread
  26. MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru>
  27. endef
  28. define Package/lualanes/description
  29. Lua Lanes is a Lua extension library providing the possibility to run
  30. multiple Lua states in parallel. It is intended to be used for optimizing
  31. performance on multicore CPU's and to study ways to make Lua programs
  32. naturally parallel to begin with.
  33. Lanes is included into your software by the regular require "lanes" method.
  34. No C side programming is needed; all APIs are Lua side, and most existing
  35. extension modules should work seamlessly together with the multiple lanes.
  36. Lanes supports Lua 5.1, 5.2 and 5.3
  37. endef
  38. define Build/Compile
  39. $(MAKE) -C $(PKG_BUILD_DIR) all \
  40. CC="$(TARGET_CC)" \
  41. LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
  42. LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
  43. LUA_FLAGS= \
  44. LUA_LIBS=-llua \
  45. OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield"
  46. endef
  47. define Package/lualanes/install
  48. $(INSTALL_DIR) $(1)/usr/lib/lua
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/
  50. $(INSTALL_DIR) $(1)/usr/lib/lua/lanes
  51. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so
  52. endef
  53. $(eval $(call BuildPackage,lualanes))