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]>
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
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/yajl
$(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))