libxml2: prevent host compile to overwrite xml2-config (closes #2566)
authorMichael Heimpold <mhei@heimpold.de>
Sat, 2 Apr 2016 21:10:06 +0000 (23:10 +0200)
committerMichael Heimpold <mhei@heimpold.de>
Sat, 2 Apr 2016 21:24:03 +0000 (23:24 +0200)
Host compilation overwrites "$(STAGING_DIR)/host/bin/xml2-config
with an unpatched variant. So apply the same sed expression before
installing the file during host install.

Thanks to @zyxmon for spotting this.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
libs/libxml2/Makefile

index 8e09530e384dfe2a21f18c95639fc3b4c20acfcc..fd025148969db1c87020535ee6218e90c16d5a07 100644 (file)
@@ -130,5 +130,10 @@ define Package/libxml2/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
 endef
 
+define Host/Install
+       $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
+       $(call Host/Install/Default)
+endef
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libxml2))