Control: tags 850033 + patch
Control: tags 850033 + pending

Dear maintainer,

I've prepared an NMU for libepoxy (versioned as 1.3.1-1.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru libepoxy-1.3.1/debian/changelog libepoxy-1.3.1/debian/changelog
--- libepoxy-1.3.1/debian/changelog     2015-08-29 16:10:12.000000000 +0200
+++ libepoxy-1.3.1/debian/changelog     2017-01-19 01:19:17.000000000 +0100
@@ -1,3 +1,10 @@
+libepoxy (1.3.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport three upstream commits. (Closes: #850033) 
+
+ -- Jérémy Lal <kapo...@melix.org>  Thu, 19 Jan 2017 01:19:17 +0100
+
 libepoxy (1.3.1-1) unstable; urgency=low
 
   * Upgrade to upstream v1.3.1 release and make the -dev package multi-arch.
diff -Nru libepoxy-1.3.1/debian/patches/series 
libepoxy-1.3.1/debian/patches/series
--- libepoxy-1.3.1/debian/patches/series        1970-01-01 01:00:00.000000000 
+0100
+++ libepoxy-1.3.1/debian/patches/series        2017-01-19 00:40:06.000000000 
+0100
@@ -0,0 +1,3 @@
+upstream/b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc.patch
+upstream/8d58c890646fc1f43bcab702bb9ed6bae94daefe.patch
+upstream/b8d609e8f9fc1f9c4ff359adb2c1c44619a9e7cf.patch
diff -Nru 
libepoxy-1.3.1/debian/patches/upstream/8d58c890646fc1f43bcab702bb9ed6bae94daefe.patch
 
libepoxy-1.3.1/debian/patches/upstream/8d58c890646fc1f43bcab702bb9ed6bae94daefe.patch
--- 
libepoxy-1.3.1/debian/patches/upstream/8d58c890646fc1f43bcab702bb9ed6bae94daefe.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
libepoxy-1.3.1/debian/patches/upstream/8d58c890646fc1f43bcab702bb9ed6bae94daefe.patch
       2017-01-19 00:41:22.000000000 +0100
@@ -0,0 +1,50 @@
+From: Yaron Cohen-Tal <yaro...@gmail.com>
+Date: Mon, 21 Sep 2015 19:58:03 +0300
+Subject: [PATCH] Fix "epoxy_egl_get_current_gl_context_api" to use
+ "eglQueryContext" with "EGL_CONTEXT_CLIENT_TYPE" as "attribute".
+
+---
+ src/dispatch_common.c | 32 +++++++-------------------------
+ 1 file changed, 7 insertions(+), 25 deletions(-)
+
+--- a/src/dispatch_common.c
++++ b/src/dispatch_common.c
+@@ -569,31 +569,13 @@
+ static EGLenum
+ epoxy_egl_get_current_gl_context_api(void)
+ {
+-    EGLenum save_api = eglQueryAPI();
+-    EGLContext ctx;
+-
+-    if (eglBindAPI(EGL_OPENGL_API)) {
+-        ctx = eglGetCurrentContext();
+-        if (ctx) {
+-            eglBindAPI(save_api);
+-            return EGL_OPENGL_API;
+-        }
+-    } else {
+-        (void)eglGetError();
+-    }
+-
+-    if (eglBindAPI(EGL_OPENGL_ES_API)) {
+-        ctx = eglGetCurrentContext();
+-        eglBindAPI(save_api);
+-        if (ctx) {
+-            eglBindAPI(save_api);
+-            return EGL_OPENGL_ES_API;
+-        }
+-    } else {
+-        (void)eglGetError();
+-    }
+-
+-    return EGL_NONE;
++    EGLDisplay eglDisplay = eglGetCurrentDisplay();
++    EGLContext eglContext = eglGetCurrentContext();
++    EGLint eglContextClientType = EGL_NONE;
++    return      eglQueryContext(eglDisplay, eglContext, 
EGL_CONTEXT_CLIENT_TYPE,
++                                &eglContextClientType) == EGL_TRUE
++           ?    (EGLenum)eglContextClientType
++           :    EGL_NONE;
+ }
+ #endif /* PLATFORM_HAS_EGL */
+ 
diff -Nru 
libepoxy-1.3.1/debian/patches/upstream/b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc.patch
 
libepoxy-1.3.1/debian/patches/upstream/b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc.patch
--- 
libepoxy-1.3.1/debian/patches/upstream/b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
libepoxy-1.3.1/debian/patches/upstream/b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc.patch
       2017-01-19 00:41:15.000000000 +0100
@@ -0,0 +1,51 @@
+From: Yaron Cohen-Tal <yaro...@gmail.com>
+Date: Tue, 29 Sep 2015 11:57:55 +0300
+Subject: [PATCH] Fix "epoxy_glx_version" to handle the case when GLX is not
+ active on the display.
+
+---
+ src/dispatch_glx.c | 29 +++++++++++++++--------------
+ 1 file changed, 15 insertions(+), 14 deletions(-)
+
+diff --git a/src/dispatch_glx.c b/src/dispatch_glx.c
+index f1ff447..36d513a 100644
+--- a/src/dispatch_glx.c
++++ b/src/dispatch_glx.c
+@@ -54,22 +54,23 @@ epoxy_glx_version(Display *dpy, int screen)
+     int client_major, client_minor;
+     int server, client;
+     const char *version_string;
+-    int ret;
++    int ret=0, sscanf_ret;
+ 
+-    version_string = glXQueryServerString(dpy, screen, GLX_VERSION);
+-    ret = sscanf(version_string, "%d.%d", &server_major, &server_minor);
+-    assert(ret == 2);
+-    server = server_major * 10 + server_minor;
++    if ((version_string = glXQueryServerString(dpy, screen, GLX_VERSION)))
++    {
++        sscanf_ret = sscanf(version_string, "%d.%d", &server_major, 
&server_minor);
++        assert(sscanf_ret == 2);
++        server = server_major * 10 + server_minor;
++        if ((version_string = glXGetClientString(dpy, GLX_VERSION)))
++        {
++            sscanf_ret = sscanf(version_string, "%d.%d", &client_major, 
&client_minor);
++            assert(sscanf_ret == 2);
++            client = client_major * 10 + client_minor;
++            ret = client <= server  ?  client  :  server;
++        }
++    }
+ 
+-    version_string = glXGetClientString(dpy, GLX_VERSION);
+-    ret = sscanf(version_string, "%d.%d", &client_major, &client_minor);
+-    assert(ret == 2);
+-    client = client_major * 10 + client_minor;
+-
+-    if (client < server)
+-        return client;
+-    else
+-        return server;
++    return ret;
+ }
+ 
+ /**
diff -Nru 
libepoxy-1.3.1/debian/patches/upstream/b8d609e8f9fc1f9c4ff359adb2c1c44619a9e7cf.patch
 
libepoxy-1.3.1/debian/patches/upstream/b8d609e8f9fc1f9c4ff359adb2c1c44619a9e7cf.patch
--- 
libepoxy-1.3.1/debian/patches/upstream/b8d609e8f9fc1f9c4ff359adb2c1c44619a9e7cf.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
libepoxy-1.3.1/debian/patches/upstream/b8d609e8f9fc1f9c4ff359adb2c1c44619a9e7cf.patch
       2017-01-19 00:41:31.000000000 +0100
@@ -0,0 +1,23 @@
+From: Yaron Cohen-Tal <yaro...@gmail.com>
+Date: Fri, 29 Jul 2016 17:55:49 +0300
+Subject: [PATCH] Fox some X server not supporting any OpenGL feature,
+ glXQueryExtensionsString will return NULL and causes the function to fail.
+ Thanx to Emmanuel Stapf (ma...@eiffel.com) for the original patch.
+
+This was verified running an application on macOS while the X server was 
running
+on Windows Xming 7.5.0.10
+---
+ src/dispatch_common.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/dispatch_common.c
++++ b/src/dispatch_common.c
+@@ -347,6 +347,8 @@
+ bool
+ epoxy_extension_in_string(const char *extension_list, const char *ext)
+ {
++    if (!extension_list)
++        return false;
+     const char *ptr = extension_list;
+     int len = strlen(ext);
+ 

Reply via email to