Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <jezz@sysmic.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 03/14] gpu-viv-bin-mx6q: fix compiling issues with EGL_API_FB
Date: Tue,  2 Dec 2014 10:59:01 +0100	[thread overview]
Message-ID: <1417514352-8825-4-git-send-email-jezz@sysmic.org> (raw)
In-Reply-To: <1417514352-8825-1-git-send-email-jezz@sysmic.org>

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.

Signed-off-by: J?r?me Pouiller <jezz@sysmic.org>
---
 package/freescale-imx/gpu-viv-bin-mx6q/egl.pc              |  2 +-
 package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc           |  2 +-
 package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 10 ++++++----
 package/freescale-imx/gpu-viv-bin-mx6q/vg.pc               |  2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc b/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc
index c984247..d1d09a0 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc
@@ -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}/
diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc b/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc
index 7cfb5e7..74ce792 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc
@@ -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}/
diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk
index bc44e38..1158e42 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk
@@ -47,14 +47,16 @@ endef
 
 define GPU_VIV_BIN_MX6Q_INSTALL_STAGING_CMDS
 	cp -r $(@D)/usr/* $(STAGING_DIR)/usr
+	if [ $(GPU_VIV_BIN_MX6Q_LIB_TARGET) == fb ]; then \
+		$(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; \
+	fi
 	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
 
diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc b/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc
index fb14005..677a7ee 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc
@@ -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}/
-- 
1.9.1

  parent reply	other threads:[~2014-12-02  9:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02  9:58 [Buildroot] [PATCH v4 00/14] Add Xorg support for iMX6 Jérôme Pouiller
2014-12-02  9:58 ` [Buildroot] [PATCH v4 01/14] mesa3d: Give possibility to external backends to enable DRI/Gallium Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 02/14] gpu-viv-bin-mx6q: use self-extractible helper Jérôme Pouiller
2014-12-02  9:59 ` Jérôme Pouiller [this message]
2014-12-02  9:59 ` [Buildroot] [PATCH v4 04/14] gpu-viv-bin-mx6q: fix GLESv2 support Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 05/14] gpu-viv-bin-mx6q: make fb/x11 choice explicit Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 06/14] gpu-viv-bin-mx6q: change output selection mechanism Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 07/14] xdriver_xf86-video-imx-viv: new package Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 08/14] libdrm: fix support for xserver with Vivante drivers Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 09/14] qt5base: apply new patch naming policy Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 10/14] qt5base: fix Vivante x11/EGL configuration Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 11/14] Vivante drivers: bump to version 3.10.17-1.0.1 Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 12/14] nitrogen6x_defconfig: bump kernel to 3.10.17_1.0.1_ga Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 13/14] freescale_imx6*_defconfig: " Jérôme Pouiller
2014-12-02  9:59 ` [Buildroot] [PATCH v4 14/14] qmx6_defconfig: update Jérôme Pouiller
2014-12-03 19:25 ` [Buildroot] [PATCH v4 00/14] Add Xorg support for iMX6 Gary Bisson
2014-12-04 13:14   ` Jérôme Pouiller
2014-12-04 19:22     ` Gary Bisson
2014-12-04 21:19       ` Jérôme Pouiller
2014-12-04 21:46         ` Gary Bisson
2014-12-05 20:49           ` Gary Bisson
2014-12-05 22:44         ` Thomas Petazzoni
2014-12-08 10:32           ` Jérôme Pouiller
2014-12-05 22:39       ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417514352-8825-4-git-send-email-jezz@sysmic.org \
    --to=jezz@sysmic.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox