x11-apps/mesa-progs: Patch out more of EGL_MESA_screen_surface.
authorMatt Turner <mattst88@gentoo.org>
Sat, 29 Aug 2015 17:49:52 +0000 (10:49 -0700)
committerMatt Turner <mattst88@gentoo.org>
Sat, 29 Aug 2015 17:50:59 +0000 (10:50 -0700)
Bug: https://bugs.gentoo.org/555186

x11-apps/mesa-progs/files/mesa-progs-8.2.0-remove-EGL_SCREEN_BIT_MESA.patch [new file with mode: 0644]
x11-apps/mesa-progs/mesa-progs-8.2.0.ebuild

diff --git a/x11-apps/mesa-progs/files/mesa-progs-8.2.0-remove-EGL_SCREEN_BIT_MESA.patch b/x11-apps/mesa-progs/files/mesa-progs-8.2.0-remove-EGL_SCREEN_BIT_MESA.patch
new file mode 100644 (file)
index 0000000..f0389cb
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index 2ee6f15..9921746 100644
+--- a/src/egl/eglut/eglut.c
++++ b/src/egl/eglut/eglut.c
+@@ -76,8 +76,7 @@ _eglutNow(void)
+ static void
+ _eglutDestroyWindow(struct eglut_window *win)
+ {
+-   if (_eglut->surface_type != EGL_PBUFFER_BIT &&
+-       _eglut->surface_type != EGL_SCREEN_BIT_MESA)
++   if (_eglut->surface_type != EGL_PBUFFER_BIT)
+       eglDestroySurface(_eglut->dpy, win->surface);
+    _eglutNativeFiniWindow(win);
+@@ -175,7 +174,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
+             win->config, win->native.u.pixmap, NULL);
+       break;
+    case EGL_PBUFFER_BIT:
+-   case EGL_SCREEN_BIT_MESA:
+       win->surface = win->native.u.surface;
+       break;
+    default:
+@@ -289,9 +287,7 @@ eglutDestroyWindow(int win)
+    if (window->index != win)
+       return;
+-   /* XXX it causes some bug in st/egl KMS backend */
+-   if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
+-      eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
++   eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+    _eglutDestroyWindow(_eglut->current);
+ }
index 359aad5ebefe23bca9094ad726bcdbe45783cbb1..136546b02fc3241ed48ba1151056b73085abccb4 100644 (file)
@@ -42,6 +42,10 @@ DEPEND="${RDEPEND}
 S=${WORKDIR}/${MY_P}
 EGIT_CHECKOUT_DIR=${S}
 
+PATCHES=(
+       "${FILESDIR}"/${P}-remove-EGL_SCREEN_BIT_MESA.patch
+)
+
 src_unpack() {
        default
        [[ $PV = 9999* ]] && git-r3_src_unpack