################################################################################
################################################################################
LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
LIBV4L_SITE = https://linuxtv.org/downloads/v4l-utils
LIBV4L_INSTALL_STAGING = YES
LIBV4L_DEPENDENCIES = host-pkgconf
LIBV4L_CONF_OPTS = --disable-doxygen-doc
# below patches requires autoreconf:
# 0004-configure.ac-clarify-configure-summary.patch
# 0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
# 0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
# 0007-configure.ac-add-disable-libv4l-option.patch
# 0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
# 0009-configure.ac-add-USE_LIBV4L-to-summary.patch
# 0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch
# 0011-configure.ac-drop-disable-libv4l-disable-plugin-supp.patch
# host-gettext needed for autoreconf to work
LIBV4L_DEPENDENCIES += host-gettext
# fix uclibc-ng configure/compile
LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
# v4l-utils components have different licences, see v4l-utils.spec for details
LIBV4L_LICENSE = GPL-2.0+ (utilities), LGPL-2.1+ (libraries)
LIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
LIBV4L_DEPENDENCIES += alsa-lib
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
LIBV4L_DEPENDENCIES += argp-standalone
LIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
ifeq ($(BR2_PACKAGE_JPEG),y)
LIBV4L_DEPENDENCIES += jpeg
LIBV4L_CONF_OPTS += --with-jpeg
LIBV4L_CONF_OPTS += --without-jpeg
ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
LIBV4L_DEPENDENCIES += libgl
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
LIBV4L_DEPENDENCIES += udev
ifeq ($(BR2_PACKAGE_LIBGLU),y)
LIBV4L_DEPENDENCIES += libglu