Hi,

On 13-01-2017 18:17, Nicolas Chauvet wrote:
>
> On 13-01-17 16:56, Hans de Goede wrote:
>> Hi,
>>
>> On 01/12/2017 11:24 PM, Nicolas Chauvet wrote:
>>> 2017-01-12 19:04 GMT+01:00 Hans de Goede <hdego...@redhat.com>:
>>>> Hi All,
>>>>
>>>> I've just submitted a pkg review request for libglvnd:
>>>>
>>>> https://bugzilla.redhat.com/show_bug.cgi?id=1412764
>>>>
>>>> This is the last building block needed to allow full
>>>> parallel installation of the nvidia binary driver and
>>>> nouveau / mesa, without needing various *.conf.d to
>>>> select the right libGL.so / Xserver glx module, etc.
>>>>
>>>> With this in place the entire Xorg / GL stack will
>>>> automatically do the right thing depending on which
>>>> kernel driver (nouveau or nvidia) is loaded, which
>>>> means that things will no longer break if the kernel /
>>>> userspace config do not match (as there is no more
>>>> userspace config), also see:
>>> This is already in fedora since few months already.
>>
>> Ah, I did not know that, that is great.
>>
>> I plan to do a Fedora 25 update enabling
>> glvnd in mesa coming monday. I will also update
>> libglvnd to match and make it be the provider
>> of libGL.so.1, etc.
>>
>> When I'm done I'll put both of them in a single bodhi update.
>>
>> I've requested co-maintainer rights for libglvnd if
>> you can grant those, that would be great.
>
> Sure, can you please open a bug so we can coordinate which
> changes exactly you want to push.( there are additional patches
> needed for pure mesa cases and glvnd - see
> https://bugs.freedesktop.org/show_bug.cgi?id=98428 ).

I cannot reproduce the problem from that bug, as described in:

https://github.com/NVIDIA/libglvnd/issues/104

For me with the latest xserver + glvnd + glvnd-enabled mesa
I get the following in my xorg.log :

[    24.160] (II) modeset(0): [DRI2] Setup complete
[    24.160] (II) modeset(0): [DRI2]   DRI driver: i965
[    24.160] (II) modeset(0): [DRI2]   VDPAU driver: i965
[    24.160] (--) RandR disabled
[    24.162] (II) SELinux: Disabled by boolean
[    24.165] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[    24.165] (II) AIGLX: enabled GLX_ARB_create_context
[    24.165] (II) AIGLX: enabled GLX_ARB_create_context_profile
[    24.165] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[    24.165] (II) AIGLX: enabled GLX_INTEL_swap_event
[    24.165] (II) AIGLX: enabled GLX_SGI_swap_control
[    24.165] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[    24.165] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[    24.165] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[    24.165] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[    24.165] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[    24.165] (II) AIGLX: Loaded and initialized i965
[    24.165] (II) GLX: Initialized DRI2 GL provider for screen 0

I'll also make sure to test this with the intel ddx before
kicking of builds for this.

As for the changes I plan to make see the attached patch.

Note we've been working on this for quite a while now and
it already has seen quite a bit of testing. So I plan to
kick of rawhide builds for this this afternoon after I've
run one more final batch of tests.

> Also f25 seems a quite disruptive change for switching the
> libGL provider. I'm all in favor about that, as It will settle
> the situation on optimus and drop custom repos, but let's at
> least have a step in f26. Thx

Ack, I'll let this sit in rawhide for a few days before building
it for f25 and pushing it to updates-testing.

Regards,

Hans
>From 8a33c34f411075f0a32611ce34c962945a73c6d7 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdego...@redhat.com>
Date: Mon, 16 Jan 2017 12:27:54 +0100
Subject: [PATCH] Epoch:1, Release:6 to provide upgrade path from
 negativo17.org rpms New snapshot Add patches to fix building on ARM (from Rob
 Clark) Add BuildRequires: python Add ldconfig scriptlets for library
 sub-packages

---
 ...penGL-Statically-export-a-few-more-things.patch |  27 ++++
 ...ost_cpu-when-undetected-for-easier-debugg.patch |  25 ++++
 0003-Fix-compile-errors.patch                      |  37 +++++
 ...sure-asm-is-compiled-in-unified-syntax-mo.patch |  34 +++++
 0005-Treat-armv7hl-as-armv7l.patch                 |  25 ++++
 ...sts-that-cannot-pass-with-pure-c-dispatch.patch |  49 +++++++
 egl_crash.patch                                    |  80 -----------
 libglvnd.spec                                      | 152 ++++++++++++++++-----
 sources                                            |   1 -
 9 files changed, 312 insertions(+), 118 deletions(-)
 create mode 100644 0001-OpenGL-Statically-export-a-few-more-things.patch
 create mode 100644 0002-Print-out-host_cpu-when-undetected-for-easier-debugg.patch
 create mode 100644 0003-Fix-compile-errors.patch
 create mode 100644 0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch
 create mode 100644 0005-Treat-armv7hl-as-armv7l.patch
 create mode 100644 0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
 delete mode 100644 egl_crash.patch

diff --git a/0001-OpenGL-Statically-export-a-few-more-things.patch b/0001-OpenGL-Statically-export-a-few-more-things.patch
new file mode 100644
index 0000000..64f3799
--- /dev/null
+++ b/0001-OpenGL-Statically-export-a-few-more-things.patch
@@ -0,0 +1,27 @@
+From 55f564b77773e6bfcbe1fa6b1d613ea194b408ed Mon Sep 17 00:00:00 2001
+From: Adam Jackson <a...@redhat.com>
+Date: Mon, 17 Oct 2016 16:58:56 -0400
+Subject: [PATCH] OpenGL: Statically export a few more things
+
+I'm... unsure if I like this.
+
+Signed-off-by: Adam Jackson <a...@redhat.com>
+---
+ src/generate/genCommon.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/generate/genCommon.py b/src/generate/genCommon.py
+index 5781275..bb4e491 100644
+--- a/src/generate/genCommon.py
++++ b/src/generate/genCommon.py
+@@ -41,6 +41,7 @@ _LIBRARY_FEATURE_NAMES = {
+         "GL_VERSION_2_0", "GL_VERSION_2_1", "GL_VERSION_3_0", "GL_VERSION_3_1",
+         "GL_VERSION_3_2", "GL_VERSION_3_3", "GL_VERSION_4_0", "GL_VERSION_4_1",
+         "GL_VERSION_4_2", "GL_VERSION_4_3", "GL_VERSION_4_4", "GL_VERSION_4_5",
++        "GL_ARB_imaging", "GL_ARB_multitexture",
+     )),
+     "glesv1" : frozenset(("GL_VERSION_ES_CM_1_0", "GL_OES_point_size_array")),
+     "glesv2" : frozenset(("GL_ES_VERSION_2_0", "GL_ES_VERSION_3_0",
+-- 
+2.9.3
+
diff --git a/0002-Print-out-host_cpu-when-undetected-for-easier-debugg.patch b/0002-Print-out-host_cpu-when-undetected-for-easier-debugg.patch
new file mode 100644
index 0000000..9192656
--- /dev/null
+++ b/0002-Print-out-host_cpu-when-undetected-for-easier-debugg.patch
@@ -0,0 +1,25 @@
+From 2e35628e90e0b524ecadea498a2ffe06b6b5a4fc Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdcl...@gmail.com>
+Date: Wed, 14 Dec 2016 08:40:44 -0500
+Subject: [PATCH 2/6] Print out $host_cpu when undetected, for easier debugging
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index fdfaf00..29f90d8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -117,7 +117,7 @@ if test "x$enable_asm" = xyes; then
+         AC_MSG_RESULT([yes, aarch64])
+         ;;
+     *)
+-        AC_MSG_RESULT([no, platform not supported])
++        AC_MSG_RESULT([no, platform '$host_cpu' not supported])
+         ;;
+     esac
+ fi
+-- 
+2.9.3
+
diff --git a/0003-Fix-compile-errors.patch b/0003-Fix-compile-errors.patch
new file mode 100644
index 0000000..b5c34e4
--- /dev/null
+++ b/0003-Fix-compile-errors.patch
@@ -0,0 +1,37 @@
+From 07c095397bb336c2e4fbed89c6b9202730886acc Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdcl...@gmail.com>
+Date: Wed, 14 Dec 2016 09:35:40 -0500
+Subject: [PATCH 3/6] Fix compile errors
+
+---
+ src/GLdispatch/vnd-glapi/entry_armv7_tsd.c | 1 -
+ tests/dummy/EGL_dummy.c                    | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c b/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
+index faec5bf..2bce0c2 100644
+--- a/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
++++ b/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
+@@ -166,7 +166,6 @@ const int entry_stub_size = ARMV7_ENTRY_SIZE;
+ static const int TEMPLATE_OFFSET_CURRENT_TABLE     = ARMV7_BYTECODE_SIZE - 3*4;
+ static const int TEMPLATE_OFFSET_CURRENT_TABLE_GET = ARMV7_BYTECODE_SIZE - 2*4;
+ static const int TEMPLATE_OFFSET_SLOT              = ARMV7_BYTECODE_SIZE - 4;
+-static const int TEMPLATE_OFFSETS_SIZE             = 3*4;
+ 
+ void
+ entry_init_public(void)
+diff --git a/tests/dummy/EGL_dummy.c b/tests/dummy/EGL_dummy.c
+index 372e0a0..7860dce 100644
+--- a/tests/dummy/EGL_dummy.c
++++ b/tests/dummy/EGL_dummy.c
+@@ -56,7 +56,6 @@ static const char *PLATFORM_EXTENSIONS =
+     ;
+ 
+ static const char *DISPLAY_EXTENSIONS = "";
+-static const EGLint DUMMY_EGL_CONFIG_COUNT = 2;
+ 
+ typedef struct DummyEGLDisplayRec {
+     EGLenum platform;
+-- 
+2.9.3
+
diff --git a/0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch b/0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch
new file mode 100644
index 0000000..ca942a3
--- /dev/null
+++ b/0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch
@@ -0,0 +1,34 @@
+From c386bd5a233ed82d51ff9200c40e97e1817881f9 Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdcl...@gmail.com>
+Date: Wed, 14 Dec 2016 10:44:07 -0500
+Subject: [PATCH 4/6] armv7: make sure asm is compiled in unified syntax mode
+
+The individual stub functions already have .thumb_func but if syntax is
+divided the assembler will reject the STUB_ASM_CODE.
+---
+ src/GLdispatch/vnd-glapi/entry_armv7_tsd.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c b/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
+index 2bce0c2..0ea8902 100644
+--- a/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
++++ b/src/GLdispatch/vnd-glapi/entry_armv7_tsd.c
+@@ -140,6 +140,7 @@ static uint16_t BYTECODE_TEMPLATE[] =
+ 
+ __asm__(".section wtext,\"ax\"\n"
+         ".balign 4096\n"
++        ".syntax unified\n"
+        ".globl public_entry_start\n"
+        ".hidden public_entry_start\n"
+         "public_entry_start:\n");
+@@ -148,6 +149,7 @@ __asm__(".section wtext,\"ax\"\n"
+ #include "mapi_tmp.h"
+ 
+ __asm__(".balign 4096\n"
++        ".syntax divided\n"
+        ".globl public_entry_end\n"
+        ".hidden public_entry_end\n"
+         "public_entry_end:\n"
+-- 
+2.9.3
+
diff --git a/0005-Treat-armv7hl-as-armv7l.patch b/0005-Treat-armv7hl-as-armv7l.patch
new file mode 100644
index 0000000..109ae99
--- /dev/null
+++ b/0005-Treat-armv7hl-as-armv7l.patch
@@ -0,0 +1,25 @@
+From ec5bd547b5fe2b82a4a72b9dbd7c0c47d41c7bde Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdcl...@gmail.com>
+Date: Wed, 14 Dec 2016 11:06:05 -0500
+Subject: [PATCH 5/6] Treat armv7hl as armv7l
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 29f90d8..9a68eb2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,7 +91,7 @@ if test "x$enable_asm" = xyes; then
+             ;;
+         esac
+         ;;
+-    armv7l)
++    armv7*l)
+         asm_arch=armv7l
+         ;;
+     aarch64)
+-- 
+2.9.3
+
diff --git a/0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch b/0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
new file mode 100644
index 0000000..aaf69ff
--- /dev/null
+++ b/0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
@@ -0,0 +1,49 @@
+From 0475afe8e1c20509799b8e41ebad64938315e630 Mon Sep 17 00:00:00 2001
+From: Rob Clark <robdcl...@gmail.com>
+Date: Mon, 9 Jan 2017 14:52:22 -0500
+Subject: [PATCH 6/6] skip tests that cannot pass with pure-c dispatch
+
+glvnd will not actually work 100% with pure-c dispatch.. but this at
+least removes expected make-check fails so that it can be built.
+---
+ tests/Makefile.am | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index fb8408f..e413d5b 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -56,7 +56,9 @@ AM_CFLAGS =                                  \
+ 	-I$(top_srcdir)/src/util/glvnd_pthread
+ 
+ 
++if ! GLDISPATCH_TYPE_PURE_C
+ TESTS += testpatchentrypoints_gldispatch.sh
++endif
+ check_PROGRAMS += testpatchentrypoints_gldispatch
+ testpatchentrypoints_gldispatch_SOURCES = \
+ 	testpatchentrypoints_gldispatch.c
+@@ -74,6 +76,7 @@ testpatchentrypoints_gldispatch_LDADD += $(top_builddir)/src/util/libutils_misc.
+ # the scripts would be missing when you run "make dist" or "make distcheck".
+ 
+ TESTS_GLX =
++if ! GLDISPATCH_TYPE_PURE_C
+ TESTS_GLX += testglxmcbasic.sh
+ TESTS_GLX += testglxmcloop.sh
+ TESTS_GLX += testglxmcthreads.sh
+@@ -81,9 +84,12 @@ TESTS_GLX += testglxmclate.sh
+ TESTS_GLX += testglxmcoldlink.sh
+ TESTS_GLX += testglxgetprocaddress.sh
+ TESTS_GLX += testglxgetprocaddress_genentry.sh
++endif
+ TESTS_GLX += testglxgetclientstr.sh
+ TESTS_GLX += testglxqueryversion.sh
++if ! GLDISPATCH_TYPE_PURE_C
+ TESTS_GLX += testpatchentrypoints.sh
++endif
+ 
+ if ENABLE_GLX
+ 
+-- 
+2.9.3
+
diff --git a/egl_crash.patch b/egl_crash.patch
deleted file mode 100644
index b5754fb..0000000
--- a/egl_crash.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 758b525463cd00478bf071d477ab58c92414b852 Mon Sep 17 00:00:00 2001
-From: Kyle Brenneman <kbrenne...@nvidia.com>
-Date: Tue, 25 Oct 2016 17:32:47 -0600
-Subject: [PATCH 1/2] GLdispatch: Don't call into the vendor from
- __glDispatchForceUnpatch.
-
-In __glDispatchForceUnpatch, don't call the vendor's releasePatch callback,
-because the vendor library might have already been unloaded by that point.
----
- src/GLdispatch/GLdispatch.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/GLdispatch/GLdispatch.c b/src/GLdispatch/GLdispatch.c
-index 8c4c3a7..cf4254e 100644
---- a/src/GLdispatch/GLdispatch.c
-+++ b/src/GLdispatch/GLdispatch.c
-@@ -570,8 +570,10 @@ static int PatchEntrypoints(
- 
-     if (stubCurrentPatchCb) {
-         // Notify the previous vendor that it no longer owns these
--        // entrypoints.
--        if (stubCurrentPatchCb->releasePatch != NULL) {
-+        // entrypoints. If this is being called from a library unload,
-+        // though, then skip the callback, because the vendor may have
-+        // already been unloaded.
-+        if (stubCurrentPatchCb->releasePatch != NULL && !force) {
-             stubCurrentPatchCb->releasePatch();
-         }
- 
-
-From 8146a979d85e975587f3a20f0a6fdc2f04fa478f Mon Sep 17 00:00:00 2001
-From: Kyle Brenneman <kbrenne...@nvidia.com>
-Date: Tue, 25 Oct 2016 17:34:26 -0600
-Subject: [PATCH 2/2] EGL: Don't call into the vendor library from __eglFini.
-
-In __eglFini, check for a fork, but don't call __glDispatchCheckMultithreaded.
-
-If a vendor has patched the OpenGL entrypoints, then
-__glDispatchCheckMultithreaded will try to call the vendor's thread attach
-callback, but the vendor library may have already been unloaded.
-
-Fixes https://github.com/NVIDIA/libglvnd/issues/103
----
- src/EGL/libegl.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/EGL/libegl.c b/src/EGL/libegl.c
-index 65e6605..e0a5488 100644
---- a/src/EGL/libegl.c
-+++ b/src/EGL/libegl.c
-@@ -1088,7 +1088,7 @@ static void __eglResetOnFork(void);
-  * Currently, this only detects whether a fork occurred since the last
-  * entrypoint was called, and performs recovery as needed.
-  */
--void __eglThreadInitialize(void)
-+void CheckFork(void)
- {
-     volatile static int g_threadsInCheck = 0;
-     volatile static int g_lastPid = -1;
-@@ -1120,7 +1120,11 @@ void __eglThreadInitialize(void)
-             sched_yield();
-         }
-     }
-+}
- 
-+void __eglThreadInitialize(void)
-+{
-+    CheckFork();
-     __glDispatchCheckMultithreaded();
- }
- 
-@@ -1190,7 +1194,7 @@ void _fini(void)
- #endif
- {
-     /* Check for a fork before going further. */
--    __eglThreadInitialize();
-+    CheckFork();
- 
-     /*
-      * If libEGL owns the current API state, lose current
diff --git a/libglvnd.spec b/libglvnd.spec
index 261a941..a3bb7d0 100644
--- a/libglvnd.spec
+++ b/libglvnd.spec
@@ -1,18 +1,26 @@
-%global commit0 28867bb6597d1cf879b12c60a4b512a23758d3f6
+%global commit0 dc16f8c337703ad141f83583a4004fcf42e07766
 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
 
 Name:           libglvnd
 Version:        0.2.999
 Release:        6%{?commit0:.git%{shortcommit0}}%{?dist}
+# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
+Epoch:          1
 Summary:        The GL Vendor-Neutral Dispatch library
 
 License:        MIT
 URL:            https://github.com/NVIDIA/libglvnd
 Source0:        https://github.com/NVIDIA/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
-Patch0:         egl_crash.patch
+Patch1:         0001-OpenGL-Statically-export-a-few-more-things.patch
+Patch2:         0002-Print-out-host_cpu-when-undetected-for-easier-debugg.patch
+Patch3:         0003-Fix-compile-errors.patch
+Patch4:         0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch
+Patch5:         0005-Treat-armv7hl-as-armv7l.patch
+Patch6:         0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
 
 BuildRequires:  libtool
 BuildRequires:  gcc
+BuildRequires:  python
 BuildRequires:  libxml2-python
 BuildRequires:  pkgconfig(glproto)
 BuildRequires:  pkgconfig(x11)
@@ -24,29 +32,73 @@ BuildRequires:  pkgconfig(xext)
 #https://github.com/NVIDIA/libglvnd/issues/93
 BuildRequires:  xorg-x11-server-Xvfb
 
-%{!?_with_mesa_glvnd_default:
-%global         __provides_exclude ^(libGL\\.so.*|libEGL\\.so.*|libGLESv2\\.so.*)$
-%global         __requires_exclude ^(libGL\\.so.*|libEGL\\.so.*|libGLESv2\\.so.*)$
-}
-
-
 %description
 libglvnd is an implementation of the vendor-neutral dispatch layer for
 arbitrating OpenGL API calls between multiple vendors on a per-screen basis.
 
+
 %package        devel
 Summary:        Development files for %{name}
-Requires:       %{name}%{?_isa} = :%{version}-%{release}
-
-%description devel
+Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name}-opengl = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name}-gles = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name}-glx = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name}-egl = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires:       %{name}-core-devel = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description    devel
 The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
 
+%package        core-devel
+Summary:        Core development files for %{name}
+
+%description core-devel
+The %{name}-core-devel package is a bootstrap trick for Mesa, which wants
+to build against the %{name} headers but does not link against any of
+its libraries (and, initially, has file conflicts with them). If you are
+not Mesa you almost certainly want %{name}-devel instead.
+
+
+%package        opengl
+Summary:        OpenGL support for libglvnd
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description    opengl
+libOpenGL is the common dispatch interface for the workstation OpenGL API.
+
+
+%package        gles
+Summary:        GLES support for libglvnd
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description    gles
+libGLESv[12] are the common dispatch interface for the GLES API.
+
+
+%package        egl
+Summary:        EGL support for libglvnd
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description    egl
+libEGL are the common dispatch interface for the EGL API.
+
+
+%package        glx
+Summary:        GLX support for libglvnd
+Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description    glx
+libGL and libGLX are the common dispatch interface for the GLX API.
+
+
 %prep
 %autosetup -p1 -n %{name}-%{?commit0}%{?!commit0:%{version}}
 autoreconf -vif
 
+
 %build
 %configure \
   --disable-static \
@@ -60,18 +112,6 @@ autoreconf -vif
 %make_install INSTALL="install -p"
 find %{buildroot} -name '*.la' -delete
 
-%{!?_with_mesa_glvnd_default:
-# Avoid conflict with mesa-libGL until mesa has gained libglvnd support
-mkdir -p %{buildroot}%{_libdir}/%{name}
-for l in libEGL libGL libGLESv2 ; do
-  mv %{buildroot}%{_libdir}/${l}.so* \
-    %{buildroot}%{_libdir}/%{name}
-done
-}
-
-# Fedora does not provide libGLESv1_CM
-rm -rf %{buildroot}%{_libdir}/libGLESv1_CM*
-
 # Create directory layout
 mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d
 mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d
@@ -87,33 +127,71 @@ xvfb-run -a  make check V=1 || cat `find . -name test-suite.log`
 
 
 %post -p /sbin/ldconfig
-
 %postun -p /sbin/ldconfig
-
-
 %files
 %doc README.md
-%{_libdir}/*.so.*
-%{!?_with_mesa_glvnd_default:
-%dir %{_libdir}/%{name}
-%{_libdir}/%{name}/lib*GL*.so.*
-}
 %dir %{_sysconfdir}/glvnd
-%dir %{_sysconfdir}/glvnd/egl_vendor.d
 %dir %{_datadir}/glvnd
+%{_libdir}/libGLdispatch.so.0*
+
+%post opengl -p /sbin/ldconfig
+%postun opengl -p /sbin/ldconfig
+%files opengl
+%{_libdir}/libOpenGL.so.0*
+
+%post gles -p /sbin/ldconfig
+%postun gles -p /sbin/ldconfig
+%files gles
+%{_libdir}/libGLESv1_CM.so.1
+%{_libdir}/libGLESv1_CM.so.1.0.0
+%{_libdir}/libGLESv2.so.2
+%{_libdir}/libGLESv2.so.2.0.0
+
+%post glx -p /sbin/ldconfig
+%postun glx -p /sbin/ldconfig
+%files glx
+%{_libdir}/libGL.so.1
+%{_libdir}/libGL.so.1.0.0
+%{_libdir}/libGLX.so.0
+%{_libdir}/libGLX.so.0.0.0
+
+%post egl -p /sbin/ldconfig
+%postun egl -p /sbin/ldconfig
+%files egl
+%dir %{_sysconfdir}/glvnd/egl_vendor.d
 %dir %{_datadir}/glvnd/egl_vendor.d
+%{_libdir}/libEGL.so.1
+%{_libdir}/libEGL.so.1.0.0
 
-%files devel
+%files core-devel
 %dir %{_includedir}/glvnd
 %{_includedir}/glvnd/*.h
-%{!?_with_mesa_glvnd_default:
-%{_libdir}/%{name}/lib*GL*.so
-}
-%{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
 
+%files devel
+%{_libdir}/libEGL.so
+%{_libdir}/libGL.so
+%{_libdir}/libGLESv1_CM.so
+%{_libdir}/libGLESv2.so
+%{_libdir}/libGLX.so
+%{_libdir}/libGLdispatch.so
+%{_libdir}/libOpenGL.so
+
 
 %changelog
+* Wed Jan 11 2017 Hans de Goede <hdego...@redhat.com> - 1:0.2.999-6.gitdc16f8c
+- Epoch:1, Release:6 to provide upgrade path from negativo17.org rpms
+- New snapshot
+- Add patches to fix building on ARM (from Rob Clark)
+- Add BuildRequires: python
+- Add ldconfig scriptlets for library sub-packages
+
+* Wed Jan 11 2017 Adam Jackson <a...@redhat.com>
+- Split up libraries to appropriate subpackages
+- Don't hide libraries in a subdir
+- Make the req/prov filter catch more cases
+- Restore libGLESv1 for ABI compliance
+
 * Wed Oct 26 2016 Leigh Scott <leigh123li...@googlemail.com> - 0.2.999-6.git28867bb
 - Update snapshot
 - Fix EGL crash for KDE/Plasma (rfbz#4303)
diff --git a/sources b/sources
index 99bd5a7..e69de29 100644
--- a/sources
+++ b/sources
@@ -1 +0,0 @@
-7f361721ca9b1db26ebb40400034c45f  libglvnd-28867bb.tar.gz
-- 
2.9.3

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to