gstreamer: don't require target wayland-scanner
[scm/bb/meta-tizen.git] / meta-tizen-adaptation / meta / recipes-multimedia / gstreamer / files / 0001-dont-require-target-wayland-scanner.patch
1 From e349048de96ee99c40992a28eec587675f950b0d Mon Sep 17 00:00:00 2001
2 From: Thiago Santos <thiagoss@osg.samsung.com>
3 Date: Tue, 21 Jul 2015 18:02:38 -0300
4 Subject: [PATCH] configure: improve check for wayland-scanner binary
5
6 The plugin doesn't need the wayland-scanner package to be built
7 or run, it only needs the wayland-scanner program during compile time.
8
9 When cross-compiling, build systems might not have the wayland-scanner
10 package for the target system as it is a developer's tool, while it should
11 still be possible to use wayland-scanner from the host system.
12
13 This patch fixes it by not requiring the wayland-scanner package but
14 just the binary itself.
15
16 Note that the check is done outside of the PKG_CHECK_MODULES
17 as it doesn't work inside of it.
18
19 https://bugzilla.gnome.org/show_bug.cgi?id=752688
20 ---
21  configure.ac | 15 ++++++++++++---
22  1 file changed, 12 insertions(+), 3 deletions(-)
23
24 diff --git a/configure.ac b/configure.ac
25 index 2cb967b..27dd37e 100644
26 --- a/configure.ac
27 +++ b/configure.ac
28 @@ -1906,14 +1906,23 @@ AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
29  ])
30  
31  dnl **** Wayland ****
32 +# AC_CHECK_PROG inside the PKG_CHECK_MODULES fails, so use it here
33 +AC_CHECK_PROG(HAVE_WAYLAND_SCANNER, [wayland-scanner], yes, no)
34  translit(dnm, m, l) AM_CONDITIONAL(USE_WAYLAND, true)
35  AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
36 -  PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0 wayland-scanner, [
37 -    HAVE_WAYLAND="yes" ], [ HAVE_WAYLAND="no"
38 +  PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0, [
39 +    if test "x$HAVE_WAYLAND_SCANNER" = "xyes"; then
40 +      HAVE_WAYLAND="yes"
41 +    else
42 +      AC_MSG_RESULT([wayland-scanner is required to build the wayland plugin])
43 +      HAVE_WAYLAND="no"
44 +    fi
45 +    ],
46 +    [ HAVE_WAYLAND="no"
47    ])
48  ])
49  
50 -AC_PATH_PROG([wayland_scanner], [wayland-scanner])
51 +AC_PATH_PROG([wayland_scanner], [wayland-scanner])],
52  
53  dnl **** WebP ****
54  translit(dnm, m, l) AM_CONDITIONAL(USE_WEBP, true)
55 -- 
56 2.1.4