gpu-viv-bin-mx6q: make fb/x11 choice explicit
authorJérôme Pouiller <jezz@sysmic.org>
Thu, 30 Apr 2015 15:12:18 +0000 (17:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 May 2015 20:57:18 +0000 (22:57 +0200)
This approach is less error-prone during development.

Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/freescale-imx/gpu-viv-bin-mx6q/Config.in
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk

index c59535e0e3376c16138e4695919cfb21d69c7aa0..c770346c71eddd3542440436eb5227364f2017aa 100644 (file)
@@ -7,8 +7,6 @@ config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
        select BR2_PACKAGE_HAS_LIBEGL
        select BR2_PACKAGE_HAS_LIBGLES
        select BR2_PACKAGE_HAS_LIBOPENVG
-       select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
-       select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
        depends on BR2_arm # Only relevant for i.MX6
        # Library binaries are linked against libc.so.6
        depends on BR2_TOOLCHAIN_USES_GLIBC
@@ -25,6 +23,27 @@ config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
 if BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
+choice
+       prompt "Output option"
+       help
+         There are two versions of this library: one for
+         direct framebuffer access, one for X11 rendering.
+         Choose here which version to install.
+
+config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT_X11
+       bool "X11"
+       depends on BR2_PACKAGE_XORG7
+       select BR2_PACKAGE_XLIB_LIBXDAMAGE
+       select BR2_PACKAGE_XLIB_LIBXEXT
+
+comment "X11 backend needs Xorg package"
+       depends on !BR2_PACKAGE_XORG7
+
+config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT_FB
+       bool "Framebuffer"
+
+endchoice
+
 config BR2_PACKAGE_PROVIDES_LIBEGL
        default "gpu-viv-bin-mx6q"
 
index bad1658b940b75f3724a654d81787f62ceb52fbf..f96087b41157d14556d5d0915ebcda9bb7a0f519 100644 (file)
@@ -21,7 +21,7 @@ GPU_VIV_BIN_MX6Q_REDISTRIBUTE = NO
 GPU_VIV_BIN_MX6Q_PROVIDES = libegl libgles libopenvg
 
 # DirectFB is not supported (wrong version)
-ifeq ($(BR2_PACKAGE_XORG7),y)
+ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT_X11),y)
 GPU_VIV_BIN_MX6Q_DEPENDENCIES = xlib_libXdamage xlib_libXext
 GPU_VIV_BIN_MX6Q_LIB_TARGET = x11
 else