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.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=luv
  3. PKG_VERSION:=1.40.0-0
  4. PKG_RELEASE:=$(AUTORELEASE)
  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:=24473a081c3928eec2a352369cbafda97059574f4a4276861274473e7c7d17a0
  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 ../../devel/ninja/ninja-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 += \
  28. -DLUA_BUILD_TYPE=System \
  29. -DWITH_SHARED_LIBUV=ON \
  30. -DBUILD_MODULE=OFF \
  31. -DBUILD_SHARED_LIBS=ON \
  32. -DWITH_LUA_ENGINE=$(if $(CONFIG_LUV_USE_LUAJIT_ENGINE),Luajit,Lua)
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(1)/usr/include/luv
  35. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv
  36. $(INSTALL_DIR) $(1)/usr/lib/lua
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so* $(1)/usr/lib
  38. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libluv.pc $(1)/usr/lib/pkgconfig
  40. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libluv.pc
  41. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libluv.pc
  42. endef
  43. define Package/luv/install
  44. $(INSTALL_DIR) $(1)/usr/lib/lua
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.40.0 $(1)/usr/lib/lua/luv.so
  46. endef
  47. $(eval $(call BuildPackage,luv))