[OpenWrt-Devel] [PATCH] util-linux: fix pkgconfig files
Dirk Neukirchen
dirkneukirchen at web.de
Sun Mar 8 17:51:03 EDT 2015
fixes a bug when other packages want to include libuuid
or other libs with pkgconfig they will use host paths
leading to unexpected build results
found in broken freeswitch compile on buildbot
checking for uuid >= 1.41.2... yes
checking LIBUUID_CFLAGS... -I/usr/include/uuid
checking LIBUUID_LIBS... -luuid
Signed-off-by: Dirk Neukirchen <dirkneukirchen at web.de>
---
package/utils/util-linux/Makefile | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index 2f7a8c0..4a79ed8 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -54,9 +54,20 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
+ $(SED) 's,libdir=/usr,libdir=$$$${exec_prefix},g' $(1)/usr/lib/pkgconfig/blkid.pc
+ $(SED) 's,includedir=/usr,includedir=$$$${prefix},g' $(1)/usr/lib/pkgconfig/blkid.pc
+
$(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
+ $(SED) 's,libdir=/usr,libdir=$$$${exec_prefix},g' $(1)/usr/lib/pkgconfig/mount.pc
+ $(SED) 's,includedir=/usr,includedir=$$$${prefix},g' $(1)/usr/lib/pkgconfig/mount.pc
+
$(CP) $(PKG_BUILD_DIR)/libsmartcols/smartcols.pc $(1)/usr/lib/pkgconfig
+ $(SED) 's,libdir=/usr,libdir=$$$${exec_prefix},g' $(1)/usr/lib/pkgconfig/smartcols.pc
+ $(SED) 's,includedir=/usr,includedir=$$$${prefix},g' $(1)/usr/lib/pkgconfig/smartcols.pc
+
$(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
+ $(SED) 's,libdir=/usr,libdir=$$$${exec_prefix},g' $(1)/usr/lib/pkgconfig/uuid.pc
+ $(SED) 's,includedir=/usr,includedir=$$$${prefix},g' $(1)/usr/lib/pkgconfig/uuid.pc
$(INSTALL_DIR) $(1)/usr/include/blkid
$(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
--
2.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list