gnu: perl: Update home page.
[jackhill/guix/guix.git] / gnu / packages / gl.scm
index d6c71f3..72f450c 100644 (file)
@@ -3,13 +3,13 @@
 ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2016 ng0 <ng0@n0.is>
 ;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +53,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system meson)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -119,7 +120,7 @@ as ASCII text.")
      "Freeglut is a completely Free/OpenSourced alternative to
 the OpenGL Utility Toolkit (GLUT) library.  GLUT was originally
 written by Mark Kilgard to support the sample programs in the
-second edition OpenGL 'RedBook'.  Since then, GLUT has been used
+second edition OpenGL @code{RedBook}.  Since then, GLUT has been used
 in a wide variety of practical applications because it is simple,
 widely available and highly portable.
 
@@ -157,6 +158,8 @@ the X-Consortium license.")
                (base32
                 "0nsn4s6vnv5xcgxcw6q031amvh2zfj2smy1r5mbnjj2548hxcn2l"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--disable-static")))
     ;; The pkg-config file lists "freetype2" as Requires.private.
     (propagated-inputs `(("freetype" ,freetype)))
     (inputs `(("libx11" ,libx11)
@@ -220,7 +223,7 @@ also known as DXTn or DXTC) for Mesa.")
 (define-public mesa
   (package
     (name "mesa")
-    (version "18.1.8")
+    (version "18.3.5")
     (source
       (origin
         (method url-fetch)
@@ -232,10 +235,10 @@ also known as DXTn or DXTC) for Mesa.")
                                   version "/mesa-" version ".tar.xz")))
         (sha256
          (base32
-          "06y28hpynb8w1qagznr85ml48hf8264w4ji6cmvm2fy7x5zyc6xx"))
+          "0lvrfjaic7dhay9v52f9k3q5aac8xagfq3pnzjrl0cn65jlaw9s0"))
         (patches
          (search-patches "mesa-skip-disk-cache-test.patch"))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (propagated-inputs
       `(;; The following are in the Requires.private field of gl.pc.
         ("libdrm" ,libdrm)
@@ -252,73 +255,71 @@ also known as DXTn or DXTC) for Mesa.")
         ("libva" ,(force libva-without-mesa))
         ("libxml2" ,libxml2)
         ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
+        ("libxrandr" ,libxrandr)
         ("libxvmc" ,libxvmc)
         ,@(match (%current-system)
             ((or "x86_64-linux" "i686-linux")
-             ;; FIXME: Change to 'llvm' in the next rebuild cycle.
-             `(("llvm" ,llvm-without-rtti)))
+             `(("llvm" ,llvm)))
             (_
              `()))
         ("makedepend" ,makedepend)
         ("wayland" ,wayland)
         ("wayland-protocols" ,wayland-protocols)))
     (native-inputs
-      `(("pkg-config" ,pkg-config)
-        ("python" ,python-2)
-        ("python2-mako" ,python2-mako)
+      `(("bison" ,bison)
+        ("flex" ,flex)
+        ("gettext" ,gettext-minimal)
+        ("pkg-config" ,pkg-config)
+        ("python" ,python)
+        ("python-mako" ,python-mako)
         ("which" ,(@ (gnu packages base) which))))
     (arguments
      `(#:configure-flags
        '(,@(match (%current-system)
-             ("armhf-linux"
-              ;; TODO: Add etnaviv,imx when libdrm supports etnaviv.
-              '("--with-gallium-drivers=freedreno,nouveau,r300,r600,swrast,tegra,vc4,virgl"))
-             ("aarch64-linux"
+             ((or "armhf-linux" "aarch64-linux")
               ;; TODO: Fix svga driver for aarch64 and armhf.
-              '("--with-gallium-drivers=freedreno,nouveau,pl111,r300,r600,swrast,tegra,vc4,virgl"))
+              '("-Dgallium-drivers=etnaviv,freedreno,imx,nouveau,pl111,r300,r600,swrast,tegra,v3d,vc4,virgl"))
              (_
-              '("--with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
+              '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
          ;; Enable various optional features.  TODO: opencl requires libclc,
          ;; omx requires libomxil-bellagio
-         "--with-platforms=x11,drm,surfaceless,wayland"
-         "--enable-glx-tls"        ;Thread Local Storage, improves performance
-         ;; "--enable-opencl"
-         ;; "--enable-omx"
-         "--enable-osmesa"
-         "--enable-xa"
+         "-Dplatforms=x11,drm,surfaceless,wayland"
+         "-Dglx=dri"        ;Thread Local Storage, improves performance
+         ;; "-Dopencl=true"
+         ;; "-Domx=true"
+         "-Dosmesa=gallium"
+         "-Dgallium-xa=true"
+
          ;; features required by wayland
-         "--enable-gles2"
-         "--enable-gbm"
-         "--enable-shared-glapi"
-         ;; Without floating point texture support, drivers such as Nouveau
-         ;; are stuck at OpenGL 2.1 instead of OpenGL 3.0+.
-         "--enable-texture-float"
+         "-Dgles2=true"
+         "-Dgbm=true"
+         "-Dshared-glapi=true"
 
          ;; Enable Vulkan on i686-linux and x86-64-linux.
          ,@(match (%current-system)
              ("x86_64-linux"
-              '("--with-vulkan-drivers=intel,radeon"))
+              '("-Dvulkan-drivers=intel,amd"))
              ;; TODO: Fix intel driver on i686-linux.
              ("i686-linux"
-              '("--with-vulkan-drivers=radeon"))
+              '("-Dvulkan-drivers=amd"))
              (_
-              '("")))
+              '("-Dvulkan-drivers=auto")))
 
          ;; Also enable the tests.
-         "--enable-gallium-tests"
+         "-Dbuild-tests=true"
 
          ;; on non-intel systems, drop i915 and i965
          ;; from the default dri drivers
          ,@(match (%current-system)
              ((or "x86_64-linux" "i686-linux")
-              '("--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast"
-                "--enable-llvm"))         ; default is x86/x86_64 only
+              '("-Ddri-drivers=i915,i965,nouveau,r200,r100"
+                "-Dllvm=true"))         ; default is x86/x86_64 only
              (_
-              '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
+              '("-Ddri-drivers=nouveau,r200,r100"))))
        #:modules ((ice-9 match)
                   (srfi srfi-1)
                   (guix build utils)
-                  (guix build gnu-build-system))
+                  (guix build meson-build-system))
        #:phases
        (modify-phases %standard-phases
          (add-after
@@ -328,7 +329,7 @@ also known as DXTn or DXTC) for Mesa.")
                (("/usr/bin/env python2") (which "python")))
              #t))
          (add-before
-           'build 'fix-dlopen-libnames
+           'configure 'fix-dlopen-libnames
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                ;; Remain agnostic to .so.X.Y.Z versions while doing
@@ -457,14 +458,14 @@ glxgears, glxheads, and glxinfo.")
 (define-public glew
   (package
     (name "glew")
-    (version "2.0.0")
+    (version "2.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/glew/glew/" version
                                   "/glew-" version ".tgz"))
               (sha256
                (base32
-                "0r37fg2s1f0jrvwh6c8cz5x6v4wqmhq42qm15cs9qs349q5c6wn5"))
+                "159wk5dc0ykjbxvag5i1m2mhp23zkk6ra04l26y3jc3nwvkr3ph4"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -547,7 +548,7 @@ OpenGL graphics API.")
 (define-public libepoxy
   (package
     (name "libepoxy")
-    (version "1.5.2")
+    (version "1.5.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -555,10 +556,11 @@ OpenGL graphics API.")
                     version "/libepoxy-" version ".tar.xz"))
               (sha256
                (base32
-                "1n57xj5i6giw4mp5s59w1m9bm33sd6gjg7r00dzzvcwya6326mm9"))))
+                "0ga3qjv50x37my6pw5xr14g5n6z78hy5s8s06kays8c3ab2mha80"))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (delete 'bootstrap)
          (add-before
            'configure 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
@@ -570,7 +572,7 @@ OpenGL graphics API.")
                  (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
                  (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
                #t))))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python)))
@@ -722,7 +724,7 @@ mixed vector/bitmap output.")
 (define-public virtualgl
   (package
     (name "virtualgl")
-    (version "2.6")
+    (version "2.6.1")
     (source
      (origin
        (method git-fetch)
@@ -731,8 +733,7 @@ mixed vector/bitmap output.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0di2igj2bhwb153fndgxks7y57pyhp0gj31n47j93gb7lxc9qcck"))))
+        (base32 "04fdwm6mz76lw4iwd5m7yxjfhpa0rpxd357bv5smk5lclnlbz1bv"))))
     (arguments
      `(#:tests? #f                      ; no tests are available
        #:configure-flags (list