xref: /OK3568_Linux_fs/buildroot/package/libv4l/libv4l.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# libv4l
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLIBV4L_VERSION = 1.22.1
8*4882a593SmuzhiyunLIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
9*4882a593SmuzhiyunLIBV4L_SITE = https://linuxtv.org/downloads/v4l-utils
10*4882a593SmuzhiyunLIBV4L_INSTALL_STAGING = YES
11*4882a593SmuzhiyunLIBV4L_DEPENDENCIES = host-pkgconf
12*4882a593SmuzhiyunLIBV4L_CONF_OPTS = --disable-doxygen-doc --disable-qvidcap
13*4882a593Smuzhiyun# needed to get utils/qv4l link flags right
14*4882a593SmuzhiyunLIBV4L_AUTORECONF = YES
15*4882a593Smuzhiyun# add host-gettext for AM_ICONV macro
16*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += host-gettext
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun# fix uclibc-ng configure/compile
19*4882a593SmuzhiyunLIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun# v4l-utils components have different licences, see v4l-utils.spec for details
22*4882a593SmuzhiyunLIBV4L_LICENSE = GPL-2.0+ (utilities), LGPL-2.1+ (libraries)
23*4882a593SmuzhiyunLIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ALSA_LIB),y)
26*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += alsa-lib
27*4882a593Smuzhiyunendif
28*4882a593Smuzhiyun
29*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
30*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += argp-standalone $(TARGET_NLS_DEPENDENCIES)
31*4882a593SmuzhiyunLIBV4L_CONF_ENV += LIBS=$(TARGET_NLS_LIBS)
32*4882a593Smuzhiyunendif
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
35*4882a593Smuzhiyun
36*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_JPEG),y)
37*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += jpeg
38*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --with-jpeg
39*4882a593Smuzhiyunelse
40*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --without-jpeg
41*4882a593Smuzhiyunendif
42*4882a593Smuzhiyun
43*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
44*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += libgl
45*4882a593Smuzhiyunendif
46*4882a593Smuzhiyun
47*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_UDEV),y)
48*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --with-libudev --with-udevdir=/usr/lib/udev
49*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += udev
50*4882a593Smuzhiyunelse
51*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --without-libudev
52*4882a593Smuzhiyunendif
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBGLU),y)
55*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += libglu
56*4882a593Smuzhiyunendif
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y)
59*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --enable-v4l-utils
60*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun# v4l2-ctl needs c++11, use gnu++11 for typeof support
63*4882a593SmuzhiyunLIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11"
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun# IR BPF decoder support needs toolchain with linux-headers >= 3.18
66*4882a593Smuzhiyun# libelf and clang support
67*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --disable-bpf
68*4882a593Smuzhiyun
69*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
70*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --enable-qv4l2
71*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += qt5base
72*4882a593Smuzhiyun# protect against host version detection of moc-qt5/rcc-qt5/uic-qt5
73*4882a593SmuzhiyunLIBV4L_CONF_ENV += \
74*4882a593Smuzhiyun	ac_cv_prog_MOC=$(HOST_DIR)/bin/moc \
75*4882a593Smuzhiyun	ac_cv_prog_RCC=$(HOST_DIR)/bin/rcc \
76*4882a593Smuzhiyun	ac_cv_prog_UIC=$(HOST_DIR)/bin/uic
77*4882a593Smuzhiyunelse
78*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --disable-qv4l2
79*4882a593Smuzhiyunendif
80*4882a593Smuzhiyunelse
81*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --disable-v4l-utils
82*4882a593Smuzhiyunendif
83*4882a593Smuzhiyun
84*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBV4L_BUILTIN_PLUGINS),y)
85*4882a593SmuzhiyunLIBV4L_CONF_OPTS += --enable-builtin-plugins
86*4882a593Smuzhiyunendif
87*4882a593Smuzhiyun
88*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SDL2_IMAGE),y)
89*4882a593SmuzhiyunLIBV4L_DEPENDENCIES += sdl2_image
90*4882a593Smuzhiyunendif
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun$(eval $(autotools-package))
93