abinfo "Gentoo: Fixing version detection ..."
cat << EOF > "$SRCDIR"/glslc/src/build-version.inc
"shaderc ${PKGVER/-[0-9]/}"
"$(dpkg -l spirv-tools | awk '{print $2,$3}' | tail -n1 | sed 's/+git[0-9]*//')"
"$(dpkg -l glslang | awk '{print $2,$3}' | tail -n1 | sed 's/-.*//')"
EOF

abinfo "Fedora: Fixing glslang include path ..."
sed -e 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' \
    -i "$SRCDIR"/libshaderc_util/src/compiler.cc

abinfo "Dropping third_party sources ..."
rm -rv "$SRCDIR"/third_party

abinfo "Gentoo: Fix Git versioning ..."
sed -e '/build-version/d' \
    -i "$SRCDIR"/glslc/CMakeLists.txt
