PKGNAME=v4l-utils
PKGSEC=utils
PKGDES="Utilities for Video4Linux and DVB devices"
PKGDEP="alsa-lib gcc-runtime libjpeg-turbo sysfsutils sdl2-image"
PKGDEP__RETRO="alsa-lib gcc-runtime libjpeg-turbo sysfsutils"
PKGDEP__ARMV4="${PKGDEP__RETRO}"
PKGDEP__ARMV6HF="${PKGDEP__RETRO}"
PKGDEP__ARMV7HF="${PKGDEP__RETRO}"
PKGDEP__I486="${PKGDEP__RETRO}"
PKGDEP__LOONGSON2F="${PKGDEP__RETRO}"
PKGDEP__M68K="${PKGDEP__RETRO}"
PKGDEP__POWERPC="${PKGDEP__RETRO}"
PKGDEP__PPC64="${PKGDEP__RETRO}"
BUILDDEP="doxygen"
BUILDDEP__RETRO=""
BUILDDEP__ARMV4="${BUILDDEP__RETRO}"
BUILDDEP__ARMV6HF="${BUILDDEP__RETRO}"
BUILDDEP__ARMV7HF="${BUILDDEP__RETRO}"
BUILDDEP__I486="${BUILDDEP__RETRO}"
BUILDDEP__LOONGSON2F="${BUILDDEP__RETRO}"
BUILDDEP__M68K="${BUILDDEP__RETRO}"
BUILDDEP__POWERPC="${BUILDDEP__RETRO}"
BUILDDEP__PPC64="${BUILDDEP__RETRO}"

# FIXME: Re-generation fails.
#
# configure.ac:100: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
#       If this token and others are legitimate, please use m4_pattern_allow.
#       See the Autoconf documentation.
# configure.ac:101: error: possibly undefined macro: AM_GNU_GETTEXT
# configure.ac:348: error: possibly undefined macro: AM_ICONV
RECONF=0

# FIXME: --disable-pbf
#
# bpf_load.c:66:38: error: storage size of ‘load_attr’ isn’t known
#    66 |         struct bpf_load_program_attr load_attr;
#       |                                      ^~~~~~~~~
# bpf_load.c:69:38: error: invalid application of ‘sizeof’ to incomplete type
# ‘struct bpf_load_program_attr’
#    69 |         memset(&load_attr, 0, sizeof(struct bpf_load_program_attr));
AUTOTOOLS_AFTER=(
    '--enable-libdvbv5'
    '--enable-doxygen-man'
    '--disable-qv4l2'
    '--disable-qvidcap'
    '--disable-bpf'
)
AUTOTOOLS_AFTER__RETRO=(
    "${AUTOTOOLS_AFTER[@]}"
    '--disable-doxygen-man'
)

# NOTE: They provide both 32- and 64-bit file operations.
# Disable transparent LFS support.
AB_FLAGS_Y2038=0

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
