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.

59 lines
1.4 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=luv
  3. PKG_VERSION:=1.22.0-1
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/luvit/luv/releases/download/$(PKG_VERSION)
  7. PKG_HASH:=27886acb3d3f531a3d6ca70360d2593ddf1a8d4daf94ca3beea14d9381227ff7
  8. PKG_MAINTAINER:=Morteza Milani <milani@pichak.co>
  9. PKG_LICENSE:=Apache-2.0
  10. PKG_LICENSE_FILES:=LICENSE
  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. DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua
  20. endef
  21. define Package/luv/description
  22. Bare libuv bindings for lua
  23. endef
  24. define Package/luv/config
  25. source "$(SOURCE)/Config.in"
  26. endef
  27. CMAKE_OPTIONS += -DLUA_BUILD_TYPE=System
  28. CMAKE_OPTIONS += -DWITH_SHARED_LIBUV=ON
  29. CMAKE_OPTIONS += -DBUILD_MODULE=OFF
  30. CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
  31. ifeq ($(CONFIG_LUV_USE_LUAJIT_ENGINE),y)
  32. CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Luajit
  33. else
  34. CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Lua
  35. endif
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include/luv
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv
  39. $(INSTALL_DIR) $(1)/usr/lib/
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  41. endef
  42. define Package/luv/install
  43. $(INSTALL_DIR) $(1)/usr/lib/lua
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.9.1 $(1)/usr/lib/lua/luv.so
  45. endef
  46. $(eval $(call BuildPackage,luv))