yajl: add host build
authorCedric CHEDALEUX <[email protected]>
Fri, 28 Feb 2025 12:25:06 +0000 (13:25 +0100)
committerChristian Marangi <[email protected]>
Tue, 11 Nov 2025 15:27:09 +0000 (16:27 +0100)
This patch adds the necessary host build infrastructure for yajl.

While OpenWrt doesn't strictly need this right now, merging this change
prevents downstream projects (like prplOS) from having to fork the package
just to build their host tools, thus keeping the code bases closer.

Signed-off-by: Cedric CHEDALEUX <[email protected]>
libs/yajl/Makefile

index 800ce3d925021af829335b7518f9c5d185188e2e..75283cbd976008f0250d8a5802a75175f06a1e81 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yajl
 PKG_VERSION:=2.1.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/lloyd/yajl
@@ -24,6 +24,7 @@ PKG_CPE_ID:=cpe:/a:yajl_project:yajl
 CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/yajl
@@ -46,4 +47,10 @@ define Package/yajl/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyajl.so* $(1)/usr/lib/
 endef
 
+define Host/Install
+       $(call Host/Install/Default)
+       mv $(1)/share/pkgconfig/yajl.pc $(1)/lib/pkgconfig/yajl.pc
+endef
+
 $(eval $(call BuildPackage,yajl))
+$(eval $(call HostBuild))