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, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages graphics)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages audio)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages boost)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages fonts)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages ghostscript)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages graphviz)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages haskell-xyz)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages imagemagick)
61 #:use-module (gnu packages jemalloc)
62 #:use-module (gnu packages multiprecision)
63 #:use-module (gnu packages pdf)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages photo)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages pth)
68 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-xyz)
71 #:use-module (gnu packages qt)
72 #:use-module (gnu packages readline)
73 #:use-module (gnu packages sdl)
74 #:use-module (gnu packages swig)
75 #:use-module (gnu packages tbb)
76 #:use-module (gnu packages video)
77 #:use-module (gnu packages xml)
78 #:use-module (gnu packages xorg)
79 #:use-module (guix build-system cmake)
80 #:use-module (guix build-system gnu)
81 #:use-module (guix build-system python)
82 #:use-module (guix download)
83 #:use-module (guix git-download)
84 #:use-module (guix hg-download)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (guix packages)
87 #:use-module (guix utils))
89 (define-public blender
95 (uri (string-append "https://download.blender.org/source/"
96 "blender-" version ".tar.xz"))
99 "18zbdgas6qf2kmvvlimxgnq7y9kj7hdxcgixrs6fj50x40q01q2d"))))
100 (build-system cmake-build-system)
102 (let ((python-version (version-major+minor (package-version python))))
103 `(;; Test files are very large and not included in the release tarball.
106 (list "-DWITH_CODEC_FFMPEG=ON"
107 "-DWITH_CODEC_SNDFILE=ON"
109 "-DWITH_DOC_MANPAGE=ON"
111 "-DWITH_IMAGE_OPENJPEG=ON"
112 "-DWITH_INPUT_NDOF=ON"
113 "-DWITH_INSTALL_PORTABLE=OFF"
115 "-DWITH_MOD_OCEANSIM=ON"
116 "-DWITH_OPENSUBDIV=ON"
117 "-DWITH_PYTHON_INSTALL=OFF"
118 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
119 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
121 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
122 "/include/python" ,python-version)
123 (string-append "-DPYTHON_VERSION=" ,python-version)
124 (string-append "-DPYTHON_NUMPY_PATH="
125 (assoc-ref %build-inputs "python-numpy")
126 "/lib/python" ,python-version "/site-packages/"))
128 (modify-phases %standard-phases
129 ;; XXX This file doesn't exist in the Git sources but will probably
130 ;; exist in the eventual 2.80 source tarball.
131 (add-after 'unpack 'fix-broken-import
133 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
134 (("import encode_bin") "from . import encode_bin"))
136 (add-after 'set-paths 'add-ilmbase-include-path
137 (lambda* (#:key inputs #:allow-other-keys)
138 ;; OpenEXR propagates ilmbase, but its include files do not appear
139 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
140 ;; the CPATH to satisfy the dependency on "half.h".
142 (string-append (assoc-ref inputs "ilmbase")
144 ":" (or (getenv "CPATH") "")))
148 ("jemalloc" ,jemalloc)
151 ("libxrender" ,libxrender)
152 ("openimageio" ,openimageio)
154 ("opensubdiv" ,opensubdiv)
156 ("openjpeg" ,openjpeg)
157 ("libjpeg" ,libjpeg-turbo)
163 ("libsndfile" ,libsndfile)
164 ("freetype" ,freetype)
168 ("python-numpy" ,python-numpy)
171 (home-page "https://blender.org/")
172 (synopsis "3D graphics creation suite")
174 "Blender is a 3D graphics creation suite. It supports the entirety of
175 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
176 compositing and motion tracking, even video editing and game creation. The
177 application can be customized via its API for Python scripting.")
178 (license license:gpl2+)))
180 (define-public assimp
187 (url "https://github.com/assimp/assimp.git")
188 (commit (string-append "v" version))))
189 (file-name (git-file-name name version))
192 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
193 (build-system cmake-build-system)
196 (home-page "http://www.assimp.org/")
197 (synopsis "Asset import library")
199 "The Open Asset Import Library loads more than 40 3D file formats into
200 one unified data structure. Additionally, assimp features various mesh post
201 processing tools: normals and tangent space generation, triangulation, vertex
202 cache locality optimization, removal of degenerate primitives and duplicate
203 vertices, sorting by primitive type, merging of redundant materials and many
205 (license license:bsd-3)))
214 "https://github.com/CGAL/cgal/releases/download/releases/"
215 "CGAL-" version "/CGAL-" version ".tar.xz"))
218 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
219 (build-system cmake-build-system)
221 '(#:tests? #f)) ; no test target
226 (home-page "https://www.cgal.org/")
227 (synopsis "Computational geometry algorithms library")
229 "CGAL provides easy access to efficient and reliable geometric algorithms
230 in the form of a C++ library. CGAL is used in various areas needing geometric
231 computation, such as: computer graphics, scientific visualization, computer
232 aided design and modeling, geographic information systems, molecular biology,
233 medical imaging, robotics and motion planning, mesh generation, numerical
234 methods, etc. It provides data structures and algorithms such as
235 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
238 ;; The 'LICENSE' file explains that a subset is available under more
239 ;; permissive licenses.
240 (license license:gpl3+)))
242 (define-public ilmbase
249 (url "https://github.com/openexr/openexr")
250 (commit (string-append "v" version))))
251 (file-name (git-file-name "ilmbase" version))
254 "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01"))
255 (patches (search-patches "ilmbase-fix-tests.patch"
256 "ilmbase-openexr-pkg-config.patch"))))
257 (build-system cmake-build-system)
259 `(#:phases (modify-phases %standard-phases
260 (add-after 'unpack 'change-directory
264 (home-page "https://www.openexr.com/")
265 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
267 "IlmBase provides several utility libraries for C++. Half is a class
268 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
269 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
270 quaternions and other useful 2D and 3D math functions. Iex is an
271 exception-handling library.")
272 (license license:bsd-3)))
282 (url "https://github.com/OGRECave/ogre.git")
283 (commit (string-append "v" version))))
284 (file-name (git-file-name name version))
287 "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr"))))
288 (build-system cmake-build-system)
291 (modify-phases %standard-phases
292 (add-before 'configure 'pre-configure
293 (lambda* (#:key inputs #:allow-other-keys)
294 (substitute* "Tests/CMakeLists.txt"
296 (string-append "URL " (assoc-ref inputs "googletest-source"))))
299 (list "-DOGRE_BUILD_TESTS=TRUE"
300 (string-append "-DCMAKE_INSTALL_RPATH="
301 (assoc-ref %outputs "out") "/lib:"
302 (assoc-ref %outputs "out") "/lib/OGRE:"
303 (assoc-ref %build-inputs "googletest") "/lib")
304 "-DOGRE_INSTALL_DOCS=TRUE"
305 "-DOGRE_INSTALL_SAMPLES=TRUE"
306 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
310 ("googletest-source" ,(package-source googletest))
311 ("pkg-config" ,pkg-config)))
313 `(("font-dejavu" ,font-dejavu)
314 ("freeimage" ,freeimage)
315 ("freetype" ,freetype)
317 ("googletest" ,googletest)
320 ("libxrandr" ,libxrandr)
322 ("zziplib" ,zziplib)))
323 (synopsis "Scene-oriented, flexible 3D engine written in C++")
325 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
326 flexible 3D engine written in C++ designed to make it easier and more intuitive
327 for developers to produce applications utilising hardware-accelerated 3D
329 (home-page "https://www.ogre3d.org/")
330 (license license:expat)))
332 (define-public openexr
335 (version (package-version ilmbase))
337 (inherit (package-source ilmbase))
338 (file-name (git-file-name "openexr" version))
339 (modules '((guix build utils)))
342 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
346 (build-system cmake-build-system)
349 (modify-phases %standard-phases
350 (add-after 'unpack 'change-directory
354 (add-before 'check 'increase-test-timeout
356 ;; On armhf-linux, we need to override the CTest default
357 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
358 (setenv "CTEST_TEST_TIMEOUT" "2000")
360 ,@(if (not (target-64bit?))
361 `((add-after 'change-directory 'disable-broken-test
362 ;; This test fails on i686. Upstream developers suggest that
363 ;; this test is broken on i686 and can be safely disabled:
364 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
366 (substitute* "IlmImfTest/main.cpp"
367 ((".*testOptimizedInterleavePatterns.*") "")
368 ;; This test is broken in 2.4.0 and will be fixed in a later
369 ;; release: <https://github.com/openexr/openexr/issues/571>.
370 ((".*testLargeDataWindowOffsets.*") ""))
374 `(("pkg-config" ,pkg-config)))
376 `(("ilmbase" ,ilmbase) ;used in public headers
377 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
378 (home-page "https://www.openexr.com/")
379 (synopsis "High-dynamic range file format library")
381 "OpenEXR is a high dynamic-range (HDR) image file format developed for
382 use in computer imaging applications. The IlmImf C++ libraries support
383 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
384 (license license:bsd-3)))
386 (define-public openimageio
393 (url "https://github.com/OpenImageIO/oiio.git")
394 (commit (string-append "Release-" version))))
395 (file-name (git-file-name name version))
398 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
399 (build-system cmake-build-system)
400 ;; FIXME: To run all tests successfully, test image sets from multiple
401 ;; third party sources have to be present. For details see
402 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
406 `(("pkg-config" ,pkg-config)))
410 ("libjpeg" ,libjpeg-turbo)
417 (synopsis "C++ library for reading and writing images")
419 "OpenImageIO is a library for reading and writing images, and a bunch of
420 related classes, utilities, and applications. There is a particular emphasis
421 on formats and functionality used in professional, large-scale animation and
422 visual effects work for film.")
423 (home-page "https://www.openimageio.org")
424 (license license:bsd-3)))
426 ;; This older version of OpenImageIO is required for Blender 2.79.
427 (define-public openimageio-1.7
429 (inherit openimageio)
435 (url "https://github.com/OpenImageIO/oiio.git")
436 (commit (string-append "Release-" version))))
437 (file-name (git-file-name name version))
440 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))))
442 (define-public openscenegraph
444 (name "openscenegraph")
450 (url "https://github.com/openscenegraph/OpenSceneGraph")
451 (commit (string-append "OpenSceneGraph-" version))))
453 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
454 (file-name (git-file-name name version))))
456 `((upstream-name . "OpenSceneGraph")))
457 (build-system cmake-build-system)
459 `(#:tests? #f ; no test target available
460 ;; Without this flag, 'rd' will be added to the name of the
461 ;; library binaries and break linking with other programs.
462 #:build-type "Release"
464 (list (string-append "-DCMAKE_INSTALL_RPATH="
465 (assoc-ref %outputs "out") "/lib:"
466 (assoc-ref %outputs "out") "/lib64"))))
468 `(("pkg-config" ,pkg-config)
472 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
475 ("libxrandr" ,libxrandr)
478 (synopsis "High-performance real-time graphics toolkit")
480 "The OpenSceneGraph is a high-performance 3D graphics toolkit
481 used by application developers in fields such as visual simulation, games,
482 virtual reality, scientific visualization and modeling.")
483 (home-page "http://www.openscenegraph.org")
484 ;; The 'LICENSE' file explains that the source is licensed under
485 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
486 (license license:lgpl2.1)))
488 ;; We need this for simgear
489 (define-public openscenegraph-3.4
490 (package (inherit openscenegraph)
491 (name "openscenegraph")
497 (url "https://github.com/openscenegraph/OpenSceneGraph")
498 (commit (string-append "OpenSceneGraph-" version))))
499 (file-name (git-file-name name version))
502 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
504 (substitute-keyword-arguments (package-arguments openscenegraph)
505 ((#:configure-flags flags)
507 ;; The jpeg plugin requires conversion between integers and booleans
508 "-DCMAKE_CXX_FLAGS=-fpermissive"
511 `(("libjpeg" ,libjpeg-turbo)
512 ,@(package-inputs openscenegraph)))))
515 (define-public openmw-openscenegraph
516 ;; OpenMW prefers its own fork of openscenegraph:
517 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
518 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
521 (inherit openscenegraph)
522 (version (git-version "3.6" "1" commit))
527 (url "https://github.com/OpenMW/osg/")
529 (file-name (git-file-name (package-name openscenegraph) version))
532 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
534 (substitute-keyword-arguments (package-arguments openscenegraph)
535 ((#:configure-flags flags)
536 ;; As per the above wiki link, the following plugins are enough:
538 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
539 "-DBUILD_OSG_PLUGIN_OSG=1"
540 "-DBUILD_OSG_PLUGIN_DDS=1"
541 "-DBUILD_OSG_PLUGIN_TGA=1"
542 "-DBUILD_OSG_PLUGIN_BMP=1"
543 "-DBUILD_OSG_PLUGIN_JPEG=1"
544 "-DBUILD_OSG_PLUGIN_PNG=1"
545 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
546 ;; The jpeg plugin requires conversion between integers and booleans
547 "-DCMAKE_CXX_FLAGS=-fpermissive")
550 (define-public povray
557 (url "https://github.com/POV-Ray/povray")
558 (commit (string-append "v" version))))
559 (file-name (git-file-name name version))
562 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
563 (modules '((guix build utils)))
566 ;; Delete bundled libraries.
567 (delete-file-recursively "libraries")
569 (build-system gnu-build-system)
571 `(("autoconf" ,autoconf)
572 ("automake" ,automake)
573 ("pkg-config" ,pkg-config)))
576 ("libjpeg" ,libjpeg-turbo)
584 (list "COMPILED_BY=Guix"
585 (string-append "--with-boost-libdir="
586 (assoc-ref %build-inputs "boost") "/lib")
587 "--disable-optimiz-arch")
589 (modify-phases %standard-phases
590 (add-after 'unpack 'run-prebuild
592 (setenv "HOME" (getcwd))
593 (with-directory-excursion "unix"
594 (substitute* "prebuild.sh"
595 (("/bin/sh") (which "sh")))
596 (invoke "sh" "prebuild.sh"))
598 ;; The bootstrap script is run by the prebuild script in the
599 ;; "run-prebuild" phase.
600 (delete 'bootstrap))))
601 (synopsis "Tool for creating three-dimensional graphics")
603 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
604 for producing high-quality computer graphics. @code{POV-Ray} creates
605 three-dimensional, photo-realistic images using a rendering technique called
606 ray-tracing. It reads in a text file containing information describing the
607 objects and lighting in a scene and generates an image of that scene from the
608 view point of a camera also described in the text file. Ray-tracing is not a
609 fast process by any means, but it produces very high quality images with
610 realistic reflections, shading, perspective and other effects.")
611 (home-page "http://www.povray.org/")
612 (license license:agpl3+)))
614 (define-public rapicorn
620 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
621 "rapicorn-" version ".tar.xz"))
624 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
625 (patches (search-patches "rapicorn-isnan.patch"))))
626 (build-system gnu-build-system)
629 (modify-phases %standard-phases
630 (add-after 'unpack 'fix-tests
632 ;; Our grep does not support perl regular expressions.
633 (substitute* "taptool.sh"
634 (("grep -P") "grep -E"))
635 ;; Disable path tests because we cannot access /bin or /sbin.
636 (substitute* "rcore/tests/multitest.cc"
637 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
639 (add-before 'check 'pre-check
641 ;; The test suite requires a running X server (with DISPLAY
642 ;; number 99 or higher).
643 (system "Xvfb :99 &")
644 (setenv "DISPLAY" ":99")
646 (add-after 'unpack 'replace-fhs-paths
648 (substitute* (cons "Makefile.decl"
649 (find-files "." "^Makefile\\.in$"))
650 (("/bin/ls") (which "ls"))
651 (("/usr/bin/env") (which "env")))
653 ;; These libraries are listed in the "Required" section of the pkg-config
656 `(("librsvg" ,librsvg)
660 ("python2-enum34" ,python2-enum34)))
662 `(("gdk-pixbuf" ,gdk-pixbuf)
663 ("libpng" ,libpng-1.2)
664 ("readline" ,readline)
665 ("libcroco" ,libcroco)
667 ("cython" ,python2-cython)))
669 `(("pandoc" ,ghc-pandoc)
673 ("graphviz" ,graphviz)
674 ("intltool" ,intltool)
675 ("pkg-config" ,pkg-config)
676 ("xvfb" ,xorg-server-for-tests)))
677 (home-page "https://rapicorn.testbit.org/")
678 (synopsis "Toolkit for rapid development of user interfaces")
680 "Rapicorn is a toolkit for rapid development of user interfaces in C++
681 and Python. The user interface is designed in a declarative markup language
682 and is connected to the programming logic using data bindings and commands.")
683 (license license:mpl2.0)))
691 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
695 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
696 (build-system cmake-build-system)
697 (arguments '(#:tests? #f)) ;no 'test' target
699 ;; Headers include OpenEXR and IlmBase headers.
700 (propagated-inputs `(("openexr" ,openexr)))
702 (home-page "http://ampasctl.sourceforge.net")
703 (synopsis "Color Transformation Language")
705 "The Color Transformation Language, or CTL, is a small programming
706 language that was designed to serve as a building block for digital color
707 management systems. CTL allows users to describe color transforms in a
708 concise and unambiguous way by expressing them as programs. In order to apply
709 a given transform to an image, the color management system instructs a CTL
710 interpreter to load and run the CTL program that describes the transform. The
711 original and the transformed image constitute the CTL program's input and
714 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
715 ;; and headers use different wording.
716 (license (license:non-copyleft "file://LICENSE"))))
718 (define-public brdf-explorer
719 ;; There are no release tarballs, and not even tags in the repo,
720 ;; so use the latest revision.
721 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
724 (name "brdf-explorer")
725 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
729 (url "https://github.com/wdas/brdf.git")
733 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
734 (file-name (string-append name "-" version "-checkout"))))
735 (build-system gnu-build-system)
737 `(#:phases (modify-phases %standard-phases
739 (lambda* (#:key outputs #:allow-other-keys)
740 (let ((out (assoc-ref outputs "out")))
742 (string-append "prefix=" out)))))
743 (add-after 'install 'wrap-program
744 (lambda* (#:key outputs #:allow-other-keys)
745 (let* ((out (assoc-ref outputs "out"))
746 (bin (string-append out "/bin"))
749 (with-directory-excursion bin
750 (rename-file "brdf" ".brdf-real")
751 (call-with-output-file "brdf"
753 (format port "#!/bin/sh
754 # Run the thing from its home, otherwise it just bails out.
756 exec -a \"$0\" ~a/.brdf-real~%"
758 (chmod "brdf" #o555)))
761 `(("qttools" ,qttools))) ;for 'qmake'
766 ("freeglut" ,freeglut)
768 (home-page "https://www.disneyanimation.com/technology/brdf.html")
770 "Analyze bidirectional reflectance distribution functions (BRDFs)")
772 "BRDF Explorer is an application that allows the development and analysis
773 of bidirectional reflectance distribution functions (BRDFs). It can load and
774 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
775 language), measured material data from the MERL database, and anisotropic
776 measured material data from MIT CSAIL. Graphs and visualizations update in
777 real time as parameters are changed, making it a useful tool for evaluating
778 and understanding different BRDFs (and other component functions).")
779 (license license:ms-pl))))
787 (uri (list (string-append
788 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
791 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
794 ;; Site was discontinued.
795 (string-append "http://www.antigrain.com/agg-"
798 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
799 (patches (search-patches "agg-am_c_prototype.patch"))))
800 (build-system gnu-build-system)
803 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
805 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
807 "--disable-examples")
809 (modify-phases %standard-phases
812 ;; let's call configure from configure phase and not now
813 (substitute* "autogen.sh" (("./configure") "# ./configure"))
814 (invoke "sh" "autogen.sh"))))))
816 `(("pkg-config" ,pkg-config)
818 ("autoconf" ,autoconf)
819 ("automake" ,automake)))
822 ("freetype" ,freetype)
825 ;; Antigrain.com was discontinued.
826 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
827 (synopsis "High-quality 2D graphics rendering engine for C++")
829 "Anti-Grain Geometry is a high quality rendering engine written in C++.
830 It supports sub-pixel resolutions and anti-aliasing. It is also library for
831 rendering SVG graphics.")
832 (license license:gpl2+)))
834 (define-public python-pastel
836 (name "python-pastel")
841 (uri (pypi-uri "pastel" version))
844 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
845 (build-system python-build-system)
847 `(#:phases (modify-phases %standard-phases
849 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
851 `(("python-pytest" ,python-pytest)))
852 (home-page "https://github.com/sdispater/pastel")
853 (synopsis "Library to colorize strings in your terminal")
854 (description "Pastel is a simple library to help you colorize strings in
856 (license license:expat)))
858 (define-public python2-pastel
859 (package-with-python2 python-pastel))
861 (define-public fgallery
869 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
870 "fgallery-" version ".zip"))
873 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
874 (build-system gnu-build-system)
876 `(#:tests? #f ; no tests
878 (modify-phases %standard-phases
882 (lambda* (#:key inputs outputs #:allow-other-keys)
883 (let* ((out (assoc-ref outputs "out"))
884 (bin (string-append out "/bin/"))
885 (share (string-append out "/share/fgallery"))
886 (man (string-append out "/share/man/man1"))
887 (perl5lib (getenv "PERL5LIB"))
888 (script (string-append share "/fgallery")))
889 (define (bin-directory input-name)
890 (string-append (assoc-ref inputs input-name) "/bin"))
893 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
896 (copy-recursively "." share)
898 ;; fgallery copies files from store when it is run. The
899 ;; read-only permissions from the store directories will cause
900 ;; fgallery to fail. Do not preserve file attributes when
901 ;; copying files to prevent it.
904 "'cp', '--no-preserve=all'"))
907 (symlink script (string-append out "/bin/fgallery"))
911 ,(map bin-directory '("imagemagick"
919 `("PERL5LIB" ":" prefix (,perl5lib)))
923 ;; TODO: Add missing optional dependency: facedetect.
925 `(("imagemagick" ,imagemagick)
928 ("libjpeg" ,libjpeg-turbo)
931 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
932 ("perl-image-exiftool" ,perl-image-exiftool)
933 ("jpegoptim" ,jpegoptim)
934 ("pngcrush" ,pngcrush)
936 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
937 (synopsis "Static photo gallery generator")
939 "FGallery is a static, JavaScript photo gallery generator with minimalist
940 look. The result can be uploaded on any web server without additional
942 (license license:gpl2+)))
944 (define-public opensubdiv
951 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
952 (commit (string-append "v" (string-join (string-split version #\.)
954 (file-name (git-file-name name version))
957 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
958 (build-system cmake-build-system)
960 `(#:phases (modify-phases %standard-phases
961 (add-before 'configure 'set-glew-location
962 (lambda* (#:key inputs #:allow-other-keys)
963 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
965 (add-before 'check 'start-xorg-server
966 (lambda* (#:key inputs #:allow-other-keys)
967 ;; The test suite requires a running X server.
968 (system (string-append (assoc-ref inputs "xorg-server")
970 (setenv "DISPLAY" ":1")
973 `(("xorg-server" ,xorg-server-for-tests)))
976 ("libxrandr" ,libxrandr)
977 ("libxcursor" ,libxcursor)
978 ("libxinerama" ,libxinerama)
982 (home-page "https://graphics.pixar.com/opensubdiv/")
983 (synopsis "High performance subdivision surface evaluation")
984 (description "OpenSubdiv is a set of libraries that implement high
985 performance subdivision surface (subdiv) evaluation on massively parallel CPU
986 and GPU architectures.")
987 (license license:asl2.0)))
989 (define-public opencsg
990 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
998 (url "https://github.com/floriankirsch/OpenCSG.git")
999 (commit (string-append "opencsg-"
1000 (string-map dot-to-dash version)
1002 (file-name (git-file-name name version))
1005 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1006 (build-system gnu-build-system)
1009 (modify-phases %standard-phases
1011 (lambda* (#:key outputs #:allow-other-keys)
1012 (substitute* "src/Makefile"
1013 (("/usr/local") (assoc-ref outputs "out")))
1015 (add-before 'build 'skip-example
1016 (lambda _ (chdir "src") #t)))))
1019 ("freeglut" ,freeglut)))
1020 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1022 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1023 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1024 For example, two shapes can be combined by uniting them, by intersecting them,
1025 or by subtracting one shape from the other.")
1026 (home-page "http://www.opencsg.org/")
1027 (license license:gpl2))))
1029 (define-public coin3D
1030 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1031 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1033 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1037 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1042 (url "https://bitbucket.org/Coin3D/coin")
1043 (changeset changeset)))
1044 (file-name (git-file-name name version))
1046 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1047 (modules '((guix build utils)))
1050 (for-each delete-file
1052 "cfg/wrapmsvc.exe"))
1054 (build-system cmake-build-system)
1056 `(("doxygen" ,doxygen)
1057 ("graphviz" ,graphviz)))
1060 ("freeglut" ,freeglut)
1065 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1066 (string-append "-DBOOST_ROOT="
1067 (assoc-ref %build-inputs "boost")))))
1068 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1070 "High-level 3D visualization library with Open Inventor 2.1 API")
1072 "Coin is a 3D graphics library with an Application Programming Interface
1073 based on the Open Inventor 2.1 API. For those who are not familiar with
1074 Open Inventor, it is a scene-graph based retain-mode rendering and model
1075 interaction library, written in C++, which has become the de facto
1076 standard graphics library for 3D visualization and visual simulation
1077 software in the scientific and engineering community.")
1078 (license license:bsd-3))))
1080 (define-public superfamiconv
1082 (name "superfamiconv")
1088 (url "https://github.com/Optiroc/SuperFamiconv")
1089 (commit (string-append "v" version))))
1090 (file-name (git-file-name name version))
1093 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1094 (build-system gnu-build-system)
1096 `(#:tests? #f ; no tests
1098 (modify-phases %standard-phases
1101 (lambda* (#:key outputs #:allow-other-keys)
1102 (let* ((outdir (assoc-ref outputs "out"))
1103 (bindir (string-append outdir "/bin")))
1104 (install-file "bin/superfamiconv" bindir)
1106 (home-page "https://github.com/Optiroc/SuperFamiconv")
1107 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1108 and PC Engine formats")
1109 (description "SuperFamiconv is a converter for tiled graphics, supporting
1110 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1111 Automated palette selection is supported.")
1112 (license license:expat)))