2020-05-15 07:32:24 +01:00
|
|
|
# This setup hook validates each pkgconfig file in each output.
|
|
|
|
|
|
|
|
fixupOutputHooks+=(_validatePkgConfig)
|
|
|
|
|
|
|
|
_validatePkgConfig() {
|
2020-10-18 13:00:05 +01:00
|
|
|
local bail=0
|
2020-05-15 07:32:24 +01: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-10-09 07:38:52 +01:00
|
|
|
if ! $PKG_CONFIG --validate "$pc"; then
|
2020-05-15 07:32:24 +01:00
|
|
|
bail=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $bail -eq 1 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|