Patchwork [meta-oe] opencv: Disable 'gtk' backend if X11 is not available

login
register
mail settings
Submitter Otavio Salvador
Date July 1, 2014, 1:56 p.m.
Message ID <1404222962-18298-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/74517/
State Accepted, archived
Headers show

Comments

Otavio Salvador - July 1, 2014, 1:56 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/recipes-support/opencv/opencv_2.4.bb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-oe/recipes-support/opencv/opencv_2.4.bb b/meta-oe/recipes-support/opencv/opencv_2.4.bb
index df512f6..4059063 100644
--- a/meta-oe/recipes-support/opencv/opencv_2.4.bb
+++ b/meta-oe/recipes-support/opencv/opencv_2.4.bb
@@ -31,7 +31,8 @@  EXTRA_OECMAKE = "-DPYTHON_NUMPY_INCLUDE_DIR:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}
                  ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
 "
 
-PACKAGECONFIG ??= "eigen gtk jpeg libav png tiff v4l"
+PACKAGECONFIG ??= "eigen jpeg libav png tiff v4l \
+                   ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)}"
 PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen,"
 PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+,"
 PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"