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