X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/49b6dc2b4e02269850dacc71d9e7ec93139ec5b5..ff3375251d6a316e3ee05589d70a8bb135ec47a6:/gnu/packages/graphics.scm diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 65f023a488..8795107dcb 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -1,15 +1,23 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Tomáš Čech -;;; Copyright © 2016 Leo Famulari -;;; Copyright © 2016, 2017 Ricardo Wurmus -;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016, 2019 Leo Famulari +;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus +;;; Copyright © 2016, 2018 Efraim Flashner ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis ;;; Copyright © 2017, 2018 Ben Woodcroft -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2018 Alex Kost +;;; Copyright © 2018 Kei Kebreau +;;; Copyright © 2019 Mark H Weaver +;;; Copyright © 2019 Carlo Zancanaro +;;; Copyright © 2019 Steve Sprang +;;; Copyright © 2019 John Soo +;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2019 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,7 +54,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) - #:use-module (gnu packages haskell) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages jemalloc) @@ -58,6 +66,7 @@ #:use-module (gnu packages pth) #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) @@ -70,11 +79,100 @@ #: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)) (define-public blender + (package + (name "blender") + (version "2.80") + (source (origin + (method url-fetch) + (uri (string-append "https://download.blender.org/source/" + "blender-" version ".tar.gz")) + (sha256 + (base32 + "1h550jisdbis50hxwk5kxrvrk1a6sh2fsri3yyj66vhzbi87x7fd")))) + (build-system cmake-build-system) + (arguments + (let ((python-version (version-major+minor (package-version python)))) + `(;; Test files are very large and not included in the release tarball. + #:tests? #f + #:configure-flags + (list "-DWITH_CODEC_FFMPEG=ON" + "-DWITH_CODEC_SNDFILE=ON" + "-DWITH_CYCLES=ON" + "-DWITH_DOC_MANPAGE=ON" + "-DWITH_FFTW3=ON" + "-DWITH_IMAGE_OPENJPEG=ON" + "-DWITH_INPUT_NDOF=ON" + "-DWITH_INSTALL_PORTABLE=OFF" + "-DWITH_JACK=ON" + "-DWITH_MOD_OCEANSIM=ON" + "-DWITH_OPENSUBDIV=ON" + "-DWITH_PYTHON_INSTALL=OFF" + (string-append "-DPYTHON_LIBRARY=python" ,python-version "m") + (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python") + "/lib") + (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python") + "/include/python" ,python-version "m") + (string-append "-DPYTHON_VERSION=" ,python-version) + (string-append "-DPYTHON_NUMPY_PATH=" + (assoc-ref %build-inputs "python-numpy") + "/lib/python" ,python-version "/site-packages/")) + #:phases + (modify-phases %standard-phases + ;; XXX This file doesn't exist in the Git sources but will probably + ;; exist in the eventual 2.80 source tarball. +; (add-after 'unpack 'fix-broken-import +; (lambda _ +; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py" +; (("import encode_bin") "from . import encode_bin")) +; #t)) + (add-after 'set-paths 'add-ilmbase-include-path + (lambda* (#:key inputs #:allow-other-keys) + ;; OpenEXR propagates ilmbase, but its include files do not appear + ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to + ;; the CPATH to satisfy the dependency on "half.h". + (setenv "CPATH" + (string-append (assoc-ref inputs "ilmbase") + "/include/OpenEXR" + ":" (or (getenv "CPATH") ""))) + #t)))))) + (inputs + `(("boost" ,boost) + ("jemalloc" ,jemalloc) + ("libx11" ,libx11) + ("openimageio" ,openimageio) + ("openexr" ,openexr) + ("opensubdiv" ,opensubdiv) + ("ilmbase" ,ilmbase) + ("openjpeg" ,openjpeg) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("ffmpeg" ,ffmpeg) + ("fftw" ,fftw) + ("jack" ,jack-1) + ("libsndfile" ,libsndfile) + ("freetype" ,freetype) + ("glew" ,glew) + ("openal" ,openal) + ("python" ,python) + ("python-numpy" ,python-numpy) + ("zlib" ,zlib))) + (home-page "https://blender.org/") + (synopsis "3D graphics creation suite") + (description + "Blender is a 3D graphics creation suite. It supports the entirety of +the 3D pipeline—modeling, rigging, animation, simulation, rendering, +compositing and motion tracking, even video editing and game creation. The +application can be customized via its API for Python scripting.") + (license license:gpl2+))) + +(define-public blender-2.79 (package (name "blender") (version "2.79b") @@ -84,7 +182,9 @@ "blender-" version ".tar.gz")) (sha256 (base32 - "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")))) + "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")) + (patches (search-patches "blender-2.79-newer-ffmpeg.patch" + "blender-2.79-python-3.7-fix.patch")))) (build-system cmake-build-system) (arguments (let ((python-version (version-major+minor (package-version python)))) @@ -133,14 +233,14 @@ `(("boost" ,boost) ("jemalloc" ,jemalloc) ("libx11" ,libx11) - ("openimageio" ,openimageio) + ("openimageio" ,openimageio-1.7) ("openexr" ,openexr) ("ilmbase" ,ilmbase) ("openjpeg" ,openjpeg-1) ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff) - ("ffmpeg-2.8" ,ffmpeg-2.8) ; + ("ffmpeg" ,ffmpeg) ("fftw" ,fftw) ("jack" ,jack-1) ("libsndfile" ,libsndfile) @@ -155,25 +255,29 @@ "Blender is a 3D graphics creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation. The -application can be customized via its API for Python scripting.") +application can be customized via its API for Python scripting. + +NOTE: This older version of Blender is the last release that does not require +OpenGL 3. It is retained for use with older computers.") (license license:gpl2+))) (define-public assimp (package (name "assimp") - (version "3.3.1") + (version "4.1.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/assimp/assimp/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/assimp/assimp.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1gy7zlgkf4nmyv8n674p3f30asis0gjz8icyy11i693n13ww71fk")))) + "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28")))) (build-system cmake-build-system) (inputs `(("zlib" ,zlib))) - (home-page "http://assimp.org/") + (home-page "http://www.assimp.org/") (synopsis "Asset import library") (description "The Open Asset Import Library loads more than 40 3D file formats into @@ -187,7 +291,7 @@ more.") (define-public cgal (package (name "cgal") - (version "4.8.1") + (version "4.14.2") (source (origin (method url-fetch) (uri (string-append @@ -195,19 +299,15 @@ more.") "CGAL-" version "/CGAL-" version ".tar.xz")) (sha256 (base32 - "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s")))) + "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1")))) (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))) - (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 @@ -226,17 +326,26 @@ many more.") (define-public ilmbase (package (name "ilmbase") - (version "2.2.1") + (version "2.4.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://savannah/openexr/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 - "17k0hq19wplx9s029kjrq6c51x2ryrfmaavcappkd0g67gk0dhna")) - (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 @@ -252,33 +361,23 @@ exception-handling library.") (version "1.10.11") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/OGRECave/" name - "/archive/v" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/OGRECave/ogre.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "13bdh9v4026qf8w8rbfln2rmwf0rby1a8fz55zpdvpy105i6cbpz")) - (file-name (string-append name "-" version ".tar.gz")))) + "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr")))) (build-system cmake-build-system) (arguments '(#:phases (modify-phases %standard-phases (add-before 'configure 'pre-configure - (lambda _ - ;; It expects googletest source to be downloaded and - ;; be in a specific place. - (substitute* "Tests/CMakeLists.txt" - (("URL(.*)$" _ suffix) - (string-append "URL " suffix - "\t\tURL_HASH " - "MD5=16877098823401d1bf2ed7891d7dce36\n"))) - #t)) - (add-before 'build 'pre-build (lambda* (#:key inputs #:allow-other-keys) - (copy-file (assoc-ref inputs "googletest-source") - (string-append (getcwd) - "/Tests/googletest-prefix/src/" - "release-1.8.0.tar.gz")) + (substitute* "Tests/CMakeLists.txt" + (("URL(.*)$") + (string-append "URL " (assoc-ref inputs "googletest-source")))) #t))) #:configure-flags (list "-DOGRE_BUILD_TESTS=TRUE" @@ -317,50 +416,50 @@ graphics.") (define-public openexr (package (name "openexr") - (version "2.2.1") + (version (package-version ilmbase)) (source (origin - (method url-fetch) - (uri (string-append "mirror://savannah/openexr/openexr-" - version ".tar.gz")) - (sha256 - (base32 - "1kdf2gqznsdinbd5vcmqnif442nyhdf9l7ckc51410qm2gv5m6lg")) + (inherit (package-source ilmbase)) + (file-name (git-file-name "openexr" version)) (modules '((guix build utils))) (snippet '(begin - (substitute* (find-files "." "tmpDir\\.h") + (substitute* (find-files "OpenEXR" "tmpDir\\.h") (("\"/var/tmp/\"") "\"/tmp/\"")) - - ;; Install 'ImfStdIO.h'. Reported at - ;; - ;; and . - (substitute* "IlmImf/Makefile.in" - (("ImfIO\\.h") - "ImfIO.h ImfStdIO.h")) - #t)) - (patches (search-patches "openexr-missing-samples.patch")))) - (build-system gnu-build-system) + #t)))) + (build-system cmake-build-system) (arguments - '(#:phases + `(#: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 _ - (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: . + ((".*testLargeDataWindowOffsets.*") "")) + #t))) + '())))) (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 @@ -371,26 +470,28 @@ storage of the \"EXR\" file format for storing 16-bit floating-point images.") (define-public openimageio (package (name "openimageio") - (version "1.7.19") + (version "1.8.17") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/OpenImageIO/oiio/" - "archive/Release-" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenImageIO/oiio.git") + (commit (string-append "Release-" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1qlmfhvl2wva4aifyiq7c4sdy61ddl7wykwvlpfys9p701xghvj7")))) + "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2")))) (build-system cmake-build-system) ;; 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 `(("boost" ,boost) ("libpng" ,libpng) - ("libjpeg" ,libjpeg-8) + ("libjpeg" ,libjpeg) ("libtiff" ,libtiff) ("giflib" ,giflib) ("openexr" ,openexr) @@ -406,10 +507,26 @@ visual effects work for film.") (home-page "http://www.openimageio.org") (license license:bsd-3))) +;; This older version of OpenImageIO is required for Blender 2.79. +(define-public openimageio-1.7 + (package + (inherit openimageio) + (name "openimageio") + (version "1.7.19") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenImageIO/oiio.git") + (commit (string-append "Release-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc")))))) + (define-public openscenegraph (package (name "openscenegraph") - (version "3.6.2") + (version "3.6.4") (source (origin (method git-fetch) @@ -418,8 +535,8 @@ visual effects work for film.") (commit (string-append "OpenSceneGraph-" version)))) (sha256 (base32 - "03jk6lclyd4biniaw04w7j0z1spkm69f1c19i37b8v9x3zv1p1id")) - (file-name (string-append name "-" version "-checkout")))) + "0x8hdbzw0b71j91fzp9cwmy9a7ava8v8wwyj8nxijq942vdx1785")) + (file-name (git-file-name name version)))) (properties `((upstream-name . "OpenSceneGraph"))) (build-system cmake-build-system) @@ -437,11 +554,10 @@ visual effects work for film.") ("unzip" ,unzip))) (inputs `(("giflib" ,giflib) + ("libjpeg" ,libjpeg) ; Required for the JPEG texture plugin. ("jasper" ,jasper) ("librsvg" ,librsvg) ("libxrandr" ,libxrandr) - ("pth" ,pth) - ("qtbase" ,qtbase) ("ffmpeg" ,ffmpeg) ("mesa" ,mesa))) (synopsis "High performance real-time graphics toolkit") @@ -454,6 +570,132 @@ virtual reality, scientific visualization and modeling.") ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL. (license license:lgpl2.1))) +;; We need this for simgear +(define-public openscenegraph-3.4 + (package (inherit openscenegraph) + (name "openscenegraph") + (version "3.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/openscenegraph/OpenSceneGraph") + (commit (string-append "OpenSceneGraph-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9")))) + (arguments + (substitute-keyword-arguments (package-arguments openscenegraph) + ((#:configure-flags flags) + `(cons + ;; The jpeg plugin requires conversion between integers and booleans + "-DCMAKE_CXX_FLAGS=-fpermissive" + ,flags)))) + (inputs + `(("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") + (version "3.7.0.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/POV-Ray/povray") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled libraries. + (delete-file-recursively "libraries") + #t)))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config))) + (inputs + `(("boost" ,boost) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("openexr" ,openexr) + ("sdl" ,sdl) + ("zlib" ,zlib))) + (arguments + '(#:configure-flags + (list "COMPILED_BY=Guix" + (string-append "--with-boost-libdir=" + (assoc-ref %build-inputs "boost") "/lib") + "--disable-optimiz-arch") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'run-prebuild + (lambda _ + (setenv "HOME" (getcwd)) + (with-directory-excursion "unix" + (substitute* "prebuild.sh" + (("/bin/sh") (which "sh"))) + (invoke "sh" "prebuild.sh")) + #t)) + ;; The bootstrap script is run by the prebuild script in the + ;; "run-prebuild" phase. + (delete 'bootstrap)))) + (synopsis "Tool for creating three-dimensional graphics") + (description + "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool +for producing high-quality computer graphics. @code{POV-Ray} creates +three-dimensional, photo-realistic images using a rendering technique called +ray-tracing. It reads in a text file containing information describing the +objects and lighting in a scene and generates an image of that scene from the +view point of a camera also described in the text file. Ray-tracing is not a +fast process by any means, but it produces very high quality images with +realistic reflections, shading, perspective and other effects.") + (home-page "http://www.povray.org/") + (license license:agpl3+))) + (define-public rapicorn (package (name "rapicorn") @@ -516,7 +758,7 @@ virtual reality, scientific visualization and modeling.") ("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 @@ -581,8 +823,8 @@ output.") (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (zero? (system* "qmake" - (string-append "prefix=" out)))))) + (invoke "qmake" + (string-append "prefix=" out))))) (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -598,7 +840,8 @@ output.") cd \"~a\" exec -a \"$0\" ~a/.brdf-real~%" data bin))) - (chmod "brdf" #o555)))))))) + (chmod "brdf" #o555))) + #t))))) (native-inputs `(("qttools" ,qttools))) ;for 'qmake' (inputs @@ -645,20 +888,20 @@ and understanding different BRDFs (and other component functions).") (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11") "/include") (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11") - "/lib")) + "/lib") + "--disable-examples") #:phases (modify-phases %standard-phases - (add-after 'unpack 'autoreconf + (replace 'bootstrap (lambda _ ;; let's call configure from configure phase and not now (substitute* "autogen.sh" (("./configure") "# ./configure")) - (zero? (system* "sh" "autogen.sh"))))))) + (invoke "sh" "autogen.sh")))))) (native-inputs `(("pkg-config" ,pkg-config) ("libtool" ,libtool) ("autoconf" ,autoconf) - ("automake" ,automake) - ("bash" ,bash))) + ("automake" ,automake))) (inputs `(("libx11" ,libx11) ("freetype" ,freetype) @@ -676,28 +919,25 @@ rendering SVG graphics.") (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 - "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i")))) + "1qxcrcl8pzh66l8s6hym153mijdhwna0afcsmgca0bj4n80ijfxz")))) (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 -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 @@ -785,3 +1025,139 @@ your terminal. It comes bundled with predefined styles: look. The result can be uploaded on any web server without additional requirements.") (license license:gpl2+))) + +(define-public opensubdiv + (package + (name "opensubdiv") + (version "3.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/PixarAnimationStudios/OpenSubdiv") + (commit (string-append "v" (string-join (string-split version #\.) + "_"))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'set-glew-location + (lambda* (#:key inputs #:allow-other-keys) + (setenv "GLEW_LOCATION" (assoc-ref inputs "glew")) + #t)) + (add-before 'check 'start-xorg-server + (lambda* (#:key inputs #:allow-other-keys) + ;; The test suite requires a running X server. + (system (string-append (assoc-ref inputs "xorg-server") + "/bin/Xvfb :1 &")) + (setenv "DISPLAY" ":1") + #t))))) + (native-inputs + `(("xorg-server" ,xorg-server-for-tests))) + (inputs + `(("glew" ,glew) + ("libxrandr" ,libxrandr) + ("libxcursor" ,libxcursor) + ("libxinerama" ,libxinerama) + ("libxi" ,libxi) + ("zlib" ,zlib) + ("glfw" ,glfw))) + (home-page "http://graphics.pixar.com/opensubdiv/") + (synopsis "High performance subdivision surface evaluation") + (description "OpenSubdiv is a set of libraries that implement high +performance subdivision surface (subdiv) evaluation on massively parallel CPU +and GPU architectures.") + (license license:asl2.0))) + +(define-public opencsg + (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c)))) + (package + (name "opencsg") + (version "1.4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/floriankirsch/OpenCSG.git") + (commit (string-append "opencsg-" + (string-map dot-to-dash version) + "-release")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/Makefile" + (("/usr/local") (assoc-ref outputs "out"))) + #t)) + (add-before 'build 'skip-example + (lambda _ (chdir "src") #t))))) + (inputs + `(("glew" ,glew) + ("freeglut" ,freeglut))) + (synopsis "Library for rendering Constructive Solid Geometry (CSG)") + (description + "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using +OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones. +For example, two shapes can be combined by uniting them, by intersecting them, +or by subtracting one shape from the other.") + (home-page "http://www.opencsg.org/") + (license license:gpl2)))) + +(define-public coin3D + ;; 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.") + (license license:bsd-3))))