~ruther/guix-local

653569e878f39345b05110b998f10db3b520ccfe — Marius Bakke 9 years ago 2a37852
gnu: mesa: Update to 17.1.2.

* gnu/packages/patches/mesa-skip-disk-cache-test.patch: Adjust.
* gnu/packages/patches/mesa-fix-32bit-test-failures.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove deleted file.
* gnu/packages/gl.scm (mesa): Update to 17.1.2.
[source]: Remove obsolete patch.
[inputs]: Add LIBELF.
[native-inputs]: Add WHICH.
[arguments]<#:configure-flags>: Adjust deprecated flag.
4 files changed, 11 insertions(+), 69 deletions(-)

M gnu/local.mk
M gnu/packages/gl.scm
D gnu/packages/patches/mesa-fix-32bit-test-failures.patch
M gnu/packages/patches/mesa-skip-disk-cache-test.patch
M gnu/local.mk => gnu/local.mk +0 -1
@@ 798,7 798,6 @@ dist_patch_DATA =						\
  %D%/packages/patches/mcrypt-CVE-2012-4409.patch			\
  %D%/packages/patches/mcrypt-CVE-2012-4426.patch			\
  %D%/packages/patches/mcrypt-CVE-2012-4527.patch			\
  %D%/packages/patches/mesa-fix-32bit-test-failures.patch	\
  %D%/packages/patches/mesa-skip-disk-cache-test.patch		\
  %D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch	\
  %D%/packages/patches/metabat-remove-compilation-date.patch	\

M gnu/packages/gl.scm => gnu/packages/gl.scm +8 -6
@@ 30,6 30,7 @@
  #:use-module (gnu packages bison)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages documentation)
  #:use-module (gnu packages elf)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages freedesktop)


@@ 217,7 218,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
  (package
    (name "mesa")
    (version "17.0.6")
    (version "17.1.2")
    (source
      (origin
        (method url-fetch)


@@ 227,10 228,9 @@ also known as DXTn or DXTC) for Mesa.")
                                  version "/mesa-" version ".tar.xz")))
        (sha256
         (base32
          "17d60jjzg4ddm95gk2cqx0xz6b9anmmz6ax4majwr3gis2yg7v49"))
          "0fc2g6cqffr8mh705r60xv9v66saiff8y3alz6qkjqvl8d7q0dq9"))
        (patches
         (search-patches "mesa-fix-32bit-test-failures.patch"
                         "mesa-wayland-egl-symbols-check-mips.patch"
         (search-patches "mesa-wayland-egl-symbols-check-mips.patch"
                         "mesa-skip-disk-cache-test.patch"))))
    (build-system gnu-build-system)
    (propagated-inputs


@@ 247,6 247,7 @@ also known as DXTn or DXTC) for Mesa.")
      `(("expat" ,expat)
        ("dri2proto" ,dri2proto)
        ("dri3proto" ,dri3proto)
        ("libelf" ,libelf)    ;required for r600 when using llvm
        ("libva" ,(force libva-without-mesa))
        ("libxml2" ,libxml2)
        ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support


@@ 262,7 263,8 @@ also known as DXTn or DXTC) for Mesa.")
        ("wayland" ,wayland)))
    (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python-2)))
        ("python" ,python-2)
        ("which" ,(@ (gnu packages base) which))))
    (arguments
     `(#:configure-flags
       '(,@(match (%current-system)


@@ 294,7 296,7 @@ also known as DXTn or DXTC) for Mesa.")
         ,@(match (%current-system)
             ((or "x86_64-linux" "i686-linux")
              '("--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast"
                "--enable-gallium-llvm")) ; default is x86/x86_64 only
                "--enable-llvm"))         ; default is x86/x86_64 only
             (_
              '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
       #:phases

D gnu/packages/patches/mesa-fix-32bit-test-failures.patch => gnu/packages/patches/mesa-fix-32bit-test-failures.patch +0 -58
@@ 1,58 0,0 @@
Fix a test failure when building for 32 bit architectures:

http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00381.html

Patch copied from upstream source repository:

https://cgit.freedesktop.org/mesa/mesa/commit/?id=61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8

From 61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8 Mon Sep 17 00:00:00 2001
From: Grazvydas Ignotas <notasas@gmail.com>
Date: Thu, 9 Mar 2017 02:54:53 +0200
Subject: [PATCH] util/disk_cache: fix size subtraction on 32bit

Negating size_t on 32bit produces a 32bit result. This was effectively
adding values close to UINT_MAX to the cache size (the files are usually
small) instead of intended subtraction.
Fixes 'make check' disk_cache failures on 32bit.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
---
 src/util/disk_cache.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 5470688df3..facdcecf7c 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -603,7 +603,7 @@ evict_random_item(struct disk_cache *cache)
    free(dir_path);
 
    if (size) {
-      p_atomic_add(cache->size, - size);
+      p_atomic_add(cache->size, - (uint64_t)size);
       return;
    }
 
@@ -624,7 +624,7 @@ evict_random_item(struct disk_cache *cache)
    free(dir_path);
 
    if (size)
-      p_atomic_add(cache->size, - size);
+      p_atomic_add(cache->size, - (uint64_t)size);
 }
 
 void
#@@ -646,7 +646,7 @@ disk_cache_remove(struct disk_cache *cache, const cache_key key)
#    free(filename);
# 
#    if (sb.st_size)
#-      p_atomic_add(cache->size, - sb.st_size);
#+      p_atomic_add(cache->size, - (uint64_t)sb.st_size);
# }
# 
# /* From the zlib docs:
-- 
2.12.2


M gnu/packages/patches/mesa-skip-disk-cache-test.patch => gnu/packages/patches/mesa-skip-disk-cache-test.patch +3 -4
@@ 5,16 5,15 @@ for now.

--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -137,11 +137,6 @@
@@ -170,11 +170,6 @@
    unsetenv("MESA_GLSL_CACHE_DIR");
    unsetenv("XDG_CACHE_HOME");

-   cache = disk_cache_create();
-   cache = disk_cache_create("test", "make_check");
-   expect_non_null(cache, "disk_cache_create with no environment variables");
-
-   disk_cache_destroy(cache);
-
    /* Test with XDG_CACHE_HOME set */
    setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
    cache = disk_cache_create();

    cache = disk_cache_create("test", "make_check");