media-tv/v4l-utils: Only check Clang in pkg_pretend when installed

I forgot that pkg_pretend() fires before dependencies are
installed. We therefore need to check again in pkg_setup().

Bug: https://bugs.gentoo.org/763654
Package-Manager: Portage-3.0.13, Repoman-3.0.1
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
James Le Cuirot
2021-01-17 10:27:16 +00:00
parent 582e630c44
commit 9eca989141

View File

@@ -46,7 +46,7 @@ PATCHES=(
# Not really prebuilt but BPF objects make our QA checks go crazy.
QA_PREBUILT="*/rc_keymaps/protocols/*.o"
pkg_pretend() {
check_llvm() {
if [[ ${MERGE_TYPE} != binary ]] && use bpf; then
local clang=${ac_cv_prog_CLANG:-${CLANG:-clang}}
${clang} -target bpf -print-supported-cpus &>/dev/null ||
@@ -54,6 +54,14 @@ pkg_pretend() {
fi
}
pkg_pretend() {
has_version -b sys-devel/clang && check_llvm
}
pkg_setup() {
check_llvm
}
src_prepare() {
default
eautoreconf