2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-03-07 18:21:18 +01:00
|
|
|
#
|
|
|
|
# libv4l
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2017-05-27 14:50:17 +02:00
|
|
|
LIBV4L_VERSION = 1.12.5
|
2011-03-07 18:21:18 +01:00
|
|
|
LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
|
2014-07-31 10:46:58 +02:00
|
|
|
LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils
|
2011-03-07 18:21:18 +01:00
|
|
|
LIBV4L_INSTALL_STAGING = YES
|
2014-07-05 23:07:40 +02:00
|
|
|
LIBV4L_DEPENDENCIES = host-pkgconf
|
2014-10-14 15:05:03 +02:00
|
|
|
LIBV4L_CONF_OPTS = --disable-doxygen-doc
|
2011-03-07 18:21:18 +01:00
|
|
|
|
2017-06-09 14:18:03 +02:00
|
|
|
# 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
|
libv4l: ensure libv4l gets built, fixes mediastreamer build
In commit f837251785e9389f53d695ddb8a094707865171b ("package/libv4l:
allow build of v4l2 utilities on noMMU platforms"), Hugues Fruchet
added a bunch of patches to libv4l in order to allow the v4l utilities
to be built on noMMU platforms.
However, as part of those patches, he entirely disabled the build of
libv4l in static linking configurations, because libv4l uses
dlopen(). Unfortunately, this breaks the build of applications like
mediastreamer in static linking configurations, and generally makes
our libv4l packages a little bit awkward: you can enable it, but it
doesn't install anything (in static linking configurations).
A closer look shows that dlopen() is only used by libv4l for plugin
support, and libv4l only provides one single plugin, and its build is
already conditional. Therefore, this commit adds yet another patch to
libv4l, which re-enables the build of libv4l, but disables the
plugin-related logic when plugin support is disabled (and it was
already automatically disabled in static linking configurations).
While at it, we update the comment in libv4l.mk that lists the patches
that makes autoreconf necessary.
Fixes the build of mediastreamer:
http://autobuild.buildroot.net/results/af091cfd0508df9395778cdc796f77e95c168410/
Cc: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-21 22:55:14 +02:00
|
|
|
# 0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch
|
|
|
|
# 0011-configure.ac-drop-disable-libv4l-disable-plugin-supp.patch
|
2017-05-14 22:06:26 +02:00
|
|
|
LIBV4L_AUTORECONF = YES
|
2017-06-16 05:32:54 +02:00
|
|
|
# host-gettext needed for autoreconf to work
|
2017-05-14 22:06:26 +02:00
|
|
|
LIBV4L_DEPENDENCIES += host-gettext
|
|
|
|
|
libv4l: fix uclibc-ng configure/compile
With raspberrypi_defconfig:
libv4l2rds.c:256:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < tuning->station_cnt; i++) {
^
libv4l2rds.c:256:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
>From build/libv4l-1.6.2/config.log:
configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
conftest.c:54:9: error: unknown type name 'wchar_t'
const wchar_t *name;
The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
Adding LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=c99' gives a lot of compile errors like:
libv4lconvert.c: In function 'dev_ioctl':
processing/../libv4lsyscall-priv.h:85:10: error: 'SYS_ioctl' undeclared (first use in this function)
syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
^
libv4lconvert.c:43:9: note: in expansion of macro 'SYS_IOCTL'
return SYS_IOCTL(fd, cmd, arg);
^
processing/../libv4lsyscall-priv.h:85:10: note: each undeclared identifier is reported only once for each function it appears in
syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
^
libv4lconvert.c:43:9: note: in expansion of macro 'SYS_IOCTL'
return SYS_IOCTL(fd, cmd, arg);
^
Adding LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' solves all configure/compile errors.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-02 23:26:32 +02:00
|
|
|
# fix uclibc-ng configure/compile
|
|
|
|
LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
|
|
|
|
|
2014-07-05 23:07:40 +02:00
|
|
|
# v4l-utils components have different licences, see v4l-utils.spec for details
|
2017-03-30 15:43:34 +02:00
|
|
|
LIBV4L_LICENSE = GPL-2.0+ (utilities), LGPL-2.1+ (libraries)
|
2014-07-05 23:07:40 +02:00
|
|
|
LIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt
|
2011-04-05 12:05:08 +02:00
|
|
|
|
2016-06-12 22:07:20 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
|
|
|
LIBV4L_DEPENDENCIES += alsa-lib
|
|
|
|
endif
|
|
|
|
|
2014-07-05 23:07:40 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
|
|
|
|
LIBV4L_DEPENDENCIES += argp-standalone
|
2014-11-09 11:21:21 +01:00
|
|
|
LIBV4L_LIBS += -largp
|
2011-03-07 18:21:18 +01:00
|
|
|
endif
|
|
|
|
|
2014-10-23 23:22:36 +02:00
|
|
|
LIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
|
|
|
|
2014-07-05 23:07:40 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
|
|
LIBV4L_DEPENDENCIES += jpeg
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBV4L_CONF_OPTS += --with-jpeg
|
2014-07-05 23:07:40 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBV4L_CONF_OPTS += --without-jpeg
|
2014-07-05 23:07:40 +02:00
|
|
|
endif
|
2011-03-07 18:21:18 +01:00
|
|
|
|
2016-06-12 22:07:21 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
|
|
|
|
LIBV4L_DEPENDENCIES += libgl
|
|
|
|
endif
|
|
|
|
|
2014-10-14 15:05:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
|
|
LIBV4L_DEPENDENCIES += udev
|
|
|
|
endif
|
|
|
|
|
2016-06-12 22:07:22 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBGLU),y)
|
|
|
|
LIBV4L_DEPENDENCIES += libglu
|
|
|
|
endif
|
|
|
|
|
2014-07-05 23:07:40 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBV4L_CONF_OPTS += --enable-v4l-utils
|
2017-07-03 22:53:30 +02:00
|
|
|
LIBV4L_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
|
2015-10-13 23:08:39 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
|
|
|
|
LIBV4L_CONF_OPTS += --enable-qv4l2
|
|
|
|
LIBV4L_DEPENDENCIES += qt5base
|
|
|
|
# protect against host version detection of moc-qt5/rcc-qt5/uic-qt5
|
|
|
|
LIBV4L_CONF_ENV += \
|
2017-07-05 13:14:19 +02:00
|
|
|
ac_cv_prog_MOC=$(HOST_DIR)/bin/moc \
|
|
|
|
ac_cv_prog_RCC=$(HOST_DIR)/bin/rcc \
|
|
|
|
ac_cv_prog_UIC=$(HOST_DIR)/bin/uic
|
2017-01-31 08:59:03 +01:00
|
|
|
# qt5 needs c++11 (since qt-5.7)
|
2017-02-11 12:05:29 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
|
2017-01-31 08:59:03 +01:00
|
|
|
LIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
|
|
|
|
endif
|
2016-06-12 22:07:19 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_QT_OPENGL_GL_DESKTOP),y)
|
2015-10-13 23:08:39 +02:00
|
|
|
LIBV4L_CONF_OPTS += --enable-qv4l2
|
|
|
|
LIBV4L_DEPENDENCIES += qt
|
|
|
|
else
|
|
|
|
LIBV4L_CONF_OPTS += --disable-qv4l2
|
|
|
|
endif
|
2014-07-05 23:07:40 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBV4L_CONF_OPTS += --disable-v4l-utils
|
2014-07-05 23:07:40 +02:00
|
|
|
endif
|
2011-03-07 18:21:18 +01:00
|
|
|
|
2014-11-09 11:21:21 +01:00
|
|
|
LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)"
|
|
|
|
|
2014-07-05 23:07:40 +02:00
|
|
|
$(eval $(autotools-package))
|