mirror of
https://src.fedoraproject.org/rpms/mesa.git
synced 2024-11-24 09:32:42 +00:00
Enable libglvnd support (rhbz#1413579)
This commit is contained in:
parent
37749951bc
commit
0e83570d6c
5 changed files with 4003 additions and 22 deletions
26
0001-Fix-linkage-against-shared-glapi.patch
Normal file
26
0001-Fix-linkage-against-shared-glapi.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From 1b5a187c3c31513ae39cd2a917a3234c2c5f87fc Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Wed, 12 Oct 2016 13:41:33 -0400
|
||||
Subject: [PATCH] Fix linkage against shared glapi
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
src/gallium/targets/osmesa/Makefile.am | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am
|
||||
index 5d39486..04add87 100644
|
||||
--- a/src/gallium/targets/osmesa/Makefile.am
|
||||
+++ b/src/gallium/targets/osmesa/Makefile.am
|
||||
@@ -63,7 +63,7 @@ lib@OSMESA_LIB@_la_LIBADD = \
|
||||
$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
|
||||
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/osmesa/libosmesa.la \
|
||||
- $(top_builddir)/src/mapi/glapi/libglapi.la \
|
||||
+ $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
|
||||
$(SHARED_GLAPI_LIB) \
|
||||
$(OSMESA_LIB_DEPS) \
|
||||
$(CLOCK_LIB)
|
||||
--
|
||||
2.9.3
|
||||
|
3855
0001-egl-glvnd-support.patch
Normal file
3855
0001-egl-glvnd-support.patch
Normal file
File diff suppressed because it is too large
Load diff
82
0001-glapi-Link-with-glapi-when-built-shared.patch
Normal file
82
0001-glapi-Link-with-glapi-when-built-shared.patch
Normal file
|
@ -0,0 +1,82 @@
|
|||
From 16875ea5b9170f2213fd486d763f27a9d6dfc1b5 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Chauvet <kwizart@gmail.com>
|
||||
Date: Tue, 25 Oct 2016 09:35:13 +0200
|
||||
Subject: [PATCH 1/3] glapi: Link with glapi when built shared
|
||||
|
||||
This patch explicitly links to libglapi when built shared.
|
||||
This was specially needed to avoid undefined non-weak-symbol as shown
|
||||
with:
|
||||
|
||||
ldd -r /usr/lib64/dri/i915_dri.so
|
||||
linux-vdso.so.1 (0x00007fff821f4000)
|
||||
libdrm_intel.so.1 => /lib64/libdrm_intel.so.1 (0x00007f6adf2c7000)
|
||||
libdrm_nouveau.so.2 => /lib64/libdrm_nouveau.so.2 (0x00007f6adf0be000)
|
||||
libdrm_radeon.so.1 => /lib64/libdrm_radeon.so.1 (0x00007f6adeeb2000)
|
||||
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6adec8b000)
|
||||
libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f6adea7c000)
|
||||
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f6ade84f000)
|
||||
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6ade633000)
|
||||
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6ade42f000)
|
||||
libm.so.6 => /lib64/libm.so.6 (0x00007f6ade125000)
|
||||
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6addf0e000)
|
||||
libc.so.6 => /lib64/libc.so.6 (0x00007f6addb4c000)
|
||||
/lib64/ld-linux-x86-64.so.2 (0x000056274e913000)
|
||||
libpciaccess.so.0 => /lib64/libpciaccess.so.0 (0x00007f6add941000)
|
||||
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f6add6ce000)
|
||||
undefined symbol: _glapi_get_dispatch_table_size (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_get_context (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_add_dispatch (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_check_multithread (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_tls_Context (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_set_context (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_set_dispatch (/usr/lib64/dri/i915_dri.so)
|
||||
undefined symbol: _glapi_tls_Dispatch (/usr/lib64/dri/i915_dri.so)
|
||||
|
||||
v3: Add gallium counterpart for radeon cases
|
||||
Reported-by: Jonathan Dieter <jdieter@lesbg.com>
|
||||
|
||||
v2: Add Bugzilla and Signed-off
|
||||
|
||||
Fixes: 0cbc90c57c ("mesa: dri: Add shared glapi to LIBADD on Android")
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428
|
||||
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
|
||||
---
|
||||
src/gallium/targets/dri/Makefile.am | 2 --
|
||||
src/mesa/drivers/dri/Makefile.am | 3 ---
|
||||
2 files changed, 5 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
|
||||
index bca747f..05f6c8c 100644
|
||||
--- a/src/gallium/targets/dri/Makefile.am
|
||||
+++ b/src/gallium/targets/dri/Makefile.am
|
||||
@@ -1,10 +1,8 @@
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
-if HAVE_ANDROID
|
||||
if HAVE_SHARED_GLAPI
|
||||
SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
|
||||
endif
|
||||
-endif
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/src/mapi \
|
||||
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
|
||||
index 1c6dd08..8e68fc0 100644
|
||||
--- a/src/mesa/drivers/dri/Makefile.am
|
||||
+++ b/src/mesa/drivers/dri/Makefile.am
|
||||
@@ -6,12 +6,9 @@ MEGADRIVERS_DEPS =
|
||||
|
||||
SUBDIRS+=common
|
||||
|
||||
-# On Android, we need to explicitly link to libglapi.so.
|
||||
-if HAVE_ANDROID
|
||||
if HAVE_SHARED_GLAPI
|
||||
SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
|
||||
endif
|
||||
-endif
|
||||
|
||||
if HAVE_I915_DRI
|
||||
SUBDIRS += i915
|
||||
--
|
||||
2.7.4
|
||||
|
12
glvnd-fix-gl-dot-pc.patch
Normal file
12
glvnd-fix-gl-dot-pc.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -up mesa-12.0.3/src/mesa/gl.pc.in.jx mesa-12.0.3/src/mesa/gl.pc.in
|
||||
--- mesa-12.0.3/src/mesa/gl.pc.in.jx 2016-01-18 02:39:26.000000000 -0500
|
||||
+++ mesa-12.0.3/src/mesa/gl.pc.in 2016-10-25 13:06:44.013159358 -0400
|
||||
@@ -7,7 +7,7 @@ Name: gl
|
||||
Description: Mesa OpenGL library
|
||||
Requires.private: @GL_PC_REQ_PRIV@
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -l@GL_LIB@
|
||||
+Libs: -L${libdir} -lGL
|
||||
Libs.private: @GL_PC_LIB_PRIV@
|
||||
Cflags: -I${includedir} @GL_PC_CFLAGS@
|
||||
glx_tls: @GLX_TLS@
|
50
mesa.spec
50
mesa.spec
|
@ -59,7 +59,7 @@
|
|||
Name: mesa
|
||||
Summary: Mesa graphics libraries
|
||||
Version: 13.0.3
|
||||
Release: 2%{?rctag:.%{rctag}}%{?dist}
|
||||
Release: 3%{?rctag:.%{rctag}}%{?dist}
|
||||
|
||||
License: MIT
|
||||
URL: http://www.mesa3d.org
|
||||
|
@ -76,6 +76,12 @@ Patch2: 0002-hardware-gloat.patch
|
|||
Patch3: 0003-evergreen-big-endian.patch
|
||||
Patch4: 0004-bigendian-assert.patch
|
||||
|
||||
# glvnd support patches
|
||||
Patch11: 0001-egl-glvnd-support.patch
|
||||
Patch12: glvnd-fix-gl-dot-pc.patch
|
||||
Patch13: 0001-Fix-linkage-against-shared-glapi.patch
|
||||
Patch14: 0001-glapi-Link-with-glapi-when-built-shared.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: automake
|
||||
|
@ -108,6 +114,7 @@ BuildRequires: clang-devel >= 3.0
|
|||
%endif
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: libxml2-python
|
||||
BuildRequires: libudev-devel
|
||||
BuildRequires: bison flex
|
||||
%if %{with wayland}
|
||||
BuildRequires: pkgconfig(wayland-client)
|
||||
|
@ -135,6 +142,7 @@ BuildRequires: libstdc++-static
|
|||
%ifarch %{valgrind_arches}
|
||||
BuildRequires: pkgconfig(valgrind)
|
||||
%endif
|
||||
BuildRequires: libglvnd-core-devel
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
|
@ -150,8 +158,7 @@ Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}}%{version}-%{release}
|
|||
%package libGL
|
||||
Summary: Mesa libGL runtime libraries
|
||||
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
|
||||
Provides: libGL
|
||||
Provides: libGL%{?_isa}
|
||||
Requires: libglvnd-glx
|
||||
|
||||
%description libGL
|
||||
%{summary}.
|
||||
|
@ -159,6 +166,7 @@ Provides: libGL%{?_isa}
|
|||
%package libGL-devel
|
||||
Summary: Mesa libGL development package
|
||||
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
|
||||
Requires: libglvnd-devel
|
||||
Provides: libGL-devel
|
||||
Provides: libGL-devel%{?_isa}
|
||||
|
||||
|
@ -167,8 +175,7 @@ Provides: libGL-devel%{?_isa}
|
|||
|
||||
%package libEGL
|
||||
Summary: Mesa libEGL runtime libraries
|
||||
Provides: libEGL
|
||||
Provides: libEGL%{?_isa}
|
||||
Requires: libglvnd-egl
|
||||
|
||||
%description libEGL
|
||||
%{summary}.
|
||||
|
@ -176,6 +183,7 @@ Provides: libEGL%{?_isa}
|
|||
%package libEGL-devel
|
||||
Summary: Mesa libEGL development package
|
||||
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
|
||||
Requires: libglvnd-devel
|
||||
Provides: libEGL-devel
|
||||
Provides: libEGL-devel%{?_isa}
|
||||
|
||||
|
@ -185,8 +193,7 @@ Provides: libEGL-devel%{?_isa}
|
|||
%package libGLES
|
||||
Summary: Mesa libGLES runtime libraries
|
||||
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
|
||||
Provides: libGLES
|
||||
Provides: libGLES%{?_isa}
|
||||
Requires: libglvnd-gles
|
||||
|
||||
%description libGLES
|
||||
%{summary}.
|
||||
|
@ -194,6 +201,7 @@ Provides: libGLES%{?_isa}
|
|||
%package libGLES-devel
|
||||
Summary: Mesa libGLES development package
|
||||
Requires: %{name}-libGLES%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
|
||||
Requires: libglvnd-devel
|
||||
Provides: libGLES-devel
|
||||
Provides: libGLES-devel%{?_isa}
|
||||
|
||||
|
@ -381,6 +389,7 @@ export LDFLAGS="-static-libstdc++"
|
|||
|
||||
%configure \
|
||||
%{?asm_flags} \
|
||||
--enable-libglvnd \
|
||||
--enable-selinux \
|
||||
--enable-gallium-osmesa \
|
||||
--with-dri-driverdir=%{_libdir}/dri \
|
||||
|
@ -431,6 +440,11 @@ rm -f %{buildroot}%{_sysconfdir}/drirc
|
|||
|
||||
# libvdpau opens the versioned name, don't bother including the unversioned
|
||||
rm -f %{buildroot}%{_libdir}/vdpau/*.so
|
||||
# likewise glvnd
|
||||
rm -f %{buildroot}%{_libdir}/libGLX_mesa.so
|
||||
rm -f %{buildroot}%{_libdir}/libEGL_mesa.so
|
||||
# XXX can we just not build this
|
||||
rm -f %{buildroot}%{_libdir}/libGLES*
|
||||
|
||||
# strip out useless headers
|
||||
rm -f %{buildroot}%{_includedir}/GL/w*.h
|
||||
|
@ -460,11 +474,8 @@ popd
|
|||
%endif
|
||||
%endif
|
||||
|
||||
%post libGL -p /sbin/ldconfig
|
||||
%postun libGL -p /sbin/ldconfig
|
||||
%files libGL
|
||||
%{_libdir}/libGL.so.1
|
||||
%{_libdir}/libGL.so.1.*
|
||||
%{_libdir}/libGLX_mesa.so.0*
|
||||
%files libGL-devel
|
||||
%{_includedir}/GL/gl.h
|
||||
%{_includedir}/GL/gl_mangle.h
|
||||
|
@ -476,15 +487,12 @@ popd
|
|||
%dir %{_includedir}/GL/internal
|
||||
%{_includedir}/GL/internal/dri_interface.h
|
||||
%{_libdir}/pkgconfig/dri.pc
|
||||
%{_libdir}/libGL.so
|
||||
%{_libdir}/libglapi.so
|
||||
%{_libdir}/pkgconfig/gl.pc
|
||||
|
||||
%post libEGL -p /sbin/ldconfig
|
||||
%postun libEGL -p /sbin/ldconfig
|
||||
%files libEGL
|
||||
%{_libdir}/libEGL.so.1
|
||||
%{_libdir}/libEGL.so.1.*
|
||||
%{_datadir}/glvnd/egl_vendor.d/50_mesa.json
|
||||
%{_libdir}/libEGL_mesa.so.0*
|
||||
%files libEGL-devel
|
||||
%dir %{_includedir}/EGL
|
||||
%{_includedir}/EGL/eglext.h
|
||||
|
@ -495,13 +503,9 @@ popd
|
|||
%dir %{_includedir}/KHR
|
||||
%{_includedir}/KHR/khrplatform.h
|
||||
%{_libdir}/pkgconfig/egl.pc
|
||||
%{_libdir}/libEGL.so
|
||||
|
||||
%post libGLES -p /sbin/ldconfig
|
||||
%postun libGLES -p /sbin/ldconfig
|
||||
%files libGLES
|
||||
%{_libdir}/libGLESv2.so.2
|
||||
%{_libdir}/libGLESv2.so.2.*
|
||||
# No files, all provided by libglvnd
|
||||
%files libGLES-devel
|
||||
%dir %{_includedir}/GLES2
|
||||
%{_includedir}/GLES2/gl2platform.h
|
||||
|
@ -514,7 +518,6 @@ popd
|
|||
%{_includedir}/GLES3/gl31.h
|
||||
%{_includedir}/GLES3/gl32.h
|
||||
%{_libdir}/pkgconfig/glesv2.pc
|
||||
%{_libdir}/libGLESv2.so
|
||||
|
||||
%post libglapi -p /sbin/ldconfig
|
||||
%postun libglapi -p /sbin/ldconfig
|
||||
|
@ -672,6 +675,9 @@ popd
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 17 2017 Hans de Goede <hdegoede@redhat.com> - 13.0.3-3
|
||||
- Enable libglvnd support (rhbz#1413579)
|
||||
|
||||
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 13.0.3-2
|
||||
- Add valgrind BuildRequires to have valgrind support
|
||||
|
||||
|
|
Loading…
Reference in a new issue