2020-06-18 07:06:33 +00:00
|
|
|
# This setup hook validates each pkgconfig file in each output.
|
|
|
|
|
|
|
|
fixupOutputHooks+=(_validatePkgConfig)
|
|
|
|
|
|
|
|
_validatePkgConfig() {
|
2020-10-19 23:25:03 +00:00
|
|
|
local bail=0
|
2020-06-18 07:06:33 +00:00
|
|
|
for pc in $(find "$prefix" -name '*.pc'); do
|
|
|
|
# Do not fail immediately. It's nice to see all errors when
|
|
|
|
# there are multiple pkgconfig files.
|
2021-12-06 16:07:01 +00:00
|
|
|
if ! $PKG_CONFIG --validate "$pc"; then
|
2020-06-18 07:06:33 +00:00
|
|
|
bail=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $bail -eq 1 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|