diff mbox

[v2,1/1] package/x11r7/libepoxy: Fix OpenGL / EGL dependencies

Message ID 1430943308-13319-1-git-send-email-bernd.kuhls@t-online.de
State Superseded
Headers show

Commit Message

Bernd Kuhls May 6, 2015, 8:15 p.m. UTC
Fixes
http://autobuild.buildroot.net/results/596/596f44a26aad45c027f0f4f97d63e97a1f4fd001

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: Add missing select lines to Config.in (Thomas)

 package/x11r7/libepoxy/Config.in   |   10 ++++++++--
 package/x11r7/libepoxy/libepoxy.mk |   12 +++++++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni July 10, 2015, 9:19 a.m. UTC | #1
Dear Bernd Kuhls,

On Wed,  6 May 2015 22:15:08 +0200, Bernd Kuhls wrote:

> diff --git a/package/x11r7/libepoxy/Config.in b/package/x11r7/libepoxy/Config.in
> index c4f5794..1b1ca3f 100644
> --- a/package/x11r7/libepoxy/Config.in
> +++ b/package/x11r7/libepoxy/Config.in
> @@ -1,7 +1,13 @@
>  config BR2_PACKAGE_LIBEPOXY
>  	bool "epoxy"
> -	depends on BR2_PACKAGE_MESA3D
> +	depends on BR2_PACKAGE_HAS_LIBEGL
> +	select BR2_PACKAGE_XLIB_LIBX11
> +	select BR2_PACKAGE_XUTIL_UTIL_MACROS

This doesn't make a lot of sense to me. Either you use EGL and you
don't X, or you have X and you don't EGL.

Can you explain a bit more what's going on here?

Thanks,

Thomas
Thomas Petazzoni July 27, 2015, 9:28 p.m. UTC | #2
Bernd,

If you have some time, can you get back to me about the below
questions, so that we can move forward with this patch?

Thanks,

Thomas

On Fri, 10 Jul 2015 11:19:52 +0200, Thomas Petazzoni wrote:
> Dear Bernd Kuhls,
> 
> On Wed,  6 May 2015 22:15:08 +0200, Bernd Kuhls wrote:
> 
> > diff --git a/package/x11r7/libepoxy/Config.in b/package/x11r7/libepoxy/Config.in
> > index c4f5794..1b1ca3f 100644
> > --- a/package/x11r7/libepoxy/Config.in
> > +++ b/package/x11r7/libepoxy/Config.in
> > @@ -1,7 +1,13 @@
> >  config BR2_PACKAGE_LIBEPOXY
> >  	bool "epoxy"
> > -	depends on BR2_PACKAGE_MESA3D
> > +	depends on BR2_PACKAGE_HAS_LIBEGL
> > +	select BR2_PACKAGE_XLIB_LIBX11
> > +	select BR2_PACKAGE_XUTIL_UTIL_MACROS
> 
> This doesn't make a lot of sense to me. Either you use EGL and you
> don't X, or you have X and you don't EGL.
> 
> Can you explain a bit more what's going on here?
> 
> Thanks,
> 
> Thomas
Jérôme Pouiller July 28, 2015, 8:23 a.m. UTC | #3
Hello Thomas,

On Friday 10 July 2015 11:19:52 Thomas Petazzoni wrote:
> Dear Bernd Kuhls,
> 
> On Wed,  6 May 2015 22:15:08 +0200, Bernd Kuhls wrote:
> 
> > diff --git a/package/x11r7/libepoxy/Config.in 
b/package/x11r7/libepoxy/Config.in
> > index c4f5794..1b1ca3f 100644
> > --- a/package/x11r7/libepoxy/Config.in
> > +++ b/package/x11r7/libepoxy/Config.in
> > @@ -1,7 +1,13 @@
> >  config BR2_PACKAGE_LIBEPOXY
> >  	bool "epoxy"
> > -	depends on BR2_PACKAGE_MESA3D
> > +	depends on BR2_PACKAGE_HAS_LIBEGL
> > +	select BR2_PACKAGE_XLIB_LIBX11
> > +	select BR2_PACKAGE_XUTIL_UTIL_MACROS
> 
> This doesn't make a lot of sense to me. Either you use EGL and you
> don't X, or you have X and you don't EGL.
As far as I understand, EGL is counterpart of GLX for GLESv2. As soon as you 
want to use GLEsv2, you need EGL. Therefore, EGL is not mutually exclusive 
with Xorg.

Here is an example program that work with Xorg and use EGL:
  http://exoticorn.de/simplegl.tgz
Thomas Petazzoni July 28, 2015, 9:02 a.m. UTC | #4
Dear Jérôme Pouiller,

On Tue, 28 Jul 2015 10:23:23 +0200, Jérôme Pouiller wrote:

> > This doesn't make a lot of sense to me. Either you use EGL and you
> > don't X, or you have X and you don't EGL.
> As far as I understand, EGL is counterpart of GLX for GLESv2. As soon as you 
> want to use GLEsv2, you need EGL. Therefore, EGL is not mutually exclusive 
> with Xorg.
> 
> Here is an example program that work with Xorg and use EGL:
>   http://exoticorn.de/simplegl.tgz

Ah, okay. Then I indeed misunderstood this. I'll look again at Bernd's
patch then. Thanks!

Thomas
diff mbox

Patch

diff --git a/package/x11r7/libepoxy/Config.in b/package/x11r7/libepoxy/Config.in
index c4f5794..1b1ca3f 100644
--- a/package/x11r7/libepoxy/Config.in
+++ b/package/x11r7/libepoxy/Config.in
@@ -1,7 +1,13 @@ 
 config BR2_PACKAGE_LIBEPOXY
 	bool "epoxy"
-	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_XUTIL_UTIL_MACROS
 	help
-	  Epoxy is a library for handling OpenGL function pointer management for you.
+	  Epoxy is a library for handling OpenGL function pointer
+	  management for you.
 
 	  https://github.com/anholt/libepoxy
+
+comment "epoxy needs an OpenGL EGL backend"
+	depends on !BR2_PACKAGE_HAS_LIBEGL
diff --git a/package/x11r7/libepoxy/libepoxy.mk b/package/x11r7/libepoxy/libepoxy.mk
index d908893..fc1ede4 100644
--- a/package/x11r7/libepoxy/libepoxy.mk
+++ b/package/x11r7/libepoxy/libepoxy.mk
@@ -8,8 +8,18 @@  LIBEPOXY_VERSION = v1.2
 LIBEPOXY_SITE = $(call github,anholt,libepoxy,$(LIBEPOXY_VERSION))
 LIBEPOXY_INSTALL_STAGING = YES
 LIBEPOXY_AUTORECONF = YES
-LIBEPOXY_DEPENDENCIES = mesa3d
+LIBEPOXY_DEPENDENCIES = \
+	$(if $(BR2_PACKAGE_HAS_LIBEGL),libegl) \
+	$(if $(BR2_PACKAGE_HAS_LIBGL),libgl)
 LIBEPOXY_LICENSE = MIT
 LIBEPOXY_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBEPOXY_CONF_ENV = \
+	CFLAGS="$(TARGET_CFLAGS) \
+		-I$(STAGING_DIR)/usr/include/IL \
+		-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \
+		-I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux"
+endif
+
 $(eval $(autotools-package))