From 7762076a1720619cbc814b605faa76bbd8226873 Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Thu, 17 Oct 2013 13:52:32 +0200 Subject: [PATCH] mesa-gl: fix unresolved symbols when building cogl --- .../mesa/mesa-gl-9.1.6/01_gbm_egl.patch | 23 +++++++++++++++ .../mesa-gl-9.1.6/02_gbm_no_undefined.patch | 29 +++++++++++++++++++ .../mesa/mesa-gl_9.1.6.bbappend | 5 ++++ 3 files changed, 57 insertions(+) create mode 100644 meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/01_gbm_egl.patch create mode 100644 meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/02_gbm_no_undefined.patch diff --git a/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/01_gbm_egl.patch b/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/01_gbm_egl.patch new file mode 100644 index 00000000..4769c99e --- /dev/null +++ b/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/01_gbm_egl.patch @@ -0,0 +1,23 @@ +Source: git://git.debian.org/git/pkg-xorg/lib/mesa +commit f18181516aef48395304122a804b4f7d036cb73f +Author: Julien Cristau +Date: Tue Jun 25 21:30:34 2013 +0200 + + Don't call wayland_buffer_is_drm from libgbm, it's in libEGL + + Closes: #712556 + +diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c +index a3a0530..92d1a36 100644 +--- a/src/gbm/backends/dri/gbm_dri.c ++++ b/src/gbm/backends/dri/gbm_dri.c +@@ -376,9 +376,6 @@ gbm_dri_bo_import(struct gbm_device *gbm, + { + struct wl_drm_buffer *wb = (struct wl_drm_buffer *) buffer; + +- if (!wayland_buffer_is_drm(buffer)) +- return NULL; +- + image = wb->driver_buffer; + + switch (wb->format) { diff --git a/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/02_gbm_no_undefined.patch b/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/02_gbm_no_undefined.patch new file mode 100644 index 00000000..66664758 --- /dev/null +++ b/meta-opendreambox/recipes-graphics/mesa/mesa-gl-9.1.6/02_gbm_no_undefined.patch @@ -0,0 +1,29 @@ +Source: git://git.debian.org/git/pkg-xorg/lib/mesa +commit 012d959a18d229601de040d8d557572330809eb9 +Author: Julien Cristau +Date: Tue Jun 25 21:33:41 2013 +0200 + + Make sure libgbm doesn't have undefined symbols. + +diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am +index e22c55c..556eb03 100644 +--- a/src/gbm/Makefile.am ++++ b/src/gbm/Makefile.am +@@ -18,7 +18,7 @@ libgbm_la_SOURCES = \ + main/gbm.c \ + main/backend.c \ + main/common.c +-libgbm_la_LDFLAGS = -version-info 1:0 ++libgbm_la_LDFLAGS = -version-info 1:0 -Wl,-z,defs + libgbm_la_LIBADD = $(LIBUDEV_LIBS) $(LIBKMS_LIBS) $(DLOPEN_LIBS) + + if HAVE_EGL_PLATFORM_WAYLAND +@@ -39,6 +39,8 @@ libgbm_dri_la_CFLAGS = \ + + libgbm_la_LIBADD += \ + libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la ++ ++libgbm_la_LDFLAGS += $(LIBDRM_LIBS) + endif + + all-local: libgbm.la diff --git a/meta-opendreambox/recipes-graphics/mesa/mesa-gl_9.1.6.bbappend b/meta-opendreambox/recipes-graphics/mesa/mesa-gl_9.1.6.bbappend index 059ebc4a..d190416b 100644 --- a/meta-opendreambox/recipes-graphics/mesa/mesa-gl_9.1.6.bbappend +++ b/meta-opendreambox/recipes-graphics/mesa/mesa-gl_9.1.6.bbappend @@ -1,3 +1,8 @@ +SRC_URI += "file://01_gbm_egl.patch \ + file://02_gbm_no_undefined.patch" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" + PACKAGECONFIG = "dri \ ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'wayland', 'egl wayland', '', d)} \ -- 2.20.1