Skip to contentSkip to conversation

package/x11r7/libepoxy: Fix OpenGL / EGL dependencies

PATCH Superseded Bernd Kuhls 2 participants 2 messages May 2, 2015 – May 6, 2015

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/x11r7/libepoxy: Fix OpenGL / EGL dependencies

libepoxy depeneds on EGL, OpenGL is an optional dependency. These packages can also be provided by other packages, not only mesa3d. In order to avoid build errors with rpi-userland, it installs its header files in an usual place, two upstream patches are backported.

Fixes
http://autobuild.buildroot.net/results/596/596f44a26aad45c027f0f4f97d63e97a1f4fd001

---
v2: Check for egl by using pkgconfig (Thomas)

 package/x11r7/libepoxy/0001-egl-pkgconfig.patch    |   59 ++++++++++++++++++
 .../x11r7/libepoxy/0002-Avoid-name-conflict.patch  |   64 ++++++++++++++++++++
 package/x11r7/libepoxy/Config.in                   |    8 ++-
 package/x11r7/libepoxy/libepoxy.mk                 |    4 +-
 4 files changed, 132 insertions(+), 3 deletions(-)
 create mode 100644 package/x11r7/libepoxy/0001-egl-pkgconfig.patch
 create mode 100644 package/x11r7/libepoxy/0002-Avoid-name-conflict.patch
package/x11r7/libepoxy/0001-egl-pkgconfig.patch new file +59 -0
new file mode 100644
index 0000000..b725c28
@@ -0,0 +1,59 @@
+From d56f21c494b315306215c4730835a9b291360e9b Mon Sep 17 00:00:00 2001
+From: Eric Anholt <[email protected]>
+Date: Fri, 13 Jun 2014 14:59:37 -0700
+Subject: [PATCH] Use the EGL pkgconfig for finding eglplatform.h.
+
+We don't ever explicity link against libEGL, so no need to make use of
+EGL_LIBS.
+
+Fixes #30.
+
+Upstream status: committed
+https://github.com/anholt/libepoxy/commit/d56f21c494b315306215c4730835a9b291360e9b
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ configure.ac     | 1 +
+ src/Makefile.am  | 1 +
+ test/Makefile.am | 4 +++-
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 399e351..f97c9b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,6 +98,7 @@ AC_SUBST(EPOXY_LINK_LIBS)
+ 
+ AM_CONDITIONAL(BUILD_EGL, test x$build_egl = xyes)
+ if test x$build_egl = xyes; then
++    PKG_CHECK_MODULES(EGL, [egl])
+     AC_DEFINE([BUILD_EGL], [1], [build EGL tests])
+ fi
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8e20cd6..49c3507 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -28,6 +28,7 @@ AM_CFLAGS = \
+ 	$(CWARNFLAGS) \
+ 	$(VISIBILITY_CFLAGS) \
+ 	$(X11_CFLAGS) \
++	$(EGL_CFLAGS) \
+ 	$()
+ 
+ epoxyincludedir = $(includedir)/epoxy
+diff --git a/test/Makefile.am b/test/Makefile.am
+index ffb330e..f29baca 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -46,7 +46,9 @@ libwgl_common_la_LIBADD = $(EPOXY)
+ AM_CPPFLAGS = \
+ 	-I$(top_srcdir)/include \
+ 	-I$(top_builddir)/include \
+-	$(X11_CFLAGS)
++	$(X11_CFLAGS) \
++	$(EGL_CFLAGS) \
++	$()
+ 
+ AM_CFLAGS = $(CWARNFLAGS)
+ 
package/x11r7/libepoxy/0002-Avoid-name-conflict.patch new file +64 -0

64 lines not on this page · raw message

package/x11r7/libepoxy/Config.in +6 -2
index c4f5794..875ccc5 100644
@@ -1,7 +1,11 @@
 config BR2_PACKAGE_LIBEPOXY
 	bool "epoxy"
-	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	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
package/x11r7/libepoxy/libepoxy.mk +3 -1
index d908893..001d05d 100644
@@ -8,7 +8,9 @@ LIBEPOXY_VERSION = v1.2
 LIBEPOXY_SITE = $(call github,anholt,libepoxy,$(LIBEPOXY_VERSION))
 LIBEPOXY_INSTALL_STAGING = YES
 LIBEPOXY_AUTORECONF = YES
-LIBEPOXY_DEPENDENCIES = mesa3d
+LIBEPOXY_DEPENDENCIES = xlib_libX11 xutil_util-macros \
+	$(if $(BR2_PACKAGE_HAS_LIBEGL),libegl) \
+	$(if $(BR2_PACKAGE_HAS_LIBGL),libgl)
 LIBEPOXY_LICENSE = MIT
 LIBEPOXY_LICENSE_FILES = COPYING
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 package/x11r7/libepoxy: Fix OpenGL / EGL dependencies

Dear Bernd Kuhls,

Quoted 24 lines · Bernd Kuhls

+ egl_has_extension_nocontext_LDADD = $(EPOXY) libegl_common.la $(X11_LIBS)

package/x11r7/libepoxy/Config.in +6 -2
index c4f5794..875ccc5 100644
@@ -1,7 +1,11 @@
 config BR2_PACKAGE_LIBEPOXY
 	bool "epoxy"
-	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	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
package/x11r7/libepoxy/libepoxy.mk +0 -0
index d908893..001d05d 100644

package/x11r7/libepoxy/libepoxy.mk LIBEPOXY_VERSION = v1.2 · line 11

Quoted 5 lines
package/x11r7/libepoxy/libepoxy.mk +1 -1
@@ -8,7 +8,9 @@ LIBEPOXY_VERSION = v1.2
 LIBEPOXY_SITE = $(call github,anholt,libepoxy,$(LIBEPOXY_VERSION))
 LIBEPOXY_INSTALL_STAGING = YES
 LIBEPOXY_AUTORECONF = YES
-LIBEPOXY_DEPENDENCIES = mesa3d
+LIBEPOXY_DEPENDENCIES = xlib_libX11 xutil_util-macros \

So you need to select xlib_libX11 and xutil_util-macros in the Config.in file.

Can you respin to fix this?

Thanks a lot,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com