Accepting request 829037 from home:dirkmueller:branches:X11:XOrg

- update to 1.3.2:
  * Update GL/gl.h to match Mesa. 
  * GLdispatch: Improve the x86 tsd stubs performance.
  * GLdispatch: Define dynamic dispatch stubs at compile time. 
  * GLdispatch: Change entry_generate_default_code to take an index. 
  * GLdispatch: Use all 4096 dynamic dispatch stubs.
  * Remove -Werror from default CFLAGS
- run tests
- add disable-glx-tests.patch: disable tests that require X
- remove 0001-include-install-GL-headers-when-GL-is-enabled.patch
  0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch
  0003-egl-Sync-with-Khronos.patch - upstream

OBS-URL: https://build.opensuse.org/request/show/829037
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libglvnd?expand=0&rev=48
This commit is contained in:
Stefan Dirsch 2020-08-24 20:52:46 +00:00 committed by Git OBS Bridge
parent 5408f41a8c
commit e6c552c770
10 changed files with 73 additions and 278 deletions

View File

@ -1,28 +0,0 @@
From 6f52473dac08c44b081b792874b4ce73122096da Mon Sep 17 00:00:00 2001
From: Eric Engestrom <eric@engestrom.ch>
Date: Mon, 30 Sep 2019 16:06:42 +0100
Subject: [PATCH 1/3] include: install GL headers when GL is enabled
A typo made it depend on EGL instead.
Fixes: ab9b5fcc3bf90064418f ("Install the GL/GLES/GLX/EGL header files.")
---
include/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/Makefile.am b/include/Makefile.am
index 1e33d2d..3d81d17 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -39,7 +39,7 @@ EGL_HEADER_FILES = \
EGL/eglext.h \
EGL/eglplatform.h
-if ENABLE_EGL_HEADERS
+if ENABLE_GL_HEADERS
nobase_include_HEADERS += $(GL_HEADER_FILES)
else
noinst_HEADERS += $(GL_HEADER_FILES)
--
2.16.4

View File

@ -1,122 +0,0 @@
From 3a1fb32c3b2ba0bc28952759c33dc98bb5260125 Mon Sep 17 00:00:00 2001
From: Laurent Carlier <lordheavym@gmail.com>
Date: Tue, 8 Oct 2019 16:34:16 +0000
Subject: [PATCH 2/3] Add a configure option to disable glesv1 or glesv2
Because mesa can be built without glesv1 so it breaks autodetection.
Fixes: https://bugs.archlinux.org/task/64032 ('mesa-demos doesn't build, unable to find GLES/gl.h')
---
configure.ac | 23 +++++++++++++++--------
include/Makefile.am | 24 ++++++++++++++++++------
src/Makefile.am | 4 +++-
3 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index faa0379..eb68d3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,13 +70,19 @@ if test "x$enable_x11" != "xyes" -a "x$enable_glx" = "xyes" ; then
AC_MSG_ERROR([Can't build GLX without X11.])
fi
-AC_ARG_ENABLE([gles],
- [AS_HELP_STRING([--disable-gles],
- [Do not build the libGLES*.so libraries @<:@default=enabled@:>@])],
- [enable_gles="$enableval"],
- [enable_gles=yes]
-)
-AM_CONDITIONAL([ENABLE_GLES], [test "x$enable_gles" = "xyes"])
+AC_ARG_ENABLE([gles1],
+ [AS_HELP_STRING([--disable-gles1],
+ [disable support for OpenGL ES 1.x API @<:@default=enabled@:>@])],
+ [enable_gles1="$enableval"],
+ [enable_gles1=yes])
+AM_CONDITIONAL([ENABLE_GLES1], [test "x$enable_gles1" = "xyes"])
+
+AC_ARG_ENABLE([gles2],
+ [AS_HELP_STRING([--disable-gles2],
+ [disable support for OpenGL ES 2.x and 3.x API @<:@default=enabled@:>@])],
+ [enable_gles2="$enableval"],
+ [enable_gles2=yes])
+AM_CONDITIONAL([ENABLE_GLES2], [test "x$enable_gles2" = "xyes"])
AC_ARG_ENABLE([headers],
[AS_HELP_STRING([--disable-headers],
@@ -87,7 +93,8 @@ AC_ARG_ENABLE([headers],
AM_CONDITIONAL([ENABLE_GL_HEADERS], [test "x$enable_headers" = "xyes"])
AM_CONDITIONAL([ENABLE_EGL_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_egl" = "xyes"])
AM_CONDITIONAL([ENABLE_GLX_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_glx" = "xyes"])
-AM_CONDITIONAL([ENABLE_GLES_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles" = "xyes"])
+AM_CONDITIONAL([ENABLE_GLES1_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles1" = "xyes"])
+AM_CONDITIONAL([ENABLE_GLES2_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles2" = "xyes"])
dnl
dnl Arch/platform-specific settings. Copied from mesa
diff --git a/include/Makefile.am b/include/Makefile.am
index 3d81d17..0c41dc7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -17,14 +17,18 @@ GL_HEADER_FILES = \
GL/glext.h \
KHR/khrplatform.h
-GLES_HEADER_FILES = \
+GLES1_HEADER_FILES = \
GLES/egl.h \
GLES/gl.h \
GLES/glext.h \
- GLES/glplatform.h \
+ GLES/glplatform.h
+
+GLES2_HEADER_FILES = \
GLES2/gl2ext.h \
GLES2/gl2.h \
- GLES2/gl2platform.h \
+ GLES2/gl2platform.h
+
+GLES3_HEADER_FILES = \
GLES3/gl31.h \
GLES3/gl32.h \
GLES3/gl3.h \
@@ -45,10 +49,18 @@ else
noinst_HEADERS += $(GL_HEADER_FILES)
endif
-if ENABLE_GLES_HEADERS
-nobase_include_HEADERS += $(GLES_HEADER_FILES)
+if ENABLE_GLES1_HEADERS
+nobase_include_HEADERS += $(GLES1_HEADER_FILES)
+else
+noinst_HEADERS += $(GLES1_HEADER_FILES)
+endif
+
+if ENABLE_GLES2_HEADERS
+nobase_include_HEADERS += $(GLES2_HEADER_FILES)
+nobase_include_HEADERS += $(GLES3_HEADER_FILES)
else
-noinst_HEADERS += $(GLES_HEADER_FILES)
+noinst_HEADERS += $(GLES2_HEADER_FILES)
+noinst_HEADERS += $(GLES3_HEADER_FILES)
endif
if ENABLE_GLX_HEADERS
diff --git a/src/Makefile.am b/src/Makefile.am
index 5f7ce79..821346f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,8 +12,10 @@ SUBDIRS += GLX
SUBDIRS += GL
endif
-if ENABLE_GLES
+if ENABLE_GLES1
SUBDIRS += GLESv1
+endif
+if ENABLE_GLES2
SUBDIRS += GLESv2
endif
--
2.16.4

View File

@ -1,62 +0,0 @@
From 51233cc52cbcbe25f8461830913c06f5b5bc9508 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Thu, 17 Oct 2019 11:51:37 -0400
Subject: [PATCH 3/3] egl: Sync with Khronos
commit de3a5e867d906a04a5c37ee0d89e7f01d3598eb9
Author: Ken Russell <kbrussel@alum.mit.edu>
Date: Sat Oct 12 05:44:43 2019 -0700
Reserve enums 0x34A0..0x34AF for ANGLE project. (#93)
Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/193
---
include/EGL/eglplatform.h | 6 ++++++
src/generate/xml/egl.xml | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
index 29ab288..5ab49c1 100644
--- a/include/EGL/eglplatform.h
+++ b/include/EGL/eglplatform.h
@@ -116,6 +116,12 @@ typedef intptr_t EGLNativeDisplayType;
typedef intptr_t EGLNativePixmapType;
typedef intptr_t EGLNativeWindowType;
+#elif defined(__unix__) && defined(EGL_NO_X11)
+
+typedef void *EGLNativeDisplayType;
+typedef khronos_uintptr_t EGLNativePixmapType;
+typedef khronos_uintptr_t EGLNativeWindowType;
+
#elif defined(__unix__) || defined(USE_X11)
/* X11 (tentative) */
diff --git a/src/generate/xml/egl.xml b/src/generate/xml/egl.xml
index c27f172..6bc2ea2 100644
--- a/src/generate/xml/egl.xml
+++ b/src/generate/xml/egl.xml
@@ -1002,6 +1002,9 @@
<enum value="0x3490" name="EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT"/>
<unused start="0x3491" end="0x349F"/>
</enums>
+ <enums namespace="EGL" start="0x34A0" end="0x34AF" vendor="ANGLE" comment="Reserved for Ken Russell - ANGLE (via github pull request)">
+ <unused start="0x34A0" end="0x34AF"/>
+ </enums>
<!-- Please remember that new enumerant allocations must be obtained by
request to the Khronos API registrar (see comments at the top of this
@@ -1012,8 +1015,8 @@
<!-- Reservable for future use. To generate a new range, allocate multiples
of 16 starting at the lowest available point in this block. -->
- <enums namespace="EGL" start="0x34A0" end="0x3FFF" vendor="KHR" comment="Reserved for future use">
- <unused start="0x34A0" end="0x3FFF"/>
+ <enums namespace="EGL" start="0x34B0" end="0x3FFF" vendor="KHR" comment="Reserved for future use">
+ <unused start="0x34B0" end="0x3FFF"/>
</enums>
<enums namespace="EGL" start="0x8F70" end="0x8F7F" vendor="HI" comment="For Mark Callow, Khronos bug 4055. Shared with GL.">
--
2.16.4

View File

@ -1,14 +0,0 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/NVIDIA/libglvnd.git</param>
<param name="scm">git</param>
<param name="versionformat">0.1.2~%cd~%h</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/NVIDIA/libglvnd.git</param>
<param name="changesrevision">d850cdde46dd0633405e758fbee49119e384b639</param></service></servicedata>

14
disable-glx-tests.patch Normal file
View File

@ -0,0 +1,14 @@
Index: libglvnd-1.3.2/tests/Makefile.am
===================================================================
--- libglvnd-1.3.2.orig/tests/Makefile.am
+++ libglvnd-1.3.2/tests/Makefile.am
@@ -100,7 +100,8 @@ TESTS_GLX += testglxqueryversion.sh
if ENABLE_GLX
-TESTS += $(TESTS_GLX)
+# need a running X server
+# TESTS += $(TESTS_GLX)
check_PROGRAMS += testglxcreatecontext
testglxcreatecontext_CFLAGS = $(CFLAGS_COMMON) $(X11_CFLAGS)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37981bd3320261f14140b8aef6e2e6c08c7e75b6a98dcea034670017f3f1312a
size 1000578

3
libglvnd-1.3.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6f41ace909302e6a063fd9dc04760b391a25a670ba5f4b6edf9e30f21410b673
size 1032413

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Aug 17 13:59:23 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 1.3.2:
* Update GL/gl.h to match Mesa.
* GLdispatch: Improve the x86 tsd stubs performance.
* GLdispatch: Define dynamic dispatch stubs at compile time.
* GLdispatch: Change entry_generate_default_code to take an index.
* GLdispatch: Use all 4096 dynamic dispatch stubs.
* Remove -Werror from default CFLAGS
- run tests
- add disable-glx-tests.patch: disable tests that require X
- remove 0001-include-install-GL-headers-when-GL-is-enabled.patch
0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch
0003-egl-Sync-with-Khronos.patch - upstream
-------------------------------------------------------------------
Sun Nov 24 12:50:20 UTC 2019 - Stefan Dirsch <sndirsch@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package libglvnd
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,20 +18,16 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libglvnd
Version: 1.2.0
Version: 1.3.2
Release: 0
Summary: The GL Vendor-Neutral Dispatch library
License: MIT
Group: Development/Libraries/C and C++
Url: https://github.com/NVIDIA/libglvnd
# Source is _service generated
Source: %name-%version.tar.gz
URL: https://github.com/NVIDIA/libglvnd
Source: https://github.com/NVIDIA/libglvnd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: baselibs.conf
Patch1: 0001-include-install-GL-headers-when-GL-is-enabled.patch
Patch2: 0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch
Patch3: 0003-egl-Sync-with-Khronos.patch
Patch1: disable-glx-tests.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@ -41,19 +37,18 @@ BuildRequires: python3-xml
BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: libglvnd0 = %version-%release
Obsoletes: libglvnd0 <= %version-%release
Provides: libglvnd0 = %{version}-%{release}
Obsoletes: libglvnd0 <= %{version}-%{release}
%description
Vendor-neutral dispatch layer for arbitrating OpenGL API calls between
multiple vendors on a per-screen basis, as described by Andy Ritger's
OpenGL ABI proposal.
%package devel
Summary: Development files for libglvnd
Group: Development/Libraries/C and C++
Requires: %name = %version
Requires: %{name} = %{version}
%description devel
Vendor-neutral dispatch layer for arbitrating OpenGL API calls between
@ -64,67 +59,66 @@ development.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
# fix env shebang to call py3 directly
sed -i -e "1s|#!.*|#!/usr/bin/python3|" src/generate/*.py
sed -i -e "1s|#!.*|#!%{_bindir}/python3|" src/generate/*.py
%build
./autogen.sh
%configure \
%if 0%{?suse_version} < 1330
--libdir=/usr/X11R6/%_lib \
--libdir=%{_prefix}/X11R6/%{_lib} \
%endif
--disable-static \
--disable-headers \
--disable-silent-rules
make %{?_smp_mflags}
%make_build
%install
%make_install
find "%buildroot" -type f -name "*.la" -delete
>%_builddir/%name-%version/filelist.rpm
find %{buildroot} -type f -name "*.la" -delete -print
>%{_builddir}/%{name}-%{version}/filelist.rpm
%if 0%{?suse_version} < 1330
mkdir -p %buildroot/%_libdir/pkgconfig
mv %buildroot/usr/X11R6/%_lib/pkgconfig/*.pc %buildroot/%_libdir/pkgconfig
if [ "%_lib" == "lib64" ]; then
mkdir -p %buildroot/%_sysconfdir/ld.so.conf.d
cat > %buildroot/%_sysconfdir/ld.so.conf.d/%name.conf << EOF
/usr/X11R6/%_lib
/usr/X11R6/lib
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
mv %{buildroot}%{_prefix}/X11R6/%{_lib}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig
if [ "%{_lib}" == "lib64" ]; then
mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d
cat > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{name}.conf << EOF
%{_prefix}/X11R6/%{_lib}
%{_prefix}/X11R6/lib
EOF
echo "%config %_sysconfdir/ld.so.conf.d/%name.conf" >%_builddir/%name-%version/filelist.rpm
echo "%config %{_sysconfdir}/ld.so.conf.d/%{name}.conf" >%{_builddir}/%{name}-%{version}/filelist.rpm
fi
%endif
mkdir -p %buildroot/usr/share/doc/packages/%name/pkgconfig
mv %buildroot/%_libdir/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc \
%buildroot/usr/share/doc/packages/%name/pkgconfig
mkdir -p %{buildroot}%{_docdir}/%{name}/pkgconfig
mv %{buildroot}/%{_libdir}/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc \
%{buildroot}%{_docdir}/%{name}/pkgconfig
%check
%make_build check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f filelist.rpm
%defattr(-,root,root)
%doc README.md
/usr/share/doc/packages/%name/pkgconfig
%{_docdir}/%{name}/pkgconfig
%if 0%{?suse_version} < 1330
%dir /usr/X11R6
%dir /usr/X11R6/%_lib
/usr/X11R6/%_lib/lib*.so.*
%dir %{_prefix}/X11R6
%dir %{_prefix}/X11R6/%{_lib}
%{_prefix}/X11R6/%{_lib}/lib*.so.*
%else
%_libdir/lib*.so.*
%{_libdir}/lib*.so.*
%endif
%files devel
%defattr(-,root,root)
%if 0%{?suse_version} < 1330
%dir /usr/X11R6
%dir /usr/X11R6/%_lib
/usr/X11R6/%_lib/lib*.so
%dir %{_prefix}/X11R6
%dir %{_prefix}/X11R6/%{_lib}
%{_prefix}/X11R6/%{_lib}/lib*.so
%else
%_libdir/lib*.so
%{_libdir}/lib*.so
%endif
%_libdir/pkgconfig/*.pc
%_includedir/glvnd/
%{_libdir}/pkgconfig/*.pc
%{_includedir}/glvnd/
%changelog