luv: update to 1.40.0-0
authorRosen Penev <rosenp@gmail.com>
Wed, 14 Apr 2021 03:13:47 +0000 (20:13 -0700)
committerRosen Penev <rosenp@gmail.com>
Wed, 14 Apr 2021 21:17:22 +0000 (14:17 -0700)
Simplify CMake section.

Fix pkgconfig paths.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lang/luv/Makefile

index d8be8a497b00741262194f9eab446a3076e0f957..35cf2e850d9b48b3da38d030d58e0d99ffbdf168 100644 (file)
@@ -1,19 +1,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luv
-PKG_VERSION:=1.36.0-0
+PKG_VERSION:=1.40.0-0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/luvit/luv/releases/download/$(PKG_VERSION)
-PKG_HASH:=f2e7eb372574f25c6978c1dc74280d22efdcd7df2dda4a286c7fe7dceda26445
+PKG_HASH:=24473a081c3928eec2a352369cbafda97059574f4a4276861274473e7c7d17a0
 
 PKG_MAINTAINER:=Morteza Milani <milani@pichak.co>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-CMAKE_INSTALL:=1
-
 include $(INCLUDE_DIR)/package.mk
 include ../../devel/ninja/ninja-cmake.mk
 
@@ -34,20 +32,27 @@ define Package/luv/config
        source "$(SOURCE)/Config.in"
 endef
 
-CMAKE_OPTIONS += -DLUA_BUILD_TYPE=System
-CMAKE_OPTIONS += -DWITH_SHARED_LIBUV=ON
-CMAKE_OPTIONS += -DBUILD_MODULE=OFF
-CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
+CMAKE_OPTIONS += \
+       -DLUA_BUILD_TYPE=System \
+       -DWITH_SHARED_LIBUV=ON \
+       -DBUILD_MODULE=OFF \
+       -DBUILD_SHARED_LIBS=ON \
+       -DWITH_LUA_ENGINE=$(if $(CONFIG_LUV_USE_LUAJIT_ENGINE),Luajit,Lua)
 
-ifeq ($(CONFIG_LUV_USE_LUAJIT_ENGINE),y)
-       CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Luajit
-else
-       CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Lua
-endif
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/luv
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so* $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libluv.pc $(1)/usr/lib/pkgconfig
+       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libluv.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libluv.pc
+endef
 
 define Package/luv/install
        $(INSTALL_DIR) $(1)/usr/lib/lua
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.36.0 $(1)/usr/lib/lua/luv.so
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.40.0 $(1)/usr/lib/lua/luv.so
 endef