extra/mesa to 17.0.1-2

This commit is contained in:
Kevin Mihelich 2017-03-11 18:33:04 +00:00
parent 3d99b8f116
commit 11b93a4dda
6 changed files with 4141 additions and 49 deletions

File diff suppressed because it is too large Load diff

View 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

View 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

View file

@ -0,0 +1,33 @@
From 2d4094c2caad6cef2f5544b3966fcc37ceb32036 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Thu, 5 Jan 2017 14:29:47 -0700
Subject: [PATCH 2/2] fixup! EGL: Implement the libglvnd interface for EGL (v2)
---
src/egl/generate/eglFunctionList.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/egl/generate/eglFunctionList.py b/src/egl/generate/eglFunctionList.py
index b19b5f7193..80cb83437c 100644
--- a/src/egl/generate/eglFunctionList.py
+++ b/src/egl/generate/eglFunctionList.py
@@ -53,12 +53,14 @@ method values:
Select the vendor that owns the current context.
"""
-def _eglFunc(name, method, static=False, public=False, inheader=None, prefix="", extension=None, retval=None):
+def _eglFunc(name, method, static=None, public=False, inheader=None, prefix="dispatch_", extension=None, retval=None):
"""
A convenience function to define an entry in the EGL function list.
"""
+ if static is None:
+ static = (not public and method != "custom")
if inheader is None:
- inheader = (not public)
+ inheader = (not static)
values = {
"method" : method,
"prefix" : prefix,
--
2.11.0

View file

@ -4,26 +4,34 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - Removed DRI and Gallium3D drivers/packages for chipsets that don't exist in our ARM devices (intel, radeon, VMware svga).
# - Removed libgles, libegl and khrplatform-devel from conflicts for marvell-libgfx compatibility.
# - Moved .pc files to mesa-libgl that reference libraries in mesa-libgl
pkgbase=mesa
pkgname=('mesa' 'mesa-libgl' 'libva-mesa-driver')
pkgname=('mesa' 'libva-mesa-driver')
pkgver=17.0.1
pkgrel=2
arch=('i686' 'x86_64')
makedepends=('python2-mako' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'dri3proto' 'presentproto'
'libxshmfence' 'libxxf86vm' 'libxdamage' 'libvdpau' 'libva' 'wayland' 'elfutils' 'llvm'
'libomxil-bellagio' 'clang')
'libomxil-bellagio' 'clang' 'libglvnd')
url="http://mesa3d.sourceforge.net"
license=('custom')
source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
remove-libpthread-stubs.patch)
remove-libpthread-stubs.patch
0001-EGL-Implement-the-libglvnd-interface-for-EGL-v2.patch
0001-Fix-linkage-against-shared-glapi.patch
0001-glapi-Link-with-glapi-when-built-shared.patch
0002-fixup-EGL-Implement-the-libglvnd-interface-for-EGL-v.patch
glvnd-fix-gl-dot-pc.patch)
sha256sums=('96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c'
'SKIP'
'7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
'75ab53ad44b95204c788a2988e97a5cb963bdbf6072a5466949a2afb79821c8f')
'75ab53ad44b95204c788a2988e97a5cb963bdbf6072a5466949a2afb79821c8f'
'1d3475dc2f4f3e450cf313130d3ce965f933f396058828fa843c0df8115feeb9'
'c68d1522f9bce4ce31c92aa7a688da49f13043f5bb2254795b76dea8f47130b7'
'064dcd5a3ab1b7c23383e2cafbd37859e4c353f8839671d9695c6f7c2ef3260b'
'81d0ced62f61677ea0cf5f69a491093409fa1370f2ef045c41106ca8bf9c46f6'
'64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966')
validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov <emil.l.velikov@gmail.com>
prepare() {
@ -32,6 +40,15 @@ prepare() {
# Now mesa checks for libpthread-stubs - so remove the check
patch -Np1 -i ../remove-libpthread-stubs.patch
# glvnd support patches - from Fedora
# https://patchwork.freedesktop.org/series/12354/, v3 & v4
patch -Np1 -i ../0001-EGL-Implement-the-libglvnd-interface-for-EGL-v2.patch
patch -Np1 -i ../0002-fixup-EGL-Implement-the-libglvnd-interface-for-EGL-v.patch
# non-upstreamed ones
patch -Np1 -i ../glvnd-fix-gl-dot-pc.patch
patch -Np1 -i ../0001-Fix-linkage-against-shared-glapi.patch
patch -Np1 -i ../0001-glapi-Link-with-glapi-when-built-shared.patch
autoreconf -fiv
}
@ -50,6 +67,7 @@ build() {
--enable-gallium-llvm \
--enable-llvm-shared-libs \
--enable-shared-glapi \
--enable-libglvnd \
--enable-egl \
--enable-glx \
--enable-glx-tls \
@ -57,7 +75,7 @@ build() {
--enable-gles2 \
--enable-gbm \
--enable-dri \
--enable-osmesa \
--enable-gallium-osmesa \
--enable-texture-float \
--enable-omx \
--enable-nine \
@ -85,16 +103,19 @@ package_libva-mesa-driver() {
package_mesa() {
pkgdesc="an open-source implementation of the OpenGL specification"
depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf'
'libomxil-bellagio' 'libtxc_dxtn' 'llvm-libs')
'libomxil-bellagio' 'libtxc_dxtn' 'llvm-libs' 'libglvnd')
optdepends=('opengl-man-pages: for the OpenGL API man pages'
'mesa-vdpau: for accelerated video playback'
'libva-mesa-driver: for accelerated video playback')
provides=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri')
conflicts=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri')
replaces=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri')
provides=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl' 'opengl-driver')
conflicts=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl')
replaces=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl')
install -m755 -d ${pkgdir}/etc
cp -rv ${srcdir}/fakeinstall/etc/drirc ${pkgdir}/etc
install -m755 -d ${pkgdir}/usr/share/glvnd/egl_vendor.d
cp -rv ${srcdir}/fakeinstall/usr/share/glvnd/egl_vendor.d/50_mesa.json ${pkgdir}/usr/share/glvnd/egl_vendor.d/
install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
# ati-dri, nouveau-dri, intel-dri, svga-dri, swrast
@ -108,48 +129,14 @@ package_mesa() {
cp -rv ${srcdir}/fakeinstall/usr/include ${pkgdir}/usr
cp -rv ${srcdir}/fakeinstall/usr/lib/pkgconfig ${pkgdir}/usr/lib/
rm ${pkgdir}/usr/lib/pkgconfig/{egl,gl,glesv1_cm,glesv2}.pc
# remove vulkan headers
rm -rf ${pkgdir}/usr/include/vulkan
install -m755 -d ${pkgdir}/usr/lib/mesa
# move libgl/EGL/glesv*.so to not conflict with blobs - may break .pc files ?
cp -rv ${srcdir}/fakeinstall/usr/lib/libGL.so* ${pkgdir}/usr/lib/mesa/
cp -rv ${srcdir}/fakeinstall/usr/lib/libEGL.so* ${pkgdir}/usr/lib/mesa/
cp -rv ${srcdir}/fakeinstall/usr/lib/libGLES*.so* ${pkgdir}/usr/lib/mesa/
# libglvnd support
cp -rv ${srcdir}/fakeinstall/usr/lib/libGLX_mesa.so* ${pkgdir}/usr/lib/
cp -rv ${srcdir}/fakeinstall/usr/lib/libEGL_mesa.so* ${pkgdir}/usr/lib/
install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}
package_mesa-libgl() {
pkgdesc="Mesa 3-D graphics library"
depends=('mesa')
provides=('libgl' 'libgles' 'libegl')
conflicts=('libgl' 'libgles' 'libegl')
install -m755 -d ${pkgdir}/usr/lib/pkgconfig
cp ${srcdir}/fakeinstall/usr/lib/pkgconfig/{egl,gl,glesv1_cm,glesv2}.pc ${pkgdir}/usr/lib/pkgconfig
install -m755 -d "${pkgdir}/usr/lib/"
ln -s /usr/lib/mesa/libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1.2.0
ln -s libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1
ln -s libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so
ln -s /usr/lib/mesa/libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1.0.0
ln -s libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1
ln -s libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so
ln -s /usr/lib/mesa/libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1.1.0
ln -s libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1
ln -s libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so
ln -s /usr/lib/mesa/libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2.0.0
ln -s libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2
ln -s libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so
install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl/"
}

View 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@