13-pkg-config-clean-xbps-cross-base-ref.sh (594B)
1# This hook removes reference to $XBPS_CROSS_BASE in 2# /usr/{lib,share}/pkgconfig/*.pc 3# 4# We don't touch /usr/bin/*-config since there're other information that 5# references $XBPS_CROSS_BASE 6 7hook() { 8 if [ -z "$CROSS_BUILD" ]; then 9 return 0 10 fi 11 for f in "$PKGDESTDIR"/usr/lib/pkgconfig/*.pc \ 12 "$PKGDESTDIR"/usr/share/pkgconfig/*.pc 13 do 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 -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f" 20 fi 21 done 22}