1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages graphics)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages algebra)
40 #:use-module (gnu packages audio)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages boost)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages documentation)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages fonts)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages ghostscript)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages graphviz)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages haskell-xyz)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages imagemagick)
60 #:use-module (gnu packages jemalloc)
61 #:use-module (gnu packages multiprecision)
62 #:use-module (gnu packages pdf)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages photo)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages pth)
67 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages python-xyz)
70 #:use-module (gnu packages qt)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages sdl)
73 #:use-module (gnu packages swig)
74 #:use-module (gnu packages tbb)
75 #:use-module (gnu packages video)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
78 #:use-module (guix build-system cmake)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system python)
81 #:use-module (guix download)
82 #:use-module (guix git-download)
83 #:use-module (guix hg-download)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (guix packages)
86 #:use-module (guix utils))
88 (define-public blender
94 (uri (string-append "https://download.blender.org/source/"
95 "blender-" version ".tar.xz"))
98 "1zl0ar95qkxsrbqw9miz2hrjijlqjl06vg3clfk9rm7krr2l3b2j"))))
99 (build-system cmake-build-system)
101 (let ((python-version (version-major+minor (package-version python))))
102 `(;; Test files are very large and not included in the release tarball.
105 (list "-DWITH_CODEC_FFMPEG=ON"
106 "-DWITH_CODEC_SNDFILE=ON"
108 "-DWITH_DOC_MANPAGE=ON"
110 "-DWITH_IMAGE_OPENJPEG=ON"
111 "-DWITH_INPUT_NDOF=ON"
112 "-DWITH_INSTALL_PORTABLE=OFF"
114 "-DWITH_MOD_OCEANSIM=ON"
115 "-DWITH_OPENSUBDIV=ON"
116 "-DWITH_PYTHON_INSTALL=OFF"
117 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
118 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
120 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
121 "/include/python" ,python-version "m")
122 (string-append "-DPYTHON_VERSION=" ,python-version)
123 (string-append "-DPYTHON_NUMPY_PATH="
124 (assoc-ref %build-inputs "python-numpy")
125 "/lib/python" ,python-version "/site-packages/"))
127 (modify-phases %standard-phases
128 ;; XXX This file doesn't exist in the Git sources but will probably
129 ;; exist in the eventual 2.80 source tarball.
130 ; (add-after 'unpack 'fix-broken-import
132 ; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
133 ; (("import encode_bin") "from . import encode_bin"))
135 (add-after 'set-paths 'add-ilmbase-include-path
136 (lambda* (#:key inputs #:allow-other-keys)
137 ;; OpenEXR propagates ilmbase, but its include files do not appear
138 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
139 ;; the CPATH to satisfy the dependency on "half.h".
141 (string-append (assoc-ref inputs "ilmbase")
143 ":" (or (getenv "CPATH") "")))
147 ("jemalloc" ,jemalloc)
150 ("libxrender" ,libxrender)
151 ("openimageio" ,openimageio)
153 ("opensubdiv" ,opensubdiv)
155 ("openjpeg" ,openjpeg)
162 ("libsndfile" ,libsndfile)
163 ("freetype" ,freetype)
167 ("python-numpy" ,python-numpy)
170 (home-page "https://blender.org/")
171 (synopsis "3D graphics creation suite")
173 "Blender is a 3D graphics creation suite. It supports the entirety of
174 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
175 compositing and motion tracking, even video editing and game creation. The
176 application can be customized via its API for Python scripting.")
177 (license license:gpl2+)))
179 (define-public blender-2.79
185 (uri (string-append "https://download.blender.org/source/"
186 "blender-" version ".tar.gz"))
189 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
190 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
191 "blender-2.79-python-3.7-fix.patch"))))
192 (build-system cmake-build-system)
194 (let ((python-version (version-major+minor (package-version python))))
195 `(;; Test files are very large and not included in the release tarball.
198 (list "-DWITH_CODEC_FFMPEG=ON"
199 "-DWITH_CODEC_SNDFILE=ON"
201 "-DWITH_DOC_MANPAGE=ON"
203 "-DWITH_GAMEENGINE=ON"
204 "-DWITH_IMAGE_OPENJPEG=ON"
205 "-DWITH_INPUT_NDOF=ON"
206 "-DWITH_INSTALL_PORTABLE=OFF"
208 "-DWITH_MOD_OCEANSIM=ON"
210 "-DWITH_PYTHON_INSTALL=OFF"
211 "-DWITH_PYTHON_INSTALL=OFF"
212 "-DWITH_SYSTEM_OPENJPEG=ON"
213 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
214 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
216 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
217 "/include/python" ,python-version "m")
218 (string-append "-DPYTHON_VERSION=" ,python-version))
220 (modify-phases %standard-phases
221 (add-after 'unpack 'fix-broken-import
223 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
224 (("import encode_bin") "from . import encode_bin"))
226 (add-after 'set-paths 'add-ilmbase-include-path
227 (lambda* (#:key inputs #:allow-other-keys)
228 ;; OpenEXR propagates ilmbase, but its include files do not appear
229 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
230 ;; the CPATH to satisfy the dependency on "half.h".
232 (string-append (assoc-ref inputs "ilmbase")
234 ":" (or (getenv "CPATH") "")))
238 ("jemalloc" ,jemalloc)
240 ("openimageio" ,openimageio-1.7)
243 ("openjpeg" ,openjpeg-1)
250 ("libsndfile" ,libsndfile)
251 ("freetype" ,freetype)
256 (home-page "https://blender.org/")
257 (synopsis "3D graphics creation suite")
259 "Blender is a 3D graphics creation suite. It supports the entirety of
260 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
261 compositing and motion tracking, even video editing and game creation. The
262 application can be customized via its API for Python scripting.
264 NOTE: This older version of Blender is the last release that does not require
265 OpenGL 3. It is retained for use with older computers.")
266 (license license:gpl2+)))
268 (define-public assimp
275 (url "https://github.com/assimp/assimp.git")
276 (commit (string-append "v" version))))
277 (file-name (git-file-name name version))
280 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
281 (build-system cmake-build-system)
284 (home-page "http://www.assimp.org/")
285 (synopsis "Asset import library")
287 "The Open Asset Import Library loads more than 40 3D file formats into
288 one unified data structure. Additionally, assimp features various mesh post
289 processing tools: normals and tangent space generation, triangulation, vertex
290 cache locality optimization, removal of degenerate primitives and duplicate
291 vertices, sorting by primitive type, merging of redundant materials and many
293 (license license:bsd-3)))
302 "https://github.com/CGAL/cgal/releases/download/releases/"
303 "CGAL-" version "/CGAL-" version ".tar.xz"))
306 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
307 (build-system cmake-build-system)
309 '(#:tests? #f)) ; no test target
314 (home-page "https://www.cgal.org/")
315 (synopsis "Computational geometry algorithms library")
317 "CGAL provides easy access to efficient and reliable geometric algorithms
318 in the form of a C++ library. CGAL is used in various areas needing geometric
319 computation, such as: computer graphics, scientific visualization, computer
320 aided design and modeling, geographic information systems, molecular biology,
321 medical imaging, robotics and motion planning, mesh generation, numerical
322 methods, etc. It provides data structures and algorithms such as
323 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
326 ;; The 'LICENSE' file explains that a subset is available under more
327 ;; permissive licenses.
328 (license license:gpl3+)))
330 (define-public ilmbase
337 (url "https://github.com/openexr/openexr")
338 (commit (string-append "v" version))))
339 (file-name (git-file-name "ilmbase" version))
342 "0g3rz11cvb7gnphp2np9z7bfl7v4dprq4w5hnsvx7yrasgsdyn8s"))
343 (patches (search-patches "ilmbase-fix-tests.patch"
344 "ilmbase-openexr-pkg-config.patch"))))
345 (build-system cmake-build-system)
347 `(#:phases (modify-phases %standard-phases
348 (add-after 'unpack 'change-directory
352 (home-page "https://www.openexr.com/")
353 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
355 "IlmBase provides several utility libraries for C++. Half is a class
356 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
357 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
358 quaternions and other useful 2D and 3D math functions. Iex is an
359 exception-handling library.")
360 (license license:bsd-3)))
370 (url "https://github.com/OGRECave/ogre.git")
371 (commit (string-append "v" version))))
372 (file-name (git-file-name name version))
375 "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr"))))
376 (build-system cmake-build-system)
379 (modify-phases %standard-phases
380 (add-before 'configure 'pre-configure
381 (lambda* (#:key inputs #:allow-other-keys)
382 (substitute* "Tests/CMakeLists.txt"
384 (string-append "URL " (assoc-ref inputs "googletest-source"))))
387 (list "-DOGRE_BUILD_TESTS=TRUE"
388 (string-append "-DCMAKE_INSTALL_RPATH="
389 (assoc-ref %outputs "out") "/lib:"
390 (assoc-ref %outputs "out") "/lib/OGRE:"
391 (assoc-ref %build-inputs "googletest") "/lib")
392 "-DOGRE_INSTALL_DOCS=TRUE"
393 "-DOGRE_INSTALL_SAMPLES=TRUE"
394 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
398 ("googletest-source" ,(package-source googletest))
399 ("pkg-config" ,pkg-config)))
401 `(("font-dejavu" ,font-dejavu)
402 ("freeimage" ,freeimage)
403 ("freetype" ,freetype)
405 ("googletest" ,googletest)
408 ("libxrandr" ,libxrandr)
410 ("zziplib" ,zziplib)))
411 (synopsis "Scene-oriented, flexible 3D engine written in C++")
413 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
414 flexible 3D engine written in C++ designed to make it easier and more intuitive
415 for developers to produce applications utilising hardware-accelerated 3D
417 (home-page "http://www.ogre3d.org/")
418 (license license:expat)))
420 (define-public openexr
423 (version (package-version ilmbase))
425 (inherit (package-source ilmbase))
426 (file-name (git-file-name "openexr" version))
427 (modules '((guix build utils)))
430 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
434 (build-system cmake-build-system)
437 (modify-phases %standard-phases
438 (add-after 'unpack 'change-directory
442 (add-before 'check 'increase-test-timeout
444 ;; On armhf-linux, we need to override the CTest default
445 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
446 (setenv "CTEST_TEST_TIMEOUT" "2000")
448 ,@(if (not (target-64bit?))
449 `((add-after 'change-directory 'disable-broken-test
450 ;; This test fails on i686. Upstream developers suggest that
451 ;; this test is broken on i686 and can be safely disabled:
452 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
454 (substitute* "IlmImfTest/main.cpp"
455 ((".*testOptimizedInterleavePatterns.*") "")
456 ;; This test is broken in 2.4.0 and will be fixed in a later
457 ;; release: <https://github.com/openexr/openexr/issues/571>.
458 ((".*testLargeDataWindowOffsets.*") ""))
462 `(("pkg-config" ,pkg-config)))
464 `(("ilmbase" ,ilmbase) ;used in public headers
465 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
466 (home-page "https://www.openexr.com/")
467 (synopsis "High-dynamic range file format library")
469 "OpenEXR is a high dynamic-range (HDR) image file format developed for
470 use in computer imaging applications. The IlmImf C++ libraries support
471 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
472 (license license:bsd-3)))
474 (define-public openimageio
481 (url "https://github.com/OpenImageIO/oiio.git")
482 (commit (string-append "Release-" version))))
483 (file-name (git-file-name name version))
486 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
487 (build-system cmake-build-system)
488 ;; FIXME: To run all tests successfully, test image sets from multiple
489 ;; third party sources have to be present. For details see
490 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
494 `(("pkg-config" ,pkg-config)))
505 (synopsis "C++ library for reading and writing images")
507 "OpenImageIO is a library for reading and writing images, and a bunch of
508 related classes, utilities, and applications. There is a particular emphasis
509 on formats and functionality used in professional, large-scale animation and
510 visual effects work for film.")
511 (home-page "http://www.openimageio.org")
512 (license license:bsd-3)))
514 ;; This older version of OpenImageIO is required for Blender 2.79.
515 (define-public openimageio-1.7
517 (inherit openimageio)
523 (url "https://github.com/OpenImageIO/oiio.git")
524 (commit (string-append "Release-" version))))
525 (file-name (git-file-name name version))
528 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))))
530 (define-public openscenegraph
532 (name "openscenegraph")
538 (url "https://github.com/openscenegraph/OpenSceneGraph")
539 (commit (string-append "OpenSceneGraph-" version))))
542 "0x8hdbzw0b71j91fzp9cwmy9a7ava8v8wwyj8nxijq942vdx1785"))
543 (file-name (git-file-name name version))))
545 `((upstream-name . "OpenSceneGraph")))
546 (build-system cmake-build-system)
548 `(#:tests? #f ; no test target available
549 ;; Without this flag, 'rd' will be added to the name of the
550 ;; library binaries and break linking with other programs.
551 #:build-type "Release"
553 (list (string-append "-DCMAKE_INSTALL_RPATH="
554 (assoc-ref %outputs "out") "/lib:"
555 (assoc-ref %outputs "out") "/lib64"))))
557 `(("pkg-config" ,pkg-config)
561 ("libjpeg" ,libjpeg) ; Required for the JPEG texture plugin.
564 ("libxrandr" ,libxrandr)
567 (synopsis "High performance real-time graphics toolkit")
569 "The OpenSceneGraph is a high performance 3D graphics toolkit
570 used by application developers in fields such as visual simulation, games,
571 virtual reality, scientific visualization and modeling.")
572 (home-page "http://www.openscenegraph.org")
573 ;; The 'LICENSE' file explains that the source is licensed under
574 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
575 (license license:lgpl2.1)))
577 ;; We need this for simgear
578 (define-public openscenegraph-3.4
579 (package (inherit openscenegraph)
580 (name "openscenegraph")
586 (url "https://github.com/openscenegraph/OpenSceneGraph")
587 (commit (string-append "OpenSceneGraph-" version))))
588 (file-name (git-file-name name version))
591 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
593 (substitute-keyword-arguments (package-arguments openscenegraph)
594 ((#:configure-flags flags)
596 ;; The jpeg plugin requires conversion between integers and booleans
597 "-DCMAKE_CXX_FLAGS=-fpermissive"
600 `(("libjpeg" ,libjpeg)
601 ,@(package-inputs openscenegraph)))))
604 (define-public openmw-openscenegraph
605 ;; OpenMW prefers its own fork of openscenegraph:
606 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
607 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
610 (inherit openscenegraph)
611 (version (git-version "3.6" "1" commit))
616 (url "https://github.com/OpenMW/osg/")
618 (file-name (git-file-name (package-name openscenegraph) version))
621 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
623 (substitute-keyword-arguments (package-arguments openscenegraph)
624 ((#:configure-flags flags)
625 ;; As per the above wiki link, the following plugins are enough:
627 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
628 "-DBUILD_OSG_PLUGIN_OSG=1"
629 "-DBUILD_OSG_PLUGIN_DDS=1"
630 "-DBUILD_OSG_PLUGIN_TGA=1"
631 "-DBUILD_OSG_PLUGIN_BMP=1"
632 "-DBUILD_OSG_PLUGIN_JPEG=1"
633 "-DBUILD_OSG_PLUGIN_PNG=1"
634 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
635 ;; The jpeg plugin requires conversion between integers and booleans
636 "-DCMAKE_CXX_FLAGS=-fpermissive")
639 (define-public povray
646 (url "https://github.com/POV-Ray/povray")
647 (commit (string-append "v" version))))
648 (file-name (git-file-name name version))
651 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
652 (modules '((guix build utils)))
655 ;; Delete bundled libraries.
656 (delete-file-recursively "libraries")
658 (build-system gnu-build-system)
660 `(("autoconf" ,autoconf)
661 ("automake" ,automake)
662 ("pkg-config" ,pkg-config)))
673 (list "COMPILED_BY=Guix"
674 (string-append "--with-boost-libdir="
675 (assoc-ref %build-inputs "boost") "/lib")
676 "--disable-optimiz-arch")
678 (modify-phases %standard-phases
679 (add-after 'unpack 'run-prebuild
681 (setenv "HOME" (getcwd))
682 (with-directory-excursion "unix"
683 (substitute* "prebuild.sh"
684 (("/bin/sh") (which "sh")))
685 (invoke "sh" "prebuild.sh"))
687 ;; The bootstrap script is run by the prebuild script in the
688 ;; "run-prebuild" phase.
689 (delete 'bootstrap))))
690 (synopsis "Tool for creating three-dimensional graphics")
692 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
693 for producing high-quality computer graphics. @code{POV-Ray} creates
694 three-dimensional, photo-realistic images using a rendering technique called
695 ray-tracing. It reads in a text file containing information describing the
696 objects and lighting in a scene and generates an image of that scene from the
697 view point of a camera also described in the text file. Ray-tracing is not a
698 fast process by any means, but it produces very high quality images with
699 realistic reflections, shading, perspective and other effects.")
700 (home-page "http://www.povray.org/")
701 (license license:agpl3+)))
703 (define-public rapicorn
709 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
710 "rapicorn-" version ".tar.xz"))
713 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
714 (patches (search-patches "rapicorn-isnan.patch"))))
715 (build-system gnu-build-system)
718 (modify-phases %standard-phases
719 (add-after 'unpack 'fix-tests
721 ;; Our grep does not support perl regular expressions.
722 (substitute* "taptool.sh"
723 (("grep -P") "grep -E"))
724 ;; Disable path tests because we cannot access /bin or /sbin.
725 (substitute* "rcore/tests/multitest.cc"
726 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
728 (add-before 'check 'pre-check
730 ;; The test suite requires a running X server (with DISPLAY
731 ;; number 99 or higher).
732 (system "Xvfb :99 &")
733 (setenv "DISPLAY" ":99")
735 (add-after 'unpack 'replace-fhs-paths
737 (substitute* (cons "Makefile.decl"
738 (find-files "." "^Makefile\\.in$"))
739 (("/bin/ls") (which "ls"))
740 (("/usr/bin/env") (which "env")))
742 ;; These libraries are listed in the "Required" section of the pkg-config
745 `(("librsvg" ,librsvg)
749 ("python2-enum34" ,python2-enum34)))
751 `(("gdk-pixbuf" ,gdk-pixbuf)
752 ("libpng" ,libpng-1.2)
753 ("readline" ,readline)
754 ("libcroco" ,libcroco)
756 ("cython" ,python2-cython)))
758 `(("pandoc" ,ghc-pandoc)
762 ("graphviz" ,graphviz)
763 ("intltool" ,intltool)
764 ("pkg-config" ,pkg-config)
765 ("xvfb" ,xorg-server-for-tests)))
766 (home-page "https://rapicorn.testbit.org/")
767 (synopsis "Toolkit for rapid development of user interfaces")
769 "Rapicorn is a toolkit for rapid development of user interfaces in C++
770 and Python. The user interface is designed in a declarative markup language
771 and is connected to the programming logic using data bindings and commands.")
772 (license license:mpl2.0)))
780 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
784 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
785 (build-system cmake-build-system)
786 (arguments '(#:tests? #f)) ;no 'test' target
788 ;; Headers include OpenEXR and IlmBase headers.
789 (propagated-inputs `(("openexr" ,openexr)))
791 (home-page "http://ampasctl.sourceforge.net")
792 (synopsis "Color Transformation Language")
794 "The Color Transformation Language, or CTL, is a small programming
795 language that was designed to serve as a building block for digital color
796 management systems. CTL allows users to describe color transforms in a
797 concise and unambiguous way by expressing them as programs. In order to apply
798 a given transform to an image, the color management system instructs a CTL
799 interpreter to load and run the CTL program that describes the transform. The
800 original and the transformed image constitute the CTL program's input and
803 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
804 ;; and headers use different wording.
805 (license (license:non-copyleft "file://LICENSE"))))
807 (define-public brdf-explorer
808 ;; There are no release tarballs, and not even tags in the repo,
809 ;; so use the latest revision.
810 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
813 (name "brdf-explorer")
814 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
818 (url "https://github.com/wdas/brdf.git")
822 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
823 (file-name (string-append name "-" version "-checkout"))))
824 (build-system gnu-build-system)
826 `(#:phases (modify-phases %standard-phases
828 (lambda* (#:key outputs #:allow-other-keys)
829 (let ((out (assoc-ref outputs "out")))
831 (string-append "prefix=" out)))))
832 (add-after 'install 'wrap-program
833 (lambda* (#:key outputs #:allow-other-keys)
834 (let* ((out (assoc-ref outputs "out"))
835 (bin (string-append out "/bin"))
838 (with-directory-excursion bin
839 (rename-file "brdf" ".brdf-real")
840 (call-with-output-file "brdf"
842 (format port "#!/bin/sh
843 # Run the thing from its home, otherwise it just bails out.
845 exec -a \"$0\" ~a/.brdf-real~%"
847 (chmod "brdf" #o555)))
850 `(("qttools" ,qttools))) ;for 'qmake'
855 ("freeglut" ,freeglut)
857 (home-page "http://www.disneyanimation.com/technology/brdf.html")
859 "Analyze bidirectional reflectance distribution functions (BRDFs)")
861 "BRDF Explorer is an application that allows the development and analysis
862 of bidirectional reflectance distribution functions (BRDFs). It can load and
863 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
864 language), measured material data from the MERL database, and anisotropic
865 measured material data from MIT CSAIL. Graphs and visualizations update in
866 real time as parameters are changed, making it a useful tool for evaluating
867 and understanding different BRDFs (and other component functions).")
868 (license license:ms-pl))))
876 (uri (list (string-append
877 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
880 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
883 ;; Site was discontinued.
884 (string-append "http://www.antigrain.com/agg-"
887 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
888 (patches (search-patches "agg-am_c_prototype.patch"))))
889 (build-system gnu-build-system)
892 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
894 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
896 "--disable-examples")
898 (modify-phases %standard-phases
901 ;; let's call configure from configure phase and not now
902 (substitute* "autogen.sh" (("./configure") "# ./configure"))
903 (invoke "sh" "autogen.sh"))))))
905 `(("pkg-config" ,pkg-config)
907 ("autoconf" ,autoconf)
908 ("automake" ,automake)))
911 ("freetype" ,freetype)
914 ;; Antigrain.com was discontinued.
915 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
916 (synopsis "High-quality 2D graphics rendering engine for C++")
918 "Anti-Grain Geometry is a high quality rendering engine written in C++.
919 It supports sub-pixel resolutions and anti-aliasing. It is also library for
920 rendering SVG graphics.")
921 (license license:gpl2+)))
923 (define-public python-pastel
925 (name "python-pastel")
930 (uri (pypi-uri "pastel" version))
933 "1qxcrcl8pzh66l8s6hym153mijdhwna0afcsmgca0bj4n80ijfxz"))))
934 (build-system python-build-system)
936 `(#:phases (modify-phases %standard-phases
938 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
940 `(("python-pytest" ,python-pytest)))
941 (home-page "https://github.com/sdispater/pastel")
942 (synopsis "Library to colorize strings in your terminal")
943 (description "Pastel is a simple library to help you colorize strings in
945 (license license:expat)))
947 (define-public python2-pastel
948 (package-with-python2 python-pastel))
950 (define-public fgallery
958 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
959 "fgallery-" version ".zip"))
962 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
963 (build-system gnu-build-system)
965 `(#:tests? #f ; no tests
967 (modify-phases %standard-phases
971 (lambda* (#:key inputs outputs #:allow-other-keys)
972 (let* ((out (assoc-ref outputs "out"))
973 (bin (string-append out "/bin/"))
974 (share (string-append out "/share/fgallery"))
975 (man (string-append out "/share/man/man1"))
976 (perl5lib (getenv "PERL5LIB"))
977 (script (string-append share "/fgallery")))
978 (define (bin-directory input-name)
979 (string-append (assoc-ref inputs input-name) "/bin"))
982 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
985 (copy-recursively "." share)
987 ;; fgallery copies files from store when it is run. The
988 ;; read-only permissions from the store directories will cause
989 ;; fgallery to fail. Do not preserve file attributes when
990 ;; copying files to prevent it.
993 "'cp', '--no-preserve=all'"))
996 (symlink script (string-append out "/bin/fgallery"))
1000 ,(map bin-directory '("imagemagick"
1008 `("PERL5LIB" ":" prefix (,perl5lib)))
1011 `(("unzip" ,unzip)))
1012 ;; TODO: Add missing optional dependency: facedetect.
1014 `(("imagemagick" ,imagemagick)
1017 ("libjpeg" ,libjpeg)
1020 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1021 ("perl-image-exiftool" ,perl-image-exiftool)
1022 ("jpegoptim" ,jpegoptim)
1023 ("pngcrush" ,pngcrush)
1025 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1026 (synopsis "Static photo gallery generator")
1028 "FGallery is a static, JavaScript photo gallery generator with minimalist
1029 look. The result can be uploaded on any web server without additional
1031 (license license:gpl2+)))
1033 (define-public opensubdiv
1040 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1041 (commit (string-append "v" (string-join (string-split version #\.)
1043 (file-name (git-file-name name version))
1046 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1047 (build-system cmake-build-system)
1049 `(#:phases (modify-phases %standard-phases
1050 (add-before 'configure 'set-glew-location
1051 (lambda* (#:key inputs #:allow-other-keys)
1052 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1054 (add-before 'check 'start-xorg-server
1055 (lambda* (#:key inputs #:allow-other-keys)
1056 ;; The test suite requires a running X server.
1057 (system (string-append (assoc-ref inputs "xorg-server")
1059 (setenv "DISPLAY" ":1")
1062 `(("xorg-server" ,xorg-server-for-tests)))
1065 ("libxrandr" ,libxrandr)
1066 ("libxcursor" ,libxcursor)
1067 ("libxinerama" ,libxinerama)
1071 (home-page "http://graphics.pixar.com/opensubdiv/")
1072 (synopsis "High performance subdivision surface evaluation")
1073 (description "OpenSubdiv is a set of libraries that implement high
1074 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1075 and GPU architectures.")
1076 (license license:asl2.0)))
1078 (define-public opencsg
1079 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1087 (url "https://github.com/floriankirsch/OpenCSG.git")
1088 (commit (string-append "opencsg-"
1089 (string-map dot-to-dash version)
1091 (file-name (git-file-name name version))
1094 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1095 (build-system gnu-build-system)
1098 (modify-phases %standard-phases
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 (substitute* "src/Makefile"
1102 (("/usr/local") (assoc-ref outputs "out")))
1104 (add-before 'build 'skip-example
1105 (lambda _ (chdir "src") #t)))))
1108 ("freeglut" ,freeglut)))
1109 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1111 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1112 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1113 For example, two shapes can be combined by uniting them, by intersecting them,
1114 or by subtracting one shape from the other.")
1115 (home-page "http://www.opencsg.org/")
1116 (license license:gpl2))))
1118 (define-public coin3D
1119 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1120 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1122 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1126 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1131 (url "https://bitbucket.org/Coin3D/coin")
1132 (changeset changeset)))
1133 (file-name (git-file-name name version))
1135 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1136 (modules '((guix build utils)))
1139 (for-each delete-file
1141 "cfg/wrapmsvc.exe"))
1143 (build-system cmake-build-system)
1145 `(("doxygen" ,doxygen)
1146 ("graphviz" ,graphviz)))
1149 ("freeglut" ,freeglut)
1154 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1155 (string-append "-DBOOST_ROOT="
1156 (assoc-ref %build-inputs "boost")))))
1157 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1159 "High-level 3D visualization library with Open Inventor 2.1 API")
1161 "Coin is a 3D graphics library with an Application Programming Interface
1162 based on the Open Inventor 2.1 API. For those who are not familiar with
1163 Open Inventor, it is a scene-graph based retain-mode rendering and model
1164 interaction library, written in C++, which has become the de facto
1165 standard graphics library for 3D visualization and visual simulation
1166 software in the scientific and engineering community.")
1167 (license license:bsd-3))))