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.

61 lines
1.3 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=luv
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL:=https://github.com/luvit/luv.git
  6. PKG_SOURCE_VERSION:=1.9.1-1
  7. PKG_SOURCE_DATE:=2016-12-16
  8. PKG_LICENSE:=Apache-2.0
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_USE_MIPS16:=0
  11. include $(INCLUDE_DIR)/package.mk
  12. include $(INCLUDE_DIR)/cmake.mk
  13. define Package/luv
  14. SUBMENU:=Lua
  15. SECTION:=lang
  16. CATEGORY:=Languages
  17. TITLE:=Luv
  18. URL:=https://github.com/luvit/luv
  19. MAINTAINER:=Morteza Milani <milani@pichak.co>
  20. DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua
  21. endef
  22. define Package/luv/description
  23. Bare libuv bindings for lua
  24. endef
  25. define Package/luv/config
  26. source "$(SOURCE)/Config.in"
  27. endef
  28. CMAKE_OPTIONS += -DLUA_BUILD_TYPE=System
  29. CMAKE_OPTIONS += -DWITH_SHARED_LIBUV=ON
  30. CMAKE_OPTIONS += -DBUILD_MODULE=OFF
  31. CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
  32. ifeq ($(CONFIG_LUV_USE_LUAJIT_ENGINE),y)
  33. CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Luajit
  34. else
  35. CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Lua
  36. endif
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include/luv
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv
  40. $(INSTALL_DIR) $(1)/usr/lib/
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  42. endef
  43. define Package/luv/install
  44. $(INSTALL_DIR) $(1)/usr/lib/lua
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.9.1 $(1)/usr/lib/lua/luv.so
  46. endef
  47. $(eval $(call BuildPackage,luv))