avahi: Fix pkgconfig files to be cross compile friendly
authorRosen Penev <redacted>
Sat, 28 Sep 2019 23:42:15 +0000 (16:42 -0700)
committerRosen Penev <redacted>
Sun, 29 Sep 2019 00:16:17 +0000 (17:16 -0700)
libdir should not point to the host.

Signed-off-by: Rosen Penev <redacted>
libs/avahi/Makefile

index df9b0f5699534a5dc960829474c3cddb7bc2b910..922b8b6f4a2ec01a4672338c92e0e35fb224d571 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avahi
 PKG_VERSION:=0.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
@@ -327,7 +327,14 @@ ifeq ($(BUILD_VARIANT),dbus)
 endif
 endif
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-core.pc
+ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),)
+ifeq ($(BUILD_VARIANT),dbus)
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-client.pc
+       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-compat-libdns_sd.pc
+endif
+endif
 endef
 
 define Package/libavahi/install
git clone https://git.99rst.org/PROJECT