]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package/opengl/libegl: switch to package-defined providers
authorYann E. MORIN <yann.morin.1998@free.fr>
Fri, 20 Dec 2013 22:27:53 +0000 (23:27 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 25 Dec 2013 17:20:42 +0000 (18:20 +0100)
It seems weird that the libegl package has to know all of the packages
that may provide the EGL implementation.

This also breaks implementation provided by packages in BR2_EXTERNAL,
since we can't easily depend on the order of packages before we can
derive the dependencies of libegl.

So, Arnout and I separately came up to the same conclusion: move the
dependency selection from out of libegl, and into each of the packages
that provides an EGL implementation. Here it is.

Since we no longer depend on the order packages are included, but on
values set at Kconfig-time, we can now have EGL providers in BR2_EXTERNAL.

Reported-by: David Corvoysier <david.corvoysier@orange.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/freescale-imx/gpu-viv-bin-mx6q/Config.in
package/opengl/Config.in
package/opengl/libegl/Config.in [new file with mode: 0644]
package/opengl/libegl/libegl.mk
package/rpi-userland/Config.in
package/sunxi-mali/Config.in
package/ti-gfx/Config.in

index 64e42bad0e2227b21d0bb50ea7654e2c510d1ea1..68380a2996476b5a9e12714df1fff87ed25181ba 100644 (file)
@@ -24,6 +24,9 @@ config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
 if BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+       default "gpu-viv-bin-mx6q"
+
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES
        bool "install examples"
        help
index 1636807a84324006188486275764757eeaa2e2cf..686543b27f297fdc8dc9b93c5370259d5bf5897f 100644 (file)
@@ -1,5 +1,4 @@
-config BR2_PACKAGE_HAS_OPENGL_EGL
-       bool
+source "package/opengl/libegl/Config.in"
 
 config BR2_PACKAGE_HAS_OPENGL_ES
        bool
diff --git a/package/opengl/libegl/Config.in b/package/opengl/libegl/Config.in
new file mode 100644 (file)
index 0000000..2d81a20
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_OPENGL_EGL
+       bool
+
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+       depends on BR2_PACKAGE_HAS_OPENGL_EGL
+       string
index c194b027641903bd43e383817b29d4341b88a5e3..b2b74f13a7dfbae31600c82bf1a7ce67c929f271 100644 (file)
@@ -5,22 +5,7 @@
 ################################################################################
 
 LIBEGL_SOURCE =
-
-ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
-LIBEGL_DEPENDENCIES += rpi-userland
-endif
-
-ifeq ($(BR2_PACKAGE_TI_GFX),y)
-LIBEGL_DEPENDENCIES += ti-gfx
-endif
-
-ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
-LIBEGL_DEPENDENCIES += sunxi-mali
-endif
-
-ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
-LIBEGL_DEPENDENCIES += gpu-viv-bin-mx6q
-endif
+LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_EGL))
 
 ifeq ($(LIBEGL_DEPENDENCIES),)
 define LIBEGL_CONFIGURE_CMDS
index 8910211836bc8620d516071fa14d348a572f1cb8..3c8959e2932ba115a6c6f0c892030cbdcc8f3a8f 100644 (file)
@@ -17,6 +17,13 @@ config BR2_PACKAGE_RPI_USERLAND
 
          https://github.com/raspberrypi/userland/
 
+if BR2_PACKAGE_RPI_USERLAND
+
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+       default "rpi-userland"
+
+endif
+
 comment "rpi-userland needs a toolchain w/ C++, largefile, threads"
        depends on BR2_arm
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
index 2ca049db6c98b87e3d11ee087377d10fc320ebe2..7f07647d6a3c45dd36382ecb44fbcf5af08b6091 100644 (file)
@@ -18,6 +18,9 @@ config BR2_PACKAGE_SUNXI_MALI
 
 if BR2_PACKAGE_SUNXI_MALI
 
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+       default "sunxi-mali"
+
 config BR2_PACKAGE_SUNXI_MALI_DBG
        bool "install malitest and maliver tools"
        help
index ec3a54cec729b9df5dff117a1ebf0bd7776b3546..e89660f3e77a37b3935b39a304cf89f3fd2f9df0 100644 (file)
@@ -11,6 +11,9 @@ config BR2_PACKAGE_TI_GFX
 
 if BR2_PACKAGE_TI_GFX
 
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+       default "ti-gfx"
+
 config BR2_PACKAGE_TI_GFX_DEBUG
        bool "enable debug support"
        help