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>
22 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages graphics)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages algebra)
42 #:use-module (gnu packages audio)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages flex)
51 #:use-module (gnu packages fonts)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages ghostscript)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages graphviz)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages haskell-xyz)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages imagemagick)
62 #:use-module (gnu packages jemalloc)
63 #:use-module (gnu packages multiprecision)
64 #:use-module (gnu packages pdf)
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages photo)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages pth)
69 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-xyz)
72 #:use-module (gnu packages qt)
73 #:use-module (gnu packages readline)
74 #:use-module (gnu packages sdl)
75 #:use-module (gnu packages swig)
76 #:use-module (gnu packages tbb)
77 #:use-module (gnu packages video)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (guix build-system cmake)
81 #:use-module (guix build-system gnu)
82 #:use-module (guix build-system python)
83 #:use-module (guix download)
84 #:use-module (guix git-download)
85 #:use-module (guix hg-download)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages)
88 #:use-module (guix utils))
90 (define-public blender
96 (uri (string-append "https://download.blender.org/source/"
97 "blender-" version ".tar.xz"))
100 "18zbdgas6qf2kmvvlimxgnq7y9kj7hdxcgixrs6fj50x40q01q2d"))))
101 (build-system cmake-build-system)
103 (let ((python-version (version-major+minor (package-version python))))
104 `(;; Test files are very large and not included in the release tarball.
107 (list "-DWITH_CODEC_FFMPEG=ON"
108 "-DWITH_CODEC_SNDFILE=ON"
110 "-DWITH_DOC_MANPAGE=ON"
112 "-DWITH_IMAGE_OPENJPEG=ON"
113 "-DWITH_INPUT_NDOF=ON"
114 "-DWITH_INSTALL_PORTABLE=OFF"
116 "-DWITH_MOD_OCEANSIM=ON"
117 "-DWITH_OPENSUBDIV=ON"
118 "-DWITH_PYTHON_INSTALL=OFF"
119 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
120 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
122 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
123 "/include/python" ,python-version "m")
124 (string-append "-DPYTHON_VERSION=" ,python-version)
125 (string-append "-DPYTHON_NUMPY_PATH="
126 (assoc-ref %build-inputs "python-numpy")
127 "/lib/python" ,python-version "/site-packages/"))
129 (modify-phases %standard-phases
130 ;; XXX This file doesn't exist in the Git sources but will probably
131 ;; exist in the eventual 2.80 source tarball.
132 (add-after 'unpack 'fix-broken-import
134 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
135 (("import encode_bin") "from . import encode_bin"))
137 (add-after 'set-paths 'add-ilmbase-include-path
138 (lambda* (#:key inputs #:allow-other-keys)
139 ;; OpenEXR propagates ilmbase, but its include files do not appear
140 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
141 ;; the CPATH to satisfy the dependency on "half.h".
143 (string-append (assoc-ref inputs "ilmbase")
145 ":" (or (getenv "CPATH") "")))
149 ("jemalloc" ,jemalloc)
152 ("libxrender" ,libxrender)
153 ("openimageio" ,openimageio)
155 ("opensubdiv" ,opensubdiv)
157 ("openjpeg" ,openjpeg)
164 ("libsndfile" ,libsndfile)
165 ("freetype" ,freetype)
169 ("python-numpy" ,python-numpy)
172 (home-page "https://blender.org/")
173 (synopsis "3D graphics creation suite")
175 "Blender is a 3D graphics creation suite. It supports the entirety of
176 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
177 compositing and motion tracking, even video editing and game creation. The
178 application can be customized via its API for Python scripting.")
179 (license license:gpl2+)))
181 (define-public assimp
188 (url "https://github.com/assimp/assimp.git")
189 (commit (string-append "v" version))))
190 (file-name (git-file-name name version))
193 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
194 (build-system cmake-build-system)
197 (home-page "http://www.assimp.org/")
198 (synopsis "Asset import library")
200 "The Open Asset Import Library loads more than 40 3D file formats into
201 one unified data structure. Additionally, assimp features various mesh post
202 processing tools: normals and tangent space generation, triangulation, vertex
203 cache locality optimization, removal of degenerate primitives and duplicate
204 vertices, sorting by primitive type, merging of redundant materials and many
206 (license license:bsd-3)))
215 "https://github.com/CGAL/cgal/releases/download/releases/"
216 "CGAL-" version "/CGAL-" version ".tar.xz"))
219 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
220 (build-system cmake-build-system)
222 '(#:tests? #f)) ; no test target
227 (home-page "https://www.cgal.org/")
228 (synopsis "Computational geometry algorithms library")
230 "CGAL provides easy access to efficient and reliable geometric algorithms
231 in the form of a C++ library. CGAL is used in various areas needing geometric
232 computation, such as: computer graphics, scientific visualization, computer
233 aided design and modeling, geographic information systems, molecular biology,
234 medical imaging, robotics and motion planning, mesh generation, numerical
235 methods, etc. It provides data structures and algorithms such as
236 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
239 ;; The 'LICENSE' file explains that a subset is available under more
240 ;; permissive licenses.
241 (license license:gpl3+)))
243 (define-public ilmbase
250 (url "https://github.com/openexr/openexr")
251 (commit (string-append "v" version))))
252 (file-name (git-file-name "ilmbase" version))
255 "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01"))
256 (patches (search-patches "ilmbase-fix-tests.patch"
257 "ilmbase-openexr-pkg-config.patch"))))
258 (build-system cmake-build-system)
260 `(#:phases (modify-phases %standard-phases
261 (add-after 'unpack 'change-directory
265 (home-page "https://www.openexr.com/")
266 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
268 "IlmBase provides several utility libraries for C++. Half is a class
269 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
270 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
271 quaternions and other useful 2D and 3D math functions. Iex is an
272 exception-handling library.")
273 (license license:bsd-3)))
283 (url "https://github.com/OGRECave/ogre.git")
284 (commit (string-append "v" version))
285 (recursive? #t))) ;for Dear ImGui submodule
286 (file-name (git-file-name name version))
288 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
289 (build-system cmake-build-system)
292 (modify-phases %standard-phases
293 (add-before 'configure 'pre-configure
294 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
295 ;; a consequence, we cannot suggest ours in configure flags. Fix
297 (lambda* (#:key inputs outputs #:allow-other-keys)
298 (substitute* "CMakeLists.txt"
299 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
302 (let* ((out (assoc-ref %outputs "out"))
304 (string-join (list (string-append out "/lib")
305 (string-append out "/lib/OGRE"))
307 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
308 "-DOGRE_BUILD_DEPENDENCIES=OFF"
309 "-DOGRE_BUILD_TESTS=TRUE"
310 "-DOGRE_INSTALL_DOCS=TRUE"
311 "-DOGRE_INSTALL_SAMPLES=TRUE"
312 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
316 ("googletest" ,googletest-1.8)
317 ("pkg-config" ,pkg-config)))
319 `(("font-dejavu" ,font-dejavu)
320 ("freeimage" ,freeimage)
321 ("freetype" ,freetype)
324 ("libxrandr" ,libxrandr)
328 ("zziplib" ,zziplib)))
329 (synopsis "Scene-oriented, flexible 3D engine written in C++")
331 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
332 flexible 3D engine written in C++ designed to make it easier and more intuitive
333 for developers to produce applications utilising hardware-accelerated 3D
335 (home-page "https://www.ogre3d.org/")
336 (license license:expat)))
338 (define-public openexr
341 (version (package-version ilmbase))
343 (inherit (package-source ilmbase))
344 (file-name (git-file-name "openexr" version))
345 (modules '((guix build utils)))
348 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
352 (build-system cmake-build-system)
355 (modify-phases %standard-phases
356 (add-after 'unpack 'change-directory
360 (add-before 'check 'increase-test-timeout
362 ;; On armhf-linux, we need to override the CTest default
363 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
364 (setenv "CTEST_TEST_TIMEOUT" "2000")
366 ,@(if (not (target-64bit?))
367 `((add-after 'change-directory 'disable-broken-test
368 ;; This test fails on i686. Upstream developers suggest that
369 ;; this test is broken on i686 and can be safely disabled:
370 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
372 (substitute* "IlmImfTest/main.cpp"
373 ((".*testOptimizedInterleavePatterns.*") "")
374 ;; This test is broken in 2.4.0 and will be fixed in a later
375 ;; release: <https://github.com/openexr/openexr/issues/571>.
376 ((".*testLargeDataWindowOffsets.*") ""))
380 `(("pkg-config" ,pkg-config)))
382 `(("ilmbase" ,ilmbase) ;used in public headers
383 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
384 (home-page "https://www.openexr.com/")
385 (synopsis "High-dynamic range file format library")
387 "OpenEXR is a high dynamic-range (HDR) image file format developed for
388 use in computer imaging applications. The IlmImf C++ libraries support
389 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
390 (license license:bsd-3)))
392 (define-public openimageio
399 (url "https://github.com/OpenImageIO/oiio.git")
400 (commit (string-append "Release-" version))))
401 (file-name (git-file-name name version))
404 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
405 (build-system cmake-build-system)
406 ;; FIXME: To run all tests successfully, test image sets from multiple
407 ;; third party sources have to be present. For details see
408 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
412 `(("pkg-config" ,pkg-config)))
423 (synopsis "C++ library for reading and writing images")
425 "OpenImageIO is a library for reading and writing images, and a bunch of
426 related classes, utilities, and applications. There is a particular emphasis
427 on formats and functionality used in professional, large-scale animation and
428 visual effects work for film.")
429 (home-page "https://www.openimageio.org")
430 (license license:bsd-3)))
432 ;; This older version of OpenImageIO is required for Blender 2.79.
433 (define-public openimageio-1.7
435 (inherit openimageio)
441 (url "https://github.com/OpenImageIO/oiio.git")
442 (commit (string-append "Release-" version))))
443 (file-name (git-file-name name version))
446 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))))
448 (define-public openscenegraph
450 (name "openscenegraph")
456 (url "https://github.com/openscenegraph/OpenSceneGraph")
457 (commit (string-append "OpenSceneGraph-" version))))
459 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
460 (file-name (git-file-name name version))))
462 `((upstream-name . "OpenSceneGraph")))
463 (build-system cmake-build-system)
465 `(#:tests? #f ; no test target available
466 ;; Without this flag, 'rd' will be added to the name of the
467 ;; library binaries and break linking with other programs.
468 #:build-type "Release"
470 (list (string-append "-DCMAKE_INSTALL_RPATH="
471 (assoc-ref %outputs "out") "/lib:"
472 (assoc-ref %outputs "out") "/lib64"))))
474 `(("pkg-config" ,pkg-config)
478 ("libjpeg" ,libjpeg) ; required by the JPEG texture plugin
481 ("libxrandr" ,libxrandr)
484 (synopsis "High-performance real-time graphics toolkit")
486 "The OpenSceneGraph is a high-performance 3D graphics toolkit
487 used by application developers in fields such as visual simulation, games,
488 virtual reality, scientific visualization and modeling.")
489 (home-page "http://www.openscenegraph.org")
490 ;; The 'LICENSE' file explains that the source is licensed under
491 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
492 (license license:lgpl2.1)))
494 ;; We need this for simgear
495 (define-public openscenegraph-3.4
496 (package (inherit openscenegraph)
497 (name "openscenegraph")
503 (url "https://github.com/openscenegraph/OpenSceneGraph")
504 (commit (string-append "OpenSceneGraph-" version))))
505 (file-name (git-file-name name version))
508 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
510 (substitute-keyword-arguments (package-arguments openscenegraph)
511 ((#:configure-flags flags)
513 ;; The jpeg plugin requires conversion between integers and booleans
514 "-DCMAKE_CXX_FLAGS=-fpermissive"
517 `(("libjpeg" ,libjpeg)
518 ,@(package-inputs openscenegraph)))))
521 (define-public openmw-openscenegraph
522 ;; OpenMW prefers its own fork of openscenegraph:
523 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
524 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
527 (inherit openscenegraph)
528 (version (git-version "3.6" "1" commit))
533 (url "https://github.com/OpenMW/osg/")
535 (file-name (git-file-name (package-name openscenegraph) version))
538 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
540 (substitute-keyword-arguments (package-arguments openscenegraph)
541 ((#:configure-flags flags)
542 ;; As per the above wiki link, the following plugins are enough:
544 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
545 "-DBUILD_OSG_PLUGIN_OSG=1"
546 "-DBUILD_OSG_PLUGIN_DDS=1"
547 "-DBUILD_OSG_PLUGIN_TGA=1"
548 "-DBUILD_OSG_PLUGIN_BMP=1"
549 "-DBUILD_OSG_PLUGIN_JPEG=1"
550 "-DBUILD_OSG_PLUGIN_PNG=1"
551 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
552 ;; The jpeg plugin requires conversion between integers and booleans
553 "-DCMAKE_CXX_FLAGS=-fpermissive")
556 (define-public povray
563 (url "https://github.com/POV-Ray/povray")
564 (commit (string-append "v" version))))
565 (file-name (git-file-name name version))
568 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
569 (modules '((guix build utils)))
572 ;; Delete bundled libraries.
573 (delete-file-recursively "libraries")
575 (build-system gnu-build-system)
577 `(("autoconf" ,autoconf)
578 ("automake" ,automake)
579 ("pkg-config" ,pkg-config)))
590 (list "COMPILED_BY=Guix"
591 (string-append "--with-boost-libdir="
592 (assoc-ref %build-inputs "boost") "/lib")
593 "--disable-optimiz-arch")
595 (modify-phases %standard-phases
596 (add-after 'unpack 'run-prebuild
598 (setenv "HOME" (getcwd))
599 (with-directory-excursion "unix"
600 (substitute* "prebuild.sh"
601 (("/bin/sh") (which "sh")))
602 (invoke "sh" "prebuild.sh"))
604 ;; The bootstrap script is run by the prebuild script in the
605 ;; "run-prebuild" phase.
606 (delete 'bootstrap))))
607 (synopsis "Tool for creating three-dimensional graphics")
609 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
610 for producing high-quality computer graphics. @code{POV-Ray} creates
611 three-dimensional, photo-realistic images using a rendering technique called
612 ray-tracing. It reads in a text file containing information describing the
613 objects and lighting in a scene and generates an image of that scene from the
614 view point of a camera also described in the text file. Ray-tracing is not a
615 fast process by any means, but it produces very high quality images with
616 realistic reflections, shading, perspective and other effects.")
617 (home-page "http://www.povray.org/")
618 (license license:agpl3+)))
620 (define-public rapicorn
626 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
627 "rapicorn-" version ".tar.xz"))
630 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
631 (patches (search-patches "rapicorn-isnan.patch"))))
632 (build-system gnu-build-system)
635 (modify-phases %standard-phases
636 (add-after 'unpack 'fix-tests
638 ;; Our grep does not support perl regular expressions.
639 (substitute* "taptool.sh"
640 (("grep -P") "grep -E"))
641 ;; Disable path tests because we cannot access /bin or /sbin.
642 (substitute* "rcore/tests/multitest.cc"
643 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
645 (add-before 'check 'pre-check
647 ;; The test suite requires a running X server (with DISPLAY
648 ;; number 99 or higher).
649 (system "Xvfb :99 &")
650 (setenv "DISPLAY" ":99")
652 (add-after 'unpack 'replace-fhs-paths
654 (substitute* (cons "Makefile.decl"
655 (find-files "." "^Makefile\\.in$"))
656 (("/bin/ls") (which "ls"))
657 (("/usr/bin/env") (which "env")))
659 ;; These libraries are listed in the "Required" section of the pkg-config
662 `(("librsvg" ,librsvg)
666 ("python2-enum34" ,python2-enum34)))
668 `(("gdk-pixbuf" ,gdk-pixbuf)
669 ("libpng" ,libpng-1.2)
670 ("readline" ,readline)
671 ("libcroco" ,libcroco)
673 ("cython" ,python2-cython)))
675 `(("pandoc" ,ghc-pandoc)
679 ("graphviz" ,graphviz)
680 ("intltool" ,intltool)
681 ("pkg-config" ,pkg-config)
682 ("xvfb" ,xorg-server-for-tests)))
683 (home-page "https://rapicorn.testbit.org/")
684 (synopsis "Toolkit for rapid development of user interfaces")
686 "Rapicorn is a toolkit for rapid development of user interfaces in C++
687 and Python. The user interface is designed in a declarative markup language
688 and is connected to the programming logic using data bindings and commands.")
689 (license license:mpl2.0)))
697 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
701 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
702 (build-system cmake-build-system)
703 (arguments '(#:tests? #f)) ;no 'test' target
705 ;; Headers include OpenEXR and IlmBase headers.
706 (propagated-inputs `(("openexr" ,openexr)))
708 (home-page "http://ampasctl.sourceforge.net")
709 (synopsis "Color Transformation Language")
711 "The Color Transformation Language, or CTL, is a small programming
712 language that was designed to serve as a building block for digital color
713 management systems. CTL allows users to describe color transforms in a
714 concise and unambiguous way by expressing them as programs. In order to apply
715 a given transform to an image, the color management system instructs a CTL
716 interpreter to load and run the CTL program that describes the transform. The
717 original and the transformed image constitute the CTL program's input and
720 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
721 ;; and headers use different wording.
722 (license (license:non-copyleft "file://LICENSE"))))
724 (define-public brdf-explorer
725 ;; There are no release tarballs, and not even tags in the repo,
726 ;; so use the latest revision.
727 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
730 (name "brdf-explorer")
731 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
735 (url "https://github.com/wdas/brdf.git")
739 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
740 (file-name (string-append name "-" version "-checkout"))))
741 (build-system gnu-build-system)
743 `(#:phases (modify-phases %standard-phases
745 (lambda* (#:key outputs #:allow-other-keys)
746 (let ((out (assoc-ref outputs "out")))
748 (string-append "prefix=" out)))))
749 (add-after 'install 'wrap-program
750 (lambda* (#:key outputs #:allow-other-keys)
751 (let* ((out (assoc-ref outputs "out"))
752 (bin (string-append out "/bin"))
755 (with-directory-excursion bin
756 (rename-file "brdf" ".brdf-real")
757 (call-with-output-file "brdf"
759 (format port "#!/bin/sh
760 # Run the thing from its home, otherwise it just bails out.
762 exec -a \"$0\" ~a/.brdf-real~%"
764 (chmod "brdf" #o555)))
767 `(("qttools" ,qttools))) ;for 'qmake'
772 ("freeglut" ,freeglut)
774 (home-page "https://www.disneyanimation.com/technology/brdf.html")
776 "Analyze bidirectional reflectance distribution functions (BRDFs)")
778 "BRDF Explorer is an application that allows the development and analysis
779 of bidirectional reflectance distribution functions (BRDFs). It can load and
780 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
781 language), measured material data from the MERL database, and anisotropic
782 measured material data from MIT CSAIL. Graphs and visualizations update in
783 real time as parameters are changed, making it a useful tool for evaluating
784 and understanding different BRDFs (and other component functions).")
785 (license license:ms-pl))))
793 (uri (list (string-append
794 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
797 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
800 ;; Site was discontinued.
801 (string-append "http://www.antigrain.com/agg-"
804 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
805 (patches (search-patches "agg-am_c_prototype.patch"))))
806 (build-system gnu-build-system)
809 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
811 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
813 "--disable-examples")
815 (modify-phases %standard-phases
818 ;; let's call configure from configure phase and not now
819 (substitute* "autogen.sh" (("./configure") "# ./configure"))
820 (invoke "sh" "autogen.sh"))))))
822 `(("pkg-config" ,pkg-config)
824 ("autoconf" ,autoconf)
825 ("automake" ,automake)))
828 ("freetype" ,freetype)
831 ;; Antigrain.com was discontinued.
832 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
833 (synopsis "High-quality 2D graphics rendering engine for C++")
835 "Anti-Grain Geometry is a high quality rendering engine written in C++.
836 It supports sub-pixel resolutions and anti-aliasing. It is also library for
837 rendering SVG graphics.")
838 (license license:gpl2+)))
840 (define-public python-pastel
842 (name "python-pastel")
847 (uri (pypi-uri "pastel" version))
850 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
851 (build-system python-build-system)
853 `(#:phases (modify-phases %standard-phases
855 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
857 `(("python-pytest" ,python-pytest)))
858 (home-page "https://github.com/sdispater/pastel")
859 (synopsis "Library to colorize strings in your terminal")
860 (description "Pastel is a simple library to help you colorize strings in
862 (license license:expat)))
864 (define-public python2-pastel
865 (package-with-python2 python-pastel))
867 (define-public fgallery
875 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
876 "fgallery-" version ".zip"))
879 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
880 (build-system gnu-build-system)
882 `(#:tests? #f ; no tests
884 (modify-phases %standard-phases
888 (lambda* (#:key inputs outputs #:allow-other-keys)
889 (let* ((out (assoc-ref outputs "out"))
890 (bin (string-append out "/bin/"))
891 (share (string-append out "/share/fgallery"))
892 (man (string-append out "/share/man/man1"))
893 (perl5lib (getenv "PERL5LIB"))
894 (script (string-append share "/fgallery")))
895 (define (bin-directory input-name)
896 (string-append (assoc-ref inputs input-name) "/bin"))
899 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
902 (copy-recursively "." share)
904 ;; fgallery copies files from store when it is run. The
905 ;; read-only permissions from the store directories will cause
906 ;; fgallery to fail. Do not preserve file attributes when
907 ;; copying files to prevent it.
910 "'cp', '--no-preserve=all'"))
913 (symlink script (string-append out "/bin/fgallery"))
917 ,(map bin-directory '("imagemagick"
925 `("PERL5LIB" ":" prefix (,perl5lib)))
929 ;; TODO: Add missing optional dependency: facedetect.
931 `(("imagemagick" ,imagemagick)
937 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
938 ("perl-image-exiftool" ,perl-image-exiftool)
939 ("jpegoptim" ,jpegoptim)
940 ("pngcrush" ,pngcrush)
942 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
943 (synopsis "Static photo gallery generator")
945 "FGallery is a static, JavaScript photo gallery generator with minimalist
946 look. The result can be uploaded on any web server without additional
948 (license license:gpl2+)))
950 (define-public opensubdiv
957 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
958 (commit (string-append "v" (string-join (string-split version #\.)
960 (file-name (git-file-name name version))
963 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
964 (build-system cmake-build-system)
966 `(#:phases (modify-phases %standard-phases
967 (add-before 'configure 'set-glew-location
968 (lambda* (#:key inputs #:allow-other-keys)
969 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
971 (add-before 'check 'start-xorg-server
972 (lambda* (#:key inputs #:allow-other-keys)
973 ;; The test suite requires a running X server.
974 (system (string-append (assoc-ref inputs "xorg-server")
976 (setenv "DISPLAY" ":1")
979 `(("xorg-server" ,xorg-server-for-tests)))
982 ("libxrandr" ,libxrandr)
983 ("libxcursor" ,libxcursor)
984 ("libxinerama" ,libxinerama)
988 (home-page "https://graphics.pixar.com/opensubdiv/")
989 (synopsis "High performance subdivision surface evaluation")
990 (description "OpenSubdiv is a set of libraries that implement high
991 performance subdivision surface (subdiv) evaluation on massively parallel CPU
992 and GPU architectures.")
993 (license license:asl2.0)))
995 (define-public opencsg
996 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1004 (url "https://github.com/floriankirsch/OpenCSG.git")
1005 (commit (string-append "opencsg-"
1006 (string-map dot-to-dash version)
1008 (file-name (git-file-name name version))
1011 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1012 (build-system gnu-build-system)
1015 (modify-phases %standard-phases
1017 (lambda* (#:key outputs #:allow-other-keys)
1018 (substitute* "src/Makefile"
1019 (("/usr/local") (assoc-ref outputs "out")))
1021 (add-before 'build 'skip-example
1022 (lambda _ (chdir "src") #t)))))
1025 ("freeglut" ,freeglut)))
1026 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1028 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1029 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1030 For example, two shapes can be combined by uniting them, by intersecting them,
1031 or by subtracting one shape from the other.")
1032 (home-page "http://www.opencsg.org/")
1033 (license license:gpl2))))
1035 (define-public coin3D
1036 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1037 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1039 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1043 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1048 (url "https://bitbucket.org/Coin3D/coin")
1049 (changeset changeset)))
1050 (file-name (git-file-name name version))
1052 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1053 (modules '((guix build utils)))
1056 (for-each delete-file
1058 "cfg/wrapmsvc.exe"))
1060 (build-system cmake-build-system)
1062 `(("doxygen" ,doxygen)
1063 ("graphviz" ,graphviz)))
1066 ("freeglut" ,freeglut)
1071 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1072 (string-append "-DBOOST_ROOT="
1073 (assoc-ref %build-inputs "boost")))))
1074 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1076 "High-level 3D visualization library with Open Inventor 2.1 API")
1078 "Coin is a 3D graphics library with an Application Programming Interface
1079 based on the Open Inventor 2.1 API. For those who are not familiar with
1080 Open Inventor, it is a scene-graph based retain-mode rendering and model
1081 interaction library, written in C++, which has become the de facto
1082 standard graphics library for 3D visualization and visual simulation
1083 software in the scientific and engineering community.")
1084 (license license:bsd-3))))
1086 (define-public superfamiconv
1088 (name "superfamiconv")
1094 (url "https://github.com/Optiroc/SuperFamiconv")
1095 (commit (string-append "v" version))))
1096 (file-name (git-file-name name version))
1099 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1100 (build-system gnu-build-system)
1102 `(#:tests? #f ; no tests
1104 (modify-phases %standard-phases
1107 (lambda* (#:key outputs #:allow-other-keys)
1108 (let* ((outdir (assoc-ref outputs "out"))
1109 (bindir (string-append outdir "/bin")))
1110 (install-file "bin/superfamiconv" bindir)
1112 (home-page "https://github.com/Optiroc/SuperFamiconv")
1113 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1114 and PC Engine formats")
1115 (description "SuperFamiconv is a converter for tiled graphics, supporting
1116 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1117 Automated palette selection is supported.")
1118 (license license:expat)))