File: lib

package info (click to toggle)
shaderc 2026.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,924 kB
  • sloc: cpp: 9,578; python: 4,981; ansic: 715; sh: 325; makefile: 27
file content (31 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (3)
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