forked from rarias/bscpkgs
cpic: Compilation ok but fails to run
This commit is contained in:
19
bsc/setup-hooks/validate-pkg-config.sh
Normal file
19
bsc/setup-hooks/validate-pkg-config.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
# This setup hook validates each pkgconfig file in each output.
|
||||
|
||||
fixupOutputHooks+=(_validatePkgConfig)
|
||||
|
||||
_validatePkgConfig() {
|
||||
for pc in $(find "$prefix" -name '*.pc'); do
|
||||
local bail=0
|
||||
|
||||
# Do not fail immediately. It's nice to see all errors when
|
||||
# there are multiple pkgconfig files.
|
||||
if ! pkg-config --validate "$pc"; then
|
||||
bail=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $bail -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user