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.

55 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_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://luaforge.net/projects/lanes/
  25. DEPENDS:=+lua +luac +liblua +libpthread
  26. MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru>
  27. endef
  28. define Package/lualanes/description
  29. Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2.
  30. endef
  31. define Build/Compile
  32. $(MAKE) -C $(PKG_BUILD_DIR) all \
  33. CC="$(TARGET_CC)" \
  34. LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
  35. LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
  36. OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield"
  37. endef
  38. define Package/lualanes/install
  39. $(INSTALL_DIR) $(1)/usr/lib/lua
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/
  41. $(INSTALL_DIR) $(1)/usr/lib/lua/lanes
  42. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so
  43. endef
  44. $(eval $(call BuildPackage,lualanes))