libv4l: fix build with sdl2_image
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 30 Jun 2018 18:40:32 +0000 (20:40 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 30 Jun 2018 19:54:46 +0000 (21:54 +0200)
sdlcam test includes jpeglib.h so add a patch to disable it if jpeg is
disabled

Fixes:
 - http://autobuild.buildroot.net/results/1eded8b44cc369550566c6ce0b3c042f1aec8d44

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libv4l/0004-Build-sdlcam-only-if-jpeg-is-enabled.patch [new file with mode: 0644]
package/libv4l/libv4l.mk

diff --git a/package/libv4l/0004-Build-sdlcam-only-if-jpeg-is-enabled.patch b/package/libv4l/0004-Build-sdlcam-only-if-jpeg-is-enabled.patch
new file mode 100644 (file)
index 0000000..4c4365f
--- /dev/null
@@ -0,0 +1,31 @@
+From 5c407e130f8d0416f91f5a12bcdc2709f00dda65 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 29 Jun 2018 21:15:10 +0200
+Subject: [PATCH] Build sdlcam only if jpeg is enabled
+
+Fixes:
+ - http://autobuild.buildroot.net/results/1eded8b44cc369550566c6ce0b3c042f1aec8d44
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ contrib/test/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
+index 0188fe21..c7c38e7a 100644
+--- a/contrib/test/Makefile.am
++++ b/contrib/test/Makefile.am
+@@ -17,8 +17,10 @@ noinst_PROGRAMS += v4l2gl
+ endif
+ if HAVE_SDL
++if HAVE_JPEG
+ noinst_PROGRAMS += sdlcam
+ endif
++endif
+ driver_test_SOURCES = driver-test.c
+ driver_test_LDADD = ../../utils/libv4l2util/libv4l2util.la
+-- 
+2.14.1
+
index 95a700b2d5b1166686f5f475a5d995200efc4de3..c95b2778cd09e32095c6a8abf4765ecd0cd45dd8 100644 (file)
@@ -10,6 +10,10 @@ LIBV4L_SITE = https://linuxtv.org/downloads/v4l-utils
 LIBV4L_INSTALL_STAGING = YES
 LIBV4L_DEPENDENCIES = host-pkgconf
 LIBV4L_CONF_OPTS = --disable-doxygen-doc
+# We're patching contrib/test/Makefile.am
+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'