diff options
Diffstat (limited to 'gnu/packages/gl.scm')
-rw-r--r-- | gnu/packages/gl.scm | 62 |
1 files changed, 55 insertions, 7 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index c42b4a00cb..62e272b5bf 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -159,6 +159,8 @@ the X-Consortium license.") (inputs `(("libx11" ,libx11) ("mesa" ,mesa) ("glu" ,glu))) + (native-inputs + `(("pkg-config" ,pkg-config))) (home-page "http://ftgl.sourceforge.net") (synopsis "Font rendering library for OpenGL applications") (description @@ -219,7 +221,7 @@ also known as DXTn or DXTC) for Mesa.") (define-public mesa (package (name "mesa") - (version "17.2.1") + (version "17.2.7") (source (origin (method url-fetch) @@ -231,7 +233,7 @@ also known as DXTn or DXTC) for Mesa.") version "/mesa-" version ".tar.xz"))) (sha256 (base32 - "07msr6xismw2jq87irwhz7vygvzj6hi38d71paij9zvwh8bmsf3p")) + "0s3slgjxnx482yw0knn4a6alsy2cq28rah6hnjbmf12mvyldxksh")) (patches (search-patches "mesa-wayland-egl-symbols-check-mips.patch" "mesa-skip-disk-cache-test.patch")))) @@ -296,6 +298,13 @@ also known as DXTn or DXTC) for Mesa.") ;; are stuck at OpenGL 2.1 instead of OpenGL 3.0+. "--enable-texture-float" + ;; Enable Vulkan on x86-64. + ,@(match (%current-system) + ("x86_64-linux" + '("--with-vulkan-drivers=intel,radeon")) + (_ + '(""))) + ;; Also enable the tests. "--enable-gallium-tests" @@ -307,6 +316,10 @@ also known as DXTn or DXTC) for Mesa.") "--enable-llvm")) ; default is x86/x86_64 only (_ '("--with-dri-drivers=nouveau,r200,radeon,swrast")))) + #:modules ((ice-9 match) + (srfi srfi-1) + (guix build utils) + (guix build gnu-build-system)) #:phases (modify-phases %standard-phases (add-after @@ -341,13 +354,48 @@ also known as DXTn or DXTC) for Mesa.") ;; egl_gallium support. (("\"gbm_dri\\.so") (string-append "\"" out "/lib/dri/gbm_dri.so"))) + #t))) + (add-after 'install 'symlinks-instead-of-hard-links + (lambda* (#:key outputs #:allow-other-keys) + ;; All the drivers and gallium targets create hard links upon + ;; installation (search for "hardlink each megadriver instance" + ;; in the makefiles). This is no good for us since we'd produce + ;; nars that contain several copies of these files. Thus, turn + ;; them into symlinks, which saves ~124 MiB. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (files (find-files lib + (lambda (file stat) + (and (string-contains file ".so") + (eq? 'regular + (stat:type stat)))))) + (inodes (map (compose stat:ino stat) files))) + (for-each (lambda (inode) + (match (filter-map (match-lambda + ((file ino) + (and (= ino inode) file))) + (zip files inodes)) + ((_) + #f) + ((reference others ..1) + (format #t "creating ~a symlinks to '~a'~%" + (length others) reference) + (for-each delete-file others) + (for-each (lambda (file) + (if (string=? (dirname file) + (dirname reference)) + (symlink (basename reference) + file) + (symlink reference file))) + others)))) + (delete-duplicates inodes)) #t)))))) (home-page "https://mesa3d.org/") - (synopsis "OpenGL implementation") - (description "Mesa is a free implementation of the OpenGL specification - -a system for rendering interactive 3D graphics. A variety of device drivers -allows Mesa to be used in many different environments ranging from software -emulation to complete hardware acceleration for modern GPUs.") + (synopsis "OpenGL and Vulkan implementations") + (description "Mesa is a free implementation of the OpenGL and Vulkan +specifications - systems for rendering interactive 3D graphics. A variety of +device drivers allows Mesa to be used in many different environments ranging +from software emulation to complete hardware acceleration for modern GPUs.") (license license:x11))) (define-public mesa-headers |