Subject: [bug#33716] [PATCH staging] gnu: mesa: Update to 18.3.1.

From: Rutger Helling <[email-masked]>
Date: Wed, 12 Dec 2018 11:31:33 +0100

Hey Guix,

Here's a Mesa update for the just released 18.3.1 version. Not sure
whether or not I'm too late for the staging branch. If I am this can
wait until the next staging branch.

Two things to note:
* While Mesa 18.3.x still builds with LLVM 6 the upcoming 19.0.x series
  doesn't anymore. For that and performance reasons I decided to add a
  [email-masked] package for Mesa. I don't know enough about the LLVM stack
  to upgrade it entirely, so this is kind of a workaround.
* Since Mesa 18.3 works with Python 3 I've replaced the Python 2
  dependencies with Python 3 ones.
From a8877a810e1b957284893aefc1d298517a262504 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Wed, 12 Dec 2018 08:41:42 +0100
Subject: [PATCH 1/2] gnu: Add [email-masked].

* gnu/packages/llvm.scm ([email-masked]): New variable.
---
 gnu/packages/llvm.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 4be86f3d2..ed2ad6b1d 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -95,6 +95,19 @@ languages is in development.  The compiler infrastructure includes mirror sets
 of programming tools as well as libraries with equivalent functionality.")
     (license license:ncsa)))
 
+(define-public llvm-7.0.0
+  (package (inherit llvm)
+    (name "llvm")
+    (version "7.0.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://llvm.org/releases/"
+                          version "/llvm-" version ".src.tar.xz"))
+      (sha256
+       (base32
+        "08p27wv1pr9ql2zc3f3qkkymci46q7myvh8r5ijippnbwr2gihcb"))))))
+
 (define* (clang-runtime-from-llvm llvm hash
                                   #:optional (patches '()))
   (package
-- 
2.20.0

From 05c7ad44062de775ec4b1443b809a417f9bd37a8 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Wed, 12 Dec 2018 08:42:55 +0100
Subject: [PATCH 2/2] gnu: mesa: Update to 18.3.1.

* gnu/packages/gl.scm (mesa): Update to 18.3.1.
[inputs]: Use [email-masked] instead of llvm.
[native-inputs]: Use python instead of python-2. Use python-mako instead of
python2-mako.
---
 gnu/packages/gl.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 1bf53bcbb..8d4f14fb4 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -221,7 +221,7 @@ also known as DXTn or DXTC) for Mesa.")
 (define-public mesa
   (package
     (name "mesa")
-    (version "18.2.6")
+    (version "18.3.1")
     (source
       (origin
         (method url-fetch)
@@ -233,7 +233,7 @@ also known as DXTn or DXTC) for Mesa.")
                                   version "/mesa-" version ".tar.xz")))
         (sha256
          (base32
-          "04nwxykmc80gicmal0zkk8is34rmbqawmfckirqhrps9h97zmfly"))
+          "0qyw9dj2p9n91qzc4ylck2an7ibssjvzi2bjcpv2ajk851yq47sv"))
         (patches
          (search-patches "mesa-skip-disk-cache-test.patch"))))
     (build-system gnu-build-system)
@@ -257,7 +257,7 @@ also known as DXTn or DXTC) for Mesa.")
         ("libxvmc" ,libxvmc)
         ,@(match (%current-system)
             ((or "x86_64-linux" "i686-linux")
-             `(("llvm" ,llvm)))
+             `(("llvm" ,llvm-7.0.0)))
             (_
              `()))
         ("makedepend" ,makedepend)
@@ -265,8 +265,8 @@ also known as DXTn or DXTC) for Mesa.")
         ("wayland-protocols" ,wayland-protocols)))
     (native-inputs
       `(("pkg-config" ,pkg-config)
-        ("python" ,python-2)
-        ("python2-mako" ,python2-mako)
+        ("python" ,python)
+        ("python-mako" ,python-mako)
         ("which" ,(@ (gnu packages base) which))))
     (arguments
      `(#:configure-flags
-- 
2.20.0