1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/bash
set -e
MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
# Make sure the library is correctly linked (to prevent regression on #1029939):
[ $(ldd -r /usr/lib/$MULTIARCH/libshaderc.so | grep -c "undefined symbol") -eq 0 ]
cd $AUTOPKGTEST_TMP
dummy_source=dummy.c
dummy_binary=dummy
# From https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/shaderc.rb:
cat > $dummy_source <<EOF
#include <shaderc/shaderc.h>
int main() {
int version;
shaderc_profile profile;
if (!shaderc_parse_version_profile("450core", &version, &profile))
return 1;
return (profile == shaderc_profile_core) ? 0 : 1;
}
EOF
g++ -o $dummy_binary $dummy_source $(pkg-config --libs --cflags shaderc)
test -x $dummy_binary
./$dummy_binary
|