rio: update to 0.2.0
[void-pkg.git] / common / hooks / post-install / 13-pkg-config-clean-xbps-cross-base-ref.sh
blob88ad06c41983a80b613e1b6a85c93b6f763bc323
1 # This hook removes reference to $XBPS_CROSS_BASE in
2 # /usr/{lib,share}/pkgconfig/*.pc
4 # We don't touch /usr/bin/*-config since there're other information that
5 # references $XBPS_CROSS_BASE
7 hook() {
8 if [ -z "$CROSS_BUILD" ]; then
9 return 0
11 for f in "$PKGDESTDIR"/usr/lib/pkgconfig/*.pc \
12 "$PKGDESTDIR"/usr/share/pkgconfig/*.pc
14 if [ -f "$f" ]; then
15 # Sample sed script
16 # s,/usr/armv7l-linux-musleabihf/usr,/usr,g
17 # trailing /usr to avoid clashing with
18 # other $XBPS_CROSS_BASE and $XBPS_CROSS_TRIPLET.
19 sed -i --follow-symlinks \
20 -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f"
22 done