kumquat-buildroot/package/libv4l/libv4l.mk

74 lines
2.1 KiB
Makefile
Raw Normal View History

################################################################################
#
# libv4l
#
################################################################################
LIBV4L_VERSION = 1.10.0
LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils
LIBV4L_INSTALL_STAGING = YES
LIBV4L_DEPENDENCIES = host-pkgconf
LIBV4L_CONF_OPTS = --disable-doxygen-doc
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'
# v4l-utils components have different licences, see v4l-utils.spec for details
LIBV4L_LICENSE = GPLv2+ (utilities), LGPLv2.1+ (libraries)
LIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
LIBV4L_DEPENDENCIES += alsa-lib
endif
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
LIBV4L_DEPENDENCIES += argp-standalone
LIBV4L_LIBS += -largp
endif
LIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
ifeq ($(BR2_PACKAGE_JPEG),y)
LIBV4L_DEPENDENCIES += jpeg
LIBV4L_CONF_OPTS += --with-jpeg
else
LIBV4L_CONF_OPTS += --without-jpeg
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
LIBV4L_CONF_OPTS += --with-libudev
LIBV4L_DEPENDENCIES += udev
else
LIBV4L_CONF_OPTS += --without-libudev
endif
ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y)
LIBV4L_CONF_OPTS += --enable-v4l-utils
# clock_gettime is used, which is provided by librt for glibc < 2.17
LIBV4L_LIBS += -lrt
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
LIBV4L_DEPENDENCIES += gettext
endif
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 += \
ac_cv_prog_MOC=$(HOST_DIR)/usr/bin/moc \
ac_cv_prog_RCC=$(HOST_DIR)/usr/bin/rcc \
ac_cv_prog_UIC=$(HOST_DIR)/usr/bin/uic
else ifeq ($(BR2_PACKAGE_QT_OPENGL_GL_DESKTOP),y)
LIBV4L_CONF_OPTS += --enable-qv4l2
LIBV4L_DEPENDENCIES += qt
else
LIBV4L_CONF_OPTS += --disable-qv4l2
endif
else
LIBV4L_CONF_OPTS += --disable-v4l-utils
endif
LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)"
$(eval $(autotools-package))