]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
gpu-viv-bin-mx6q: fix compiling issues with EGL_API_FB
authorJérôme Pouiller <jezz@sysmic.org>
Thu, 30 Apr 2015 15:12:17 +0000 (17:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 May 2015 20:57:18 +0000 (22:57 +0200)
To compile with Vivante header and use framebuffer, it is necessary to
pass option -DEGL_API_FB. This option is declared in pkg-config file of
Vivante library. But many packages (especialy qt5 components) does not
consider these flags.

So instead of patching every packages that use EGL, it is more
convenient to patch Vivante headers.

This commit add #define EGL_API_FB on top of eglvivante.h when
necessary.

[Thomas: fix syntax error.]

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

index c9842471d81f7b900efef0cb8bd8463a154cbdf1..d1d09a0cac6981fb48670c1c6d5cff20188868c5 100644 (file)
@@ -7,4 +7,4 @@ Name: egl
 Description: Freescale gpu-viv-bin-mx6q implementation of EGL
 Version: 1.0
 Libs: -L${libdir} -lGAL -lEGL
-Cflags: -I${includedir}/ -DEGL_API_FB=1
+Cflags: -I${includedir}/
index 7cfb5e7d6842cc9d63ca9953b8601bba6d9c37e0..74ce79260210855b47ed290d558cefa66f33c0f8 100644 (file)
@@ -7,4 +7,4 @@ Name: glesv2
 Description: Freescale gpu-viv-bin-mx6q implementation of OpenGL ESv2
 Version: 2.0
 Libs: -L${libdir} -lGAL -lEGL -lGLESv2
-Cflags: -I${includedir}/ -DEGL_API_FB=1
+Cflags: -I${includedir}/
index 79c7a926e07d44889f2ea1640f082ac9ae87b0ff..bad1658b940b75f3724a654d81787f62ceb52fbf 100644 (file)
@@ -46,16 +46,22 @@ define GPU_VIV_BIN_MX6Q_BUILD_CMDS
        ln -sf libGL.so.1.2 $(@D)/usr/lib/libGL.so.1.2.0
 endef
 
+ifeq ($(GPU_VIV_BIN_MX6Q_LIB_TARGET),fb)
+define GPU_VIV_BIN_MX6Q_FIXUP_FB_HEADERS
+       $(SED) '/#define EGLAPIENTRY/ a \
+               #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\
+               #define EGL_API_FB \n\
+               #endif' $(STAGING_DIR)/usr/include/EGL/eglvivante.h
+endef
+endif
+
 define GPU_VIV_BIN_MX6Q_INSTALL_STAGING_CMDS
        cp -r $(@D)/usr/* $(STAGING_DIR)/usr
+       $(GPU_VIV_BIN_MX6Q_FIXUP_FB_HEADERS)
        for lib in egl glesv2 vg; do \
                $(INSTALL) -m 0644 -D \
                        package/freescale-imx/gpu-viv-bin-mx6q/$${lib}.pc \
                        $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \
-               if [ "$(GPU_VIV_BIN_MX6Q_LIB_TARGET)" != "fb" ]; then \
-                       $(SED) "s/-DEGL_API_FB=1//" \
-                               $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \
-               fi; \
        done
 endef
 
index fb14005571abab49050f197c4dc6b09b832acda4..677a7ee5accc8a6c83dacc16a70d93d8cea71f38 100644 (file)
@@ -7,4 +7,4 @@ Name: vg
 Description: Freescale gpu-viv-bin-mx6q implementation of OpenVG
 Version: 1.1
 Libs: -L${libdir} -lGAL -lEGL -lOpenVG
-Cflags: -I${includedir}/ -DEGL_API_FB=1
+Cflags: -I${includedir}/