libv4l: add optional sdl2_image dependency
PATCH 1/2 libv4l: add optional sdl2_image dependency
--- package/libv4l/libv4l.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/libv4l/libv4l.mk +4 -0
@@ -73,6 +73,10 @@ else LIBV4L_CONF_OPTS += --disable-v4l-utils endif +ifeq ($(BR2_PACKAGE_SDL2_IMAGE),y) +LIBV4L_DEPENDENCIES += sdl2_image +endif + LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)" $(eval $(autotools-package))
Signature · 1 line
2.14.1
PATCH 2/2 libv4l: fix build with sdl2_image
sdlcam test includes jpeglib.h so add an option to disable tests
Fixes:
- http://autobuild.buildroot.net/results/1eded8b44cc369550566c6ce0b3c042f1aec8d44
--- package/libv4l/0004-Add-disable-tests-option.patch | 59 ++++++++++++++++++++++ package/libv4l/libv4l.mk | 8 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 package/libv4l/0004-Add-disable-tests-option.patch
package/libv4l/0004-Add-disable-tests-option.patch new file +59 -0
@@ -0,0 +1,59 @@ +From d244fc440dd18dacf9b820f333134cd842e2f970 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 29 Jun 2018 21:15:10 +0200 +Subject: [PATCH] Add --disable-tests option + +Offer the possibiity to disable tests especially sdlcam test which +includes jpeglib.h + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 11 +++++++++++ + contrib/Makefile.am | 6 +++++- + 2 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index dc1e9cbf..45c7b1fc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -431,6 +431,16 @@ AC_ARG_ENABLE(gconv, + esac] + ) + ++AC_ARG_ENABLE(tests, ++ AS_HELP_STRING([--disable-tests], [disable tests compilation]), ++ [case "${enableval}" in ++ yes | no ) ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;; ++ esac], ++ enable_tests=yes ++) ++AM_CONDITIONAL([HAVE_TESTS], [test x$enable_tests = xyes]) ++ + PKG_CHECK_MODULES([SDL2], [sdl2 SDL2_image], [sdl_pc=yes], [sdl_pc=no]) + AM_CONDITIONAL([HAVE_SDL], [test x$sdl_pc = xyes]) + +@@ -518,4 +528,5 @@ compile time options summary + qv4l2 : $USE_QV4L2 + v4l2-ctl uses libv4l : $USE_V4L2_CTL_LIBV4L + v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L ++ tests : $enable_tests + EOF +diff --git a/contrib/Makefile.am b/contrib/Makefile.am +index d41dc539..ed83d71c 100644 +--- a/contrib/Makefile.am ++++ b/contrib/Makefile.am +@@ -1,5 +1,9 @@ + if LINUX_OS +-SUBDIRS = test xc3028-firmware ++SUBDIRS = xc3028-firmware ++ ++if HAVE_TESTS ++SUBDIRS += test ++endif + + if HAVE_LINUX_I2C_DEV + SUBDIRS += \ +-- +2.14.1 +
package/libv4l/libv4l.mk +7 -1
@@ -9,7 +9,13 @@ 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 +LIBV4L_CONF_OPTS = \ + --disable-doxygen-doc \ + --disable-tests +# We're patching configure.ac +LIBV4L_AUTORECONF = YES +# add host-gettext for AM_ICONV macro +LIBV4L_DEPENDENCIES += host-gettext # fix uclibc-ng configure/compile LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
Signature · 1 line
2.14.1
PATCH 2/2 libv4l: fix build with sdl2_image
Hello,
Quoted 18 lines · Fabrice Fontaine
sdlcam test includes
jpeglib.hso add an option to disable testsFixes:
- http://autobuild.buildroot.net/results/1eded8b44cc369550566c6ce0b3c042f1aec8d44Signed-off-by Fabrice Fontaine <[email protected]>--- package/libv4l/0004-Add-disable-tests-option.patch | 59 ++++++++++++++++++++++ package/libv4l/libv4l.mk | 8 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 package/libv4l/0004-Add-disable-tests-option.patchpackage/libv4l/0004-Add-disable-tests-option.patch new file +0
-0
package/libv4l/0004-Add-disable-tests-option.patch line 9
Quoted 9 lines
package/libv4l/0004-Add-disable-tests-option.patch new file +9
-0@@ -0,0 +1,59 @@ +From d244fc440dd18dacf9b820f333134cd842e2f970 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 29 Jun 2018 21:15:10 +0200 +Subject: [PATCH] Add --disable-tests option + +Offer the possibiity to disable tests especially sdlcam test which +includes jpeglib.h + +Signed-off-by: Fabrice Fontaine <[email protected]>
This patch is not the right/best solution to the problem. configure.ac already checks for the availability of the jpeg library, and defines HAVE_JPEG accordingly.
So in contrib/test/Makefile.am, just replace:
if HAVE_SDLnoinst_PROGRAMS += sdlcam
endif
by:
if HAVE_SDL
if HAVE_JPEGnoinst_PROGRAMS += sdlcam
endif
endif
Perhaps there is an automake "and" or "&&" operator, but I'm not sure.
Also, please submit this change upstream.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 libv4l: add optional sdl2_image dependency
In reply to Fabrice FontaineHello,
Quoted 4 lines · Fabrice Fontaine
Signed-off-by Fabrice Fontaine <[email protected]>--- package/libv4l/libv4l.mk | 4 ++++ 1 file changed, 4 insertions(+)
I've explained explicitly in the commit log that there is no --enable/--disable option, as the configure.ac script simply uses PKG_CHECK_MODULES() to detect the availability of sdl2_image.
Applied with this updated commit log. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 libv4l: add optional sdl2_image dependency
In reply to Fabrice FontaineQuoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2018.02.x and 2018.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard