gnu: qbittorrent: Update to 4.2.0.
[jackhill/guix/guix.git] / gnu / packages / graphics.scm
index d4e9adb..3ef420c 100644 (file)
@@ -7,7 +7,7 @@
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
@@ -16,6 +16,8 @@
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -69,6 +71,7 @@
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -77,6 +80,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
 (define-public blender
   (package
     (name "blender")
 (define-public blender
   (package
     (name "blender")
-    (version "2.80")
+    (version "2.81")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.blender.org/source/"
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.blender.org/source/"
-                                  "blender-" version ".tar.gz"))
+                                  "blender-" version ".tar.xz"))
               (sha256
                (base32
               (sha256
                (base32
-                "1h550jisdbis50hxwk5kxrvrk1a6sh2fsri3yyj66vhzbi87x7fd"))))
+                "1prp0f2152f1sz23jlc86vndfvmplb7qhllikkirq7hgpykrshna"))))
     (build-system cmake-build-system)
     (arguments
       (let ((python-version (version-major+minor (package-version python))))
     (build-system cmake-build-system)
     (arguments
       (let ((python-version (version-major+minor (package-version python))))
      `(("boost" ,boost)
        ("jemalloc" ,jemalloc)
        ("libx11" ,libx11)
      `(("boost" ,boost)
        ("jemalloc" ,jemalloc)
        ("libx11" ,libx11)
+       ("libxi" ,libxi)
+       ("libxrender" ,libxrender)
        ("openimageio" ,openimageio)
        ("openexr" ,openexr)
        ("opensubdiv" ,opensubdiv)
        ("openimageio" ,openimageio)
        ("openexr" ,openexr)
        ("opensubdiv" ,opensubdiv)
        ("openal" ,openal)
        ("python" ,python)
        ("python-numpy" ,python-numpy)
        ("openal" ,openal)
        ("python" ,python)
        ("python-numpy" ,python-numpy)
+       ("tbb" ,tbb)
        ("zlib" ,zlib)))
     (home-page "https://blender.org/")
     (synopsis "3D graphics creation suite")
        ("zlib" ,zlib)))
     (home-page "https://blender.org/")
     (synopsis "3D graphics creation suite")
@@ -288,7 +295,7 @@ more.")
 (define-public cgal
   (package
     (name "cgal")
 (define-public cgal
   (package
     (name "cgal")
-    (version "4.8.1")
+    (version "4.14.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -296,19 +303,15 @@ more.")
                     "CGAL-" version "/CGAL-" version ".tar.xz"))
               (sha256
                (base32
                     "CGAL-" version "/CGAL-" version ".tar.xz"))
               (sha256
                (base32
-                "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s"))))
+                "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
     (build-system cmake-build-system)
     (arguments
     (build-system cmake-build-system)
     (arguments
-     '(;; "RelWithDebInfo" is not supported.
-       #:build-type "Release"
-
-       ;; No 'test' target.
-       #:tests? #f))
+     '(#:tests? #f))                    ; no test target
     (inputs
      `(("mpfr" ,mpfr)
        ("gmp" ,gmp)
        ("boost" ,boost)))
     (inputs
      `(("mpfr" ,mpfr)
        ("gmp" ,gmp)
        ("boost" ,boost)))
-    (home-page "http://cgal.org/")
+    (home-page "https://www.cgal.org/")
     (synopsis "Computational geometry algorithms library")
     (description
      "CGAL provides easy access to efficient and reliable geometric algorithms
     (synopsis "Computational geometry algorithms library")
     (description
      "CGAL provides easy access to efficient and reliable geometric algorithms
@@ -327,18 +330,26 @@ many more.")
 (define-public ilmbase
   (package
     (name "ilmbase")
 (define-public ilmbase
   (package
     (name "ilmbase")
-    (version "2.3.0")
+    (version "2.4.0")
     (source (origin
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/openexr/openexr/releases"
-                                  "/download/v" version "/ilmbase-"
-                                  version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/openexr/openexr")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name "ilmbase" version))
               (sha256
                (base32
               (sha256
                (base32
-                "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5"))
-              (patches (search-patches "ilmbase-fix-tests.patch"))))
-    (build-system gnu-build-system)
-    (home-page "http://www.openexr.com/")
+                "0g3rz11cvb7gnphp2np9z7bfl7v4dprq4w5hnsvx7yrasgsdyn8s"))
+              (patches (search-patches "ilmbase-fix-tests.patch"
+                                       "ilmbase-openexr-pkg-config.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'change-directory
+                    (lambda _
+                      (chdir "IlmBase")
+                      #t)))))
+    (home-page "https://www.openexr.com/")
     (synopsis "Utility C++ libraries for threads, maths, and exceptions")
     (description
      "IlmBase provides several utility libraries for C++.  Half is a class
     (synopsis "Utility C++ libraries for threads, maths, and exceptions")
     (description
      "IlmBase provides several utility libraries for C++.  Half is a class
@@ -409,43 +420,50 @@ graphics.")
 (define-public openexr
   (package
     (name "openexr")
 (define-public openexr
   (package
     (name "openexr")
-    (version "2.3.0")
+    (version (package-version ilmbase))
     (source (origin
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/openexr/openexr/releases"
-                                  "/download/v" version "/openexr-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x"))
+              (inherit (package-source ilmbase))
+              (file-name (git-file-name "openexr" version))
               (modules '((guix build utils)))
               (snippet
                '(begin
               (modules '((guix build utils)))
               (snippet
                '(begin
-                  (substitute* (find-files "." "tmpDir\\.h")
+                  (substitute* (find-files "OpenEXR" "tmpDir\\.h")
                     (("\"/var/tmp/\"")
                      "\"/tmp/\""))
                   #t))))
                     (("\"/var/tmp/\"")
                      "\"/tmp/\""))
                   #t))))
-    (build-system gnu-build-system)
+    (build-system cmake-build-system)
     (arguments
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'disable-broken-test
-           ;; This test fails on i686. Upstream developers suggest that
-           ;; this test is broken on i686 and can be safely disabled:
-           ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
+         (add-after 'unpack 'change-directory
            (lambda _
            (lambda _
-             (substitute* "IlmImfTest/main.cpp"
-               (("#include \"testOptimizedInterleavePatterns.h\"")
-                 "//#include \"testOptimizedInterleavePatterns.h\"")
-               (("TEST \\(testOptimizedInterleavePatterns")
-                 "//TEST (testOptimizedInterleavePatterns"))
-             #t)))))
+             (chdir "OpenEXR")
+             #t))
+         (add-before 'check 'increase-test-timeout
+           (lambda _
+             ;; On armhf-linux, we need to override the CTest default
+             ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
+             (setenv "CTEST_TEST_TIMEOUT" "2000")
+             #t))
+         ,@(if (not (target-64bit?))
+               `((add-after 'change-directory 'disable-broken-test
+                   ;; This test fails on i686. Upstream developers suggest that
+                   ;; this test is broken on i686 and can be safely disabled:
+                   ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
+                   (lambda _
+                     (substitute* "IlmImfTest/main.cpp"
+                       ((".*testOptimizedInterleavePatterns.*") "")
+                       ;; This test is broken in 2.4.0 and will be fixed in a later
+                       ;; release: <https://github.com/openexr/openexr/issues/571>.
+                       ((".*testLargeDataWindowOffsets.*") ""))
+                     #t)))
+               '()))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("ilmbase" ,ilmbase)                       ;used in public headers
        ("zlib" ,zlib)))                           ;OpenEXR.pc reads "-lz"
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("ilmbase" ,ilmbase)                       ;used in public headers
        ("zlib" ,zlib)))                           ;OpenEXR.pc reads "-lz"
-    (home-page "http://www.openexr.com")
+    (home-page "https://www.openexr.com/")
     (synopsis "High-dynamic range file format library")
     (description
      "OpenEXR is a high dynamic-range (HDR) image file format developed for
     (synopsis "High-dynamic range file format library")
     (description
      "OpenEXR is a high dynamic-range (HDR) image file format developed for
@@ -470,7 +488,8 @@ storage of the \"EXR\" file format for storing 16-bit floating-point images.")
     ;; FIXME: To run all tests successfully, test image sets from multiple
     ;; third party sources have to be present.  For details see
     ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
     ;; FIXME: To run all tests successfully, test image sets from multiple
     ;; third party sources have to be present.  For details see
     ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
-    (arguments `(#:tests? #f))
+    (arguments
+     `(#:tests? #f))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
@@ -581,6 +600,42 @@ virtual reality, scientific visualization and modeling.")
      `(("libjpeg" ,libjpeg)
        ,@(package-inputs openscenegraph)))))
 
      `(("libjpeg" ,libjpeg)
        ,@(package-inputs openscenegraph)))))
 
+
+(define-public openmw-openscenegraph
+  ;; OpenMW prefers its own fork of openscenegraph:
+  ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
+  (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
+    (hidden-package
+     (package
+       (inherit openscenegraph)
+       (version (git-version "3.6" "1" commit))
+       (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                (url "https://github.com/OpenMW/osg/")
+                (commit commit)))
+          (file-name (git-file-name (package-name openscenegraph) version))
+          (sha256
+           (base32
+            "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
+       (arguments
+        (substitute-keyword-arguments (package-arguments openscenegraph)
+          ((#:configure-flags flags)
+           ;; As per the above wiki link, the following plugins are enough:
+           `(append
+             '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
+               "-DBUILD_OSG_PLUGIN_OSG=1"
+               "-DBUILD_OSG_PLUGIN_DDS=1"
+               "-DBUILD_OSG_PLUGIN_TGA=1"
+               "-DBUILD_OSG_PLUGIN_BMP=1"
+               "-DBUILD_OSG_PLUGIN_JPEG=1"
+               "-DBUILD_OSG_PLUGIN_PNG=1"
+               "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
+               ;; The jpeg plugin requires conversion between integers and booleans
+               "-DCMAKE_CXX_FLAGS=-fpermissive")
+             ,flags))))))))
+
 (define-public povray
   (package
     (name "povray")
 (define-public povray
   (package
     (name "povray")
@@ -618,7 +673,6 @@ virtual reality, scientific visualization and modeling.")
        (list "COMPILED_BY=Guix"
              (string-append "--with-boost-libdir="
                             (assoc-ref %build-inputs "boost") "/lib")
        (list "COMPILED_BY=Guix"
              (string-append "--with-boost-libdir="
                             (assoc-ref %build-inputs "boost") "/lib")
-             "CXXFLAGS=-std=c++11"
              "--disable-optimiz-arch")
        #:phases
        (modify-phases %standard-phases
              "--disable-optimiz-arch")
        #:phases
        (modify-phases %standard-phases
@@ -708,7 +762,7 @@ realistic reflections, shading, perspective and other effects.")
        ("graphviz" ,graphviz)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
        ("graphviz" ,graphviz)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
-       ("xvfb" ,xorg-server)))
+       ("xvfb" ,xorg-server-for-tests)))
     (home-page "https://rapicorn.testbit.org/")
     (synopsis "Toolkit for rapid development of user interfaces")
     (description
     (home-page "https://rapicorn.testbit.org/")
     (synopsis "Toolkit for rapid development of user interfaces")
     (description
@@ -869,28 +923,25 @@ rendering SVG graphics.")
 (define-public python-pastel
   (package
     (name "python-pastel")
 (define-public python-pastel
   (package
     (name "python-pastel")
-    (version "0.1.0")
+    (version "0.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pastel" version))
        (sha256
         (base32
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pastel" version))
        (sha256
         (base32
-         "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i"))))
+         "1qxcrcl8pzh66l8s6hym153mijdhwna0afcsmgca0bj4n80ijfxz"))))
     (build-system python-build-system)
     (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda _ (invoke "pytest" "pastel" "tests/"))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/sdispater/pastel")
     (synopsis "Library to colorize strings in your terminal")
     (description "Pastel is a simple library to help you colorize strings in
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/sdispater/pastel")
     (synopsis "Library to colorize strings in your terminal")
     (description "Pastel is a simple library to help you colorize strings in
-your terminal.  It comes bundled with predefined styles:
-@enumerate
-@item info: green
-@item comment: yellow
-@item question: black on cyan
-@item error: white on red
-@end enumerate
-")
+your terminal.")
     (license license:expat)))
 
 (define-public python2-pastel
     (license license:expat)))
 
 (define-public python2-pastel
@@ -982,12 +1033,13 @@ requirements.")
 (define-public opensubdiv
   (package
     (name "opensubdiv")
 (define-public opensubdiv
   (package
     (name "opensubdiv")
-    (version "3_4_0")
+    (version "3.4.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
-                     (commit (string-append "v" version))))
+                    (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
+                    (commit (string-append "v" (string-join (string-split version #\.)
+                                                            "_")))))
               (file-name (git-file-name name version))
               (sha256
                (base32
               (file-name (git-file-name name version))
               (sha256
                (base32
@@ -1007,7 +1059,7 @@ requirements.")
                       (setenv "DISPLAY" ":1")
                       #t)))))
     (native-inputs
                       (setenv "DISPLAY" ":1")
                       #t)))))
     (native-inputs
-     `(("xorg-server" ,xorg-server)))
+     `(("xorg-server" ,xorg-server-for-tests)))
     (inputs
      `(("glew" ,glew)
        ("libxrandr" ,libxrandr)
     (inputs
      `(("glew" ,glew)
        ("libxrandr" ,libxrandr)
@@ -1064,47 +1116,52 @@ or by subtracting one shape from the other.")
       (license license:gpl2))))
 
 (define-public coin3D
       (license license:gpl2))))
 
 (define-public coin3D
-  (package
-    (name "coin3D")
-    (version "4.0.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
-             version "-src.zip"))
-       (sha256
-        (base32
-         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           (for-each delete-file
-                     '("cfg/csubst.exe"
-                       "cfg/wrapmsvc.exe"))
-           #t))))
-    (build-system cmake-build-system)
-    (native-inputs
-     `(("doxygen" ,doxygen)
-       ("graphviz" ,graphviz)))
-    (inputs
-     `(("boost" ,boost)
-       ("freeglut" ,freeglut)
-       ("glew" ,glew)))
-    (arguments
-     `(#:configure-flags
-       (list
-        "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
-        (string-append "-DBOOST_ROOT="
-                       (assoc-ref %build-inputs "boost")))))
-    (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
-    (synopsis
-     "High-level 3D visualization library with Open Inventor 2.1 API")
-    (description
-     "Coin is a 3D graphics library with an Application Programming Interface
+  ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release.  See:
+  ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
+  (let ((revision 1)
+        (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
+    (package
+      (name "coin3D")
+      (version
+       (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference
+               (url "https://bitbucket.org/Coin3D/coin")
+               (changeset changeset)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (for-each delete-file
+                       '("cfg/csubst.exe"
+                         "cfg/wrapmsvc.exe"))
+             #t))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)))
+      (inputs
+       `(("boost" ,boost)
+         ("freeglut" ,freeglut)
+         ("glew" ,glew)))
+      (arguments
+       `(#:configure-flags
+         (list
+          "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
+          (string-append "-DBOOST_ROOT="
+                         (assoc-ref %build-inputs "boost")))))
+      (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
+      (synopsis
+       "High-level 3D visualization library with Open Inventor 2.1 API")
+      (description
+       "Coin is a 3D graphics library with an Application Programming Interface
 based on the Open Inventor 2.1 API.  For those who are not familiar with
 Open Inventor, it is a scene-graph based retain-mode rendering and model
 interaction library, written in C++, which has become the de facto
 standard graphics library for 3D visualization and visual simulation
 software in the scientific and engineering community.")
 based on the Open Inventor 2.1 API.  For those who are not familiar with
 Open Inventor, it is a scene-graph based retain-mode rendering and model
 interaction library, written in C++, which has become the de facto
 standard graphics library for 3D visualization and visual simulation
 software in the scientific and engineering community.")
-    (license license:bsd-3)))
+      (license license:bsd-3))))