From patchwork Fri Jan 16 23:33:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 430062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 8F7301401EF for ; Sat, 17 Jan 2015 10:35:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id AEF2EA15BB; Fri, 16 Jan 2015 23:34:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HSBPESykUZpG; Fri, 16 Jan 2015 23:34:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0F9F3A151B; Fri, 16 Jan 2015 23:34:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 04BEC1C29D1 for ; Fri, 16 Jan 2015 23:34:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F0F879211A for ; Fri, 16 Jan 2015 23:34:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v+wYGyL6EfDe for ; Fri, 16 Jan 2015 23:34:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 26DEC92112 for ; Fri, 16 Jan 2015 23:34:22 +0000 (UTC) Received: from lupi.online.net (sysmic.org [62.210.89.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id 9AD1540821; Sat, 17 Jan 2015 00:34:14 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Sat, 17 Jan 2015 00:33:58 +0100 Message-Id: <1421451251-23366-3-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421451251-23366-1-git-send-email-jezz@sysmic.org> References: <1421451251-23366-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: Thomas Petazzoni , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH v6 02/15] gpu-viv-bin-mx6q: fix compiling issues with EGL_API_FB X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Tested-by: Gary Bisson --- 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 79c7a92..eb54b80 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 @@ -48,14 +48,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}/