diff --git a/.gitignore b/.gitignore index 3e3d469..ab7c531 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/v1.3.1.tar.gz +SOURCES/libepoxy-1.5.2.tar.xz diff --git a/.libepoxy.metadata b/.libepoxy.metadata index 2c01ee8..edc3d5e 100644 --- a/.libepoxy.metadata +++ b/.libepoxy.metadata @@ -1 +1 @@ -94d98d83a50d2f607ee9986b622a48df00d5926c SOURCES/v1.3.1.tar.gz +562299851abb92a9e000d96f87a9e80aee80bf17 SOURCES/libepoxy-1.5.2.tar.xz diff --git a/SOURCES/0001-Fix-ppc64le-and-arm64.patch b/SOURCES/0001-Fix-ppc64le-and-arm64.patch deleted file mode 100644 index e069baf..0000000 --- a/SOURCES/0001-Fix-ppc64le-and-arm64.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 50d865007906b79e4ba0e5dd717136f17de3713a Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Fri, 27 Jan 2017 13:38:37 -0500 -Subject: [PATCH] Fix ppc64le and arm64 - ---- - test/dlwrap.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/test/dlwrap.c b/test/dlwrap.c -index 9d1add5..5cda6b9 100644 ---- a/test/dlwrap.c -+++ b/test/dlwrap.c -@@ -232,6 +232,7 @@ dlwrap_real_dlsym(void *handle, const char *name) - * In the meantime, I'll just keep augmenting this - * hard-coded version list as people report bugs. */ - const char *version[] = { -+ "GLIBC_2.17", - "GLIBC_2.3", - "GLIBC_2.2.5", - "GLIBC_2.2", --- -2.9.3 - diff --git a/SOURCES/0001-test-Fix-dlwrap-on-ppc64-and-s390x.patch b/SOURCES/0001-test-Fix-dlwrap-on-ppc64-and-s390x.patch deleted file mode 100644 index dfd7c27..0000000 --- a/SOURCES/0001-test-Fix-dlwrap-on-ppc64-and-s390x.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ce5afcca4648b34e2ce9f7804a5444f81d94e07d Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Thu, 5 Nov 2015 10:26:03 -0500 -Subject: [PATCH] test: Fix dlwrap on ppc64 and s390x - -These have dlsym versions of GLIBC_2.3 and GLIBC_2.2, respectively. - -Signed-off-by: Adam Jackson ---- - test/dlwrap.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/test/dlwrap.c b/test/dlwrap.c -index b104da4..9d1add5 100644 ---- a/test/dlwrap.c -+++ b/test/dlwrap.c -@@ -232,7 +232,9 @@ dlwrap_real_dlsym(void *handle, const char *name) - * In the meantime, I'll just keep augmenting this - * hard-coded version list as people report bugs. */ - const char *version[] = { -+ "GLIBC_2.3", - "GLIBC_2.2.5", -+ "GLIBC_2.2", - "GLIBC_2.0" - }; - int num_versions = sizeof(version) / sizeof(version[0]); --- -2.9.3 - diff --git a/SOURCES/libepoxy-handle-lack-of-GLX.patch b/SOURCES/libepoxy-handle-lack-of-GLX.patch deleted file mode 100644 index 57d1c75..0000000 --- a/SOURCES/libepoxy-handle-lack-of-GLX.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 31a1fd9d6dcf298b7ed61ac06d54e6f9cd2dee03 Mon Sep 17 00:00:00 2001 -From: Yaron Cohen-Tal -Date: Fri, 29 Jul 2016 17:55:49 +0300 -Subject: [PATCH 1/3] Check for NULL extensions string - -Some X server not supporting any OpenGL feature, glXQueryExtensionsString -will return NULL and causes the function to fail. - -Thanks to Emmanuel Stapf (manus@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 - -Signed-off-by: Emmanuele Bassi ---- - src/dispatch_common.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/dispatch_common.c b/src/dispatch_common.c -index 013027f85bd5..ba6fca373d76 100644 ---- a/src/dispatch_common.c -+++ b/src/dispatch_common.c -@@ -347,6 +347,8 @@ epoxy_conservative_gl_version(void) - 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); - --- -2.14.3 - - -From 7a1a79ec3b68857f8a0b1d26811fec2d00ea4fb2 Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Wed, 7 Dec 2016 15:12:15 +0000 -Subject: [PATCH 2/3] Avoid C99 declaration after statement - -The rest of the library is C89-only, so we should keep it that way. ---- - src/dispatch_common.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/dispatch_common.c b/src/dispatch_common.c -index ba6fca373d76..4f58be2caed2 100644 ---- a/src/dispatch_common.c -+++ b/src/dispatch_common.c -@@ -347,11 +347,12 @@ epoxy_conservative_gl_version(void) - 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); - -+ if (extension_list == NULL || *extension_list == '\0') -+ return false; -+ - /* Make sure that don't just find an extension with our name as a prefix. */ - while (true) { - ptr = strstr(ptr, ext); --- -2.14.3 - - -From 40d724e11ea37a4177bbb04fbe954c840c8e102d Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Mon, 12 Dec 2016 14:18:15 +0000 -Subject: [PATCH 3/3] Ensure we don't assert if GLX is not available - -Certain X server do not have GLX enabled or supported, such as x2go. We -can handle this case gracefully inside libepoxy. - -Signed-off-by: Emmanuele Bassi ---- - src/dispatch_glx.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/dispatch_glx.c b/src/dispatch_glx.c -index 78e61c24a761..9e4cef62c86a 100644 ---- a/src/dispatch_glx.c -+++ b/src/dispatch_glx.c -@@ -57,11 +57,17 @@ epoxy_glx_version(Display *dpy, int screen) - int ret; - - version_string = glXQueryServerString(dpy, screen, GLX_VERSION); -+ if (!version_string) -+ return 0; -+ - ret = sscanf(version_string, "%d.%d", &server_major, &server_minor); - assert(ret == 2); - server = server_major * 10 + server_minor; - - version_string = glXGetClientString(dpy, GLX_VERSION); -+ if (!version_string) -+ return 0; -+ - ret = sscanf(version_string, "%d.%d", &client_major, &client_minor); - assert(ret == 2); - client = client_major * 10 + client_minor; --- -2.14.3 - diff --git a/SPECS/libepoxy.spec b/SPECS/libepoxy.spec index 34c2c88..6ffb931 100644 --- a/SPECS/libepoxy.spec +++ b/SPECS/libepoxy.spec @@ -1,23 +1,10 @@ -#global gitdate 20140411 - -#global commit 6eb075c70e2f91a9c45a90677bd46e8fb0432655 -#global shortcommit %(c=%{commit}; echo ${c:0:7}) - Summary: epoxy runtime library Name: libepoxy -Version: 1.3.1 -Release: 2%{?dist} +Version: 1.5.2 +Release: 1%{?dist} License: MIT URL: http://github.com/anholt/libepoxy -# github url - generated archive -#ource0: https://github.com/anholt/libepoxy/archive/%{commit}/%{name}-%{commit}.tar.gz -Source0: https://github.com/anholt/libepoxy/archive/v%{version}/v%{version}.tar.gz - -Patch0: 0001-test-Fix-dlwrap-on-ppc64-and-s390x.patch -Patch1: 0001-Fix-ppc64le-and-arm64.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1566101 -Patch2: libepoxy-handle-lack-of-GLX.patch +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz BuildRequires: automake autoconf libtool BuildRequires: mesa-libGL-devel @@ -25,6 +12,8 @@ BuildRequires: mesa-libEGL-devel BuildRequires: mesa-libGLES-devel BuildRequires: xorg-x11-util-macros BuildRequires: python +BuildRequires: xorg-x11-server-Xvfb mesa-dri-drivers +BuildRequires: glx-utils xdpyinfo %description A library for handling OpenGL function pointer management. @@ -38,10 +27,7 @@ This package contains libraries and header files for developing applications that use %{name}. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 %build autoreconf -vif || exit 1 @@ -49,15 +35,18 @@ autoreconf -vif || exit 1 make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install DESTDIR=$RPM_BUILD_ROOT # NOTE: We intentionally don't ship *.la files find $RPM_BUILD_ROOT -type f -name '*.la' -delete -print %check -# In theory this is fixed in 1.2 but we still see errors on most platforms -# https://github.com/anholt/libepoxy/issues/24 -make check # || ( cat test/test-suite.log ; objdump -T %{_libdir}/libdl.so.? ) +xvfb-run -d -s "-screen 0 640x480x24" make check || \ +%ifarch s390 ppc + (cat `find . -name test-suite.log` ; exit 0) +%else + (cat `find . -name test-suite.log` ; exit 1) +%endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -74,6 +63,9 @@ make check # || ( cat test/test-suite.log ; objdump -T %{_libdir}/libdl.so.? ) %{_libdir}/pkgconfig/epoxy.pc %changelog +* Tue May 22 2018 Adam Jackson - 1.5.2-1 +- epoxy 1.5.2 + * Wed Apr 11 2018 Debarshi Ray - 1.3.1-2 - Prevent crash in epoxy_glx_version if GLX is not available Resolves: #1566101