# Not possible to directly refer to mesa3d variables, because of
# first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 17.1.3
+MESA3D_HEADERS_VERSION = 17.1.4
MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
MESA3D_HEADERS_SITE = https://mesa.freedesktop.org/archive
MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
+++ /dev/null
-From 83a1afd73f2d0aff9aa11c1754d6d407983afa7d Mon Sep 17 00:00:00 2001
-From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-Date: Wed, 9 Apr 2014 12:48:36 +0200
-Subject: [PATCH] Fix khrplatform.h not installed if EGL is disabled.
-
-KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is
-only installed if Mesa3d is compiled with EGL support.
-
-This patch installs this header file unconditionally.
-
-Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=77240
-
-Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> (rebased for mesa3d 10.3)
-
-diff -uNr Mesa-10.3.0-rc2.org/src/egl/main/Makefile.am Mesa-10.3.0-rc2/src/egl/main/Makefile.am
---- Mesa-10.3.0-rc2.org/src/egl/Makefile.am 2014-08-29 00:00:57.000000000 +0200
-+++ Mesa-10.3.0-rc2/src/egl/Makefile.am 2014-09-02 21:35:52.548071820 +0200
-@@ -85,9 +85,6 @@
-
- pkgconfig_DATA = egl.pc
-
--khrdir = $(includedir)/KHR
--khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
--
- egldir = $(includedir)/EGL
- egl_HEADERS = \
- $(top_srcdir)/include/EGL/eglext.h \
-diff -uNr Mesa-10.3.0-rc2.org/src/mapi/Makefile.am Mesa-10.3.0-rc2/src/mapi/Makefile.am
---- Mesa-10.3.0-rc2.org/src/mapi/Makefile.am 2014-09-01 01:22:12.000000000 +0200
-+++ Mesa-10.3.0-rc2/src/mapi/Makefile.am 2014-09-02 21:36:22.891686861 +0200
-@@ -211,4 +211,7 @@
- SUBDIRS += vgapi
- endif
-
-+khrdir = $(includedir)/KHR
-+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
-+
- include $(top_srcdir)/install-lib-links.mk
--- /dev/null
+Fix runtime error with uClibc
+
+Patch inspired by
+https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
+http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
+
+Starting an app using mesa3d 10.5.x, Kodi for example, fails:
+
+/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
+libGL error: unable to load driver: i965_dri.so
+libGL error: driver pointer missing
+libGL error: failed to load driver: i965
+libGL error: unable to load driver: swrast_dri.so
+libGL error: failed to load driver: swrast
+
+This patch was rejected by upstream mesa3d:
+http://lists.freedesktop.org/archives/mesa-dev/2015-March/079436.html
+
+The real fix was committed to uClibc:
+http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a
+
+Until the external toolchains do not contain this uClibc patch we keep this
+patch: http://lists.busybox.net/pipermail/buildroot/2015-March/123410.html
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+diff -uNr mesa-10.5.3.org/src/glsl/nir/nir_constant_expressions.c mesa-10.5.3/src/glsl/nir/nir_constant_expressions.c
+--- mesa-10.5.3.org/src/compiler/nir/nir_constant_expressions.c 2015-04-12 23:31:29.000000000 +0200
++++ mesa-10.5.3/src/compiler/nir/nir_constant_expressions.c 2015-04-13 19:59:37.819786541 +0200
+@@ -48,6 +48,18 @@
+ }
+ #endif
+
++#ifdef __UCLIBC__
++float fmaxf(float a, float b)
++{
++ return (a > b) ? a : b;
++}
++
++float fminf(float a, float b)
++{
++ return (a < b) ? a : b;
++}
++#endif
++
+ /**
+ * Evaluate one component of packSnorm4x8.
+ */
+++ /dev/null
-Fix runtime error with uClibc
-
-Patch inspired by
-https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
-http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
-
-Starting an app using mesa3d 10.5.x, Kodi for example, fails:
-
-/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
-libGL error: unable to load driver: i965_dri.so
-libGL error: driver pointer missing
-libGL error: failed to load driver: i965
-libGL error: unable to load driver: swrast_dri.so
-libGL error: failed to load driver: swrast
-
-This patch was rejected by upstream mesa3d:
-http://lists.freedesktop.org/archives/mesa-dev/2015-March/079436.html
-
-The real fix was committed to uClibc:
-http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a
-
-Until the external toolchains do not contain this uClibc patch we keep this
-patch: http://lists.busybox.net/pipermail/buildroot/2015-March/123410.html
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
-diff -uNr mesa-10.5.3.org/src/glsl/nir/nir_constant_expressions.c mesa-10.5.3/src/glsl/nir/nir_constant_expressions.c
---- mesa-10.5.3.org/src/compiler/nir/nir_constant_expressions.c 2015-04-12 23:31:29.000000000 +0200
-+++ mesa-10.5.3/src/compiler/nir/nir_constant_expressions.c 2015-04-13 19:59:37.819786541 +0200
-@@ -48,6 +48,18 @@
- }
- #endif
-
-+#ifdef __UCLIBC__
-+float fmaxf(float a, float b)
-+{
-+ return (a > b) ? a : b;
-+}
-+
-+float fminf(float a, float b)
-+{
-+ return (a < b) ? a : b;
-+}
-+#endif
-+
- /**
- * Evaluate one component of packSnorm4x8.
- */
--- /dev/null
+Fix musl build
+
+Downloaded from
+http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
++++ ./src/gallium/winsys/svga/drm/vmw_screen.h
+@@ -34,7 +34,7 @@
+ #ifndef VMW_SCREEN_H_
+ #define VMW_SCREEN_H_
+
+-
++#include <sys/stat.h>
+ #include "pipe/p_compiler.h"
+ #include "pipe/p_state.h"
+
--- /dev/null
+From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Fri, 4 Nov 2016 19:44:37 +0100
+Subject: [PATCH 1/1] Fix endianess detection with musl-based toolchains
+
+Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
+http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
+
+This patch checks for the presence of endian.h and promotes the result
+to src/amd/Makefile.addrlib.am which executes the broken build command.
+Fixes compile errors detected by the autobuilder infrastructure of the
+buildroot project:
+
+http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
+http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
+
+Patch sent upstream: https://patchwork.freedesktop.org/patch/119961/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure.ac | 1 +
+ src/amd/Makefile.addrlib.am | 1 +
+ src/util/u_endian.h | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4761c59..7991b52 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -786,6 +786,7 @@ fi
+ AC_HEADER_MAJOR
+ AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
+ AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
++AC_CHECK_HEADER([endian.h], [DEFINES="$DEFINES -DHAVE_ENDIAN_H"])
+ AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
+ AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
+
+diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
+index 64823fc..4e2fb1d 100644
+--- a/src/amd/Makefile.addrlib.am
++++ b/src/amd/Makefile.addrlib.am
+@@ -28,6 +28,7 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
+ -I$(srcdir)/addrlib/core \
+ -I$(srcdir)/addrlib/inc/chip/r800 \
+ -I$(srcdir)/addrlib/r800/chip \
++ $(DEFINES) \
+ -DBRAHMA_BUILD=1
+
+ addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
+diff --git a/src/util/u_endian.h b/src/util/u_endian.h
+index b9d563d..266fb4a 100644
+--- a/src/util/u_endian.h
++++ b/src/util/u_endian.h
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+
+-#if defined(__GLIBC__) || defined(ANDROID)
++#if defined(__GLIBC__) || defined(ANDROID) || defined(HAVE_ENDIAN_H)
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+--
+2.10.1
+
+++ /dev/null
-Fix musl build
-
-Downloaded from
-http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
---- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
-+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
-
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"
-
+++ /dev/null
-From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date: Fri, 4 Nov 2016 19:44:37 +0100
-Subject: [PATCH 1/1] Fix endianess detection with musl-based toolchains
-
-Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
-http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
-
-This patch checks for the presence of endian.h and promotes the result
-to src/amd/Makefile.addrlib.am which executes the broken build command.
-Fixes compile errors detected by the autobuilder infrastructure of the
-buildroot project:
-
-http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
-http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
-
-Patch sent upstream: https://patchwork.freedesktop.org/patch/119961/
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- configure.ac | 1 +
- src/amd/Makefile.addrlib.am | 1 +
- src/util/u_endian.h | 2 +-
- 3 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4761c59..7991b52 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -786,6 +786,7 @@ fi
- AC_HEADER_MAJOR
- AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
- AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
-+AC_CHECK_HEADER([endian.h], [DEFINES="$DEFINES -DHAVE_ENDIAN_H"])
- AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
- AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
-
-diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
-index 64823fc..4e2fb1d 100644
---- a/src/amd/Makefile.addrlib.am
-+++ b/src/amd/Makefile.addrlib.am
-@@ -28,6 +28,7 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
- -I$(srcdir)/addrlib/core \
- -I$(srcdir)/addrlib/inc/chip/r800 \
- -I$(srcdir)/addrlib/r800/chip \
-+ $(DEFINES) \
- -DBRAHMA_BUILD=1
-
- addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
-diff --git a/src/util/u_endian.h b/src/util/u_endian.h
-index b9d563d..266fb4a 100644
---- a/src/util/u_endian.h
-+++ b/src/util/u_endian.h
-@@ -27,7 +27,7 @@
- #ifndef U_ENDIAN_H
- #define U_ENDIAN_H
-
--#if defined(__GLIBC__) || defined(ANDROID)
-+#if defined(__GLIBC__) || defined(ANDROID) || defined(HAVE_ENDIAN_H)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
---
-2.10.1
-
--- /dev/null
+From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Thu, 17 Nov 2016 15:36:54 -0300
+Subject: [PATCH] configure.ac: invert order for wayland-scanner check
+
+When cross-compiling the .pc file might point to the wrong
+wayland-scanner binary (target rather than host) resulting in a
+non-executable and wrong scanner.
+Try searching the PATH first, and if that fails fall back into
+pkg-config.
+
+[Vincent: tweak patch for 17.1.1 version]
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2c7e636..0198d52 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2174,11 +2174,11 @@ if test "x$with_platforms" != xauto; then
+ with_egl_platforms=$with_platforms
+ fi
+
+-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+- WAYLAND_SCANNER='')
++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ if test "x$WAYLAND_SCANNER" = x; then
+- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
++ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
++ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
++ WAYLAND_SCANNER='')
+ fi
+
+ # Do per-EGL platform setups and checks
+--
+2.7.3
+
+++ /dev/null
-From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
-From: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Date: Thu, 17 Nov 2016 15:36:54 -0300
-Subject: [PATCH] configure.ac: invert order for wayland-scanner check
-
-When cross-compiling the .pc file might point to the wrong
-wayland-scanner binary (target rather than host) resulting in a
-non-executable and wrong scanner.
-Try searching the PATH first, and if that fails fall back into
-pkg-config.
-
-[Vincent: tweak patch for 17.1.1 version]
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c7e636..0198d52 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2174,11 +2174,11 @@ if test "x$with_platforms" != xauto; then
- with_egl_platforms=$with_platforms
- fi
-
--PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
-- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
-- WAYLAND_SCANNER='')
-+AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
- if test "x$WAYLAND_SCANNER" = x; then
-- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
-+ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
-+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
-+ WAYLAND_SCANNER='')
- fi
-
- # Do per-EGL platform setups and checks
---
-2.7.3
-
-# From https://lists.freedesktop.org/archives/mesa-announce/2017-June/000337.html
-md5 1946a93d543bc219427e2bebe2ac4752 mesa-17.1.3.tar.xz
-sha1 c79c420d9ecb08ed56d106427528793bdd3ab7ab mesa-17.1.3.tar.xz
-sha256 5f1ee9a8aea2880f887884df2dea0c16dd1b13eb42fd2e52265db0dc1b380e8c mesa-17.1.3.tar.xz
-sha512 b487d4f3d7717f379e7aaf66958bbef886fbae219e6e0333123c4623dc7db84109aca8cf07be08c0b79a74bdb198c704073fd549c6e85aa952ed3c97da1a8a94 mesa-17.1.3.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2017-June/000339.html
+md5 be2ef7c9edec23b07f74f6512a6a6fa5 mesa-17.1.4.tar.xz
+sha1 70a6c971125f754b78e502ade668bd02e46074d6 mesa-17.1.4.tar.xz
+sha256 06f3b0e6a28f0d20b7f3391cf67fe89ae98ecd0a686cd545da76557b6cec9cad mesa-17.1.4.tar.xz
+sha512 cb8369f0edd3e17b4eee8da159b9dc487f8144d69fe4b95901e9aa6a924759866f26f91fc2ead7036707eecea41582185e7ce73d54f97bf310f198b72ee0a8e4 mesa-17.1.4.tar.xz
################################################################################
# When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 17.1.3
+MESA3D_VERSION = 17.1.4
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://mesa.freedesktop.org/archive
MESA3D_LICENSE = MIT, SGI, Khronos