1# pkg-config Wrapper hygiene 2# 3# See comments in cc-wrapper's setup hook. This works exactly the same way. 4 5# Skip setup hook if we're neither a build-time dep, nor, temporarily, doing a 6# native compile. 7# 8# TODO(@Ericson2314): No native exception 9[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0 10 11pkgConfigWrapper_addPkgConfigPath () { 12 # See ../setup-hooks/role.bash 13 local role_post 14 getHostRoleEnvHook 15 16 addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig" 17 addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" 18} 19 20# See ../setup-hooks/role.bash 21getTargetRole 22getTargetRoleWrapper 23 24addEnvHooks "$targetOffset" pkgConfigWrapper_addPkgConfigPath 25 26export PKG_CONFIG${role_post}=@targetPrefix@@baseBinName@ 27 28# No local scope in sourced file 29unset -v role_post