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>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages graphics)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages fonts)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages graphviz)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages haskell-xyz)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages imagemagick)
63 #:use-module (gnu packages jemalloc)
64 #:use-module (gnu packages multiprecision)
65 #:use-module (gnu packages pdf)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages photo)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages pth)
70 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages sdl)
76 #:use-module (gnu packages swig)
77 #:use-module (gnu packages tbb)
78 #:use-module (gnu packages video)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system cmake)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system python)
84 #:use-module (guix download)
85 #:use-module (guix git-download)
86 #:use-module (guix hg-download)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (guix packages)
89 #:use-module (guix utils))
99 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
101 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
102 (build-system gnu-build-system)
105 (modify-phases %standard-phases
106 (add-after 'unpack 'patch
108 (substitute* "configure"
109 (("-I/usr/include/freetype2")
112 (assoc-ref %build-inputs "freetype")
113 "/include/freetype2"))))
116 `(("doxygen" ,doxygen)))
119 ("freetype" ,freetype)
122 ("jpeg" ,libjpeg-turbo)
126 ("xcursor" ,libxcursor)
128 ("xfixes" ,libxfixes)
131 ("xrandr" ,libxrandr)
132 ("xrender" ,libxrender)
133 ("xshm" ,libxshmfence)
135 (synopsis "Widget Toolkit for building GUI")
136 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
137 Graphical User Interfaces easily and effectively. It offers a wide, and
138 growing, collection of Controls, and provides state of the art facilities such
139 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
140 manipulation. FOX also implements icons, images, and user-convenience features
141 such as status line help, and tooltips. Tooltips may even be used for 3D
143 (home-page "http://www.fox-toolkit.org")
144 (license license:lgpl2.1+)))
146 (define-public blender
152 (uri (string-append "https://download.blender.org/source/"
153 "blender-" version ".tar.xz"))
156 "18zbdgas6qf2kmvvlimxgnq7y9kj7hdxcgixrs6fj50x40q01q2d"))))
157 (build-system cmake-build-system)
159 (let ((python-version (version-major+minor (package-version python))))
160 `(;; Test files are very large and not included in the release tarball.
163 (list "-DWITH_CODEC_FFMPEG=ON"
164 "-DWITH_CODEC_SNDFILE=ON"
166 "-DWITH_DOC_MANPAGE=ON"
168 "-DWITH_IMAGE_OPENJPEG=ON"
169 "-DWITH_INPUT_NDOF=ON"
170 "-DWITH_INSTALL_PORTABLE=OFF"
172 "-DWITH_MOD_OCEANSIM=ON"
173 "-DWITH_OPENSUBDIV=ON"
174 "-DWITH_PYTHON_INSTALL=OFF"
175 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
176 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
178 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
179 "/include/python" ,python-version)
180 (string-append "-DPYTHON_VERSION=" ,python-version)
181 (string-append "-DPYTHON_NUMPY_PATH="
182 (assoc-ref %build-inputs "python-numpy")
183 "/lib/python" ,python-version "/site-packages/"))
185 (modify-phases %standard-phases
186 ;; XXX This file doesn't exist in the Git sources but will probably
187 ;; exist in the eventual 2.80 source tarball.
188 (add-after 'unpack 'fix-broken-import
190 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
191 (("import encode_bin") "from . import encode_bin"))
193 (add-after 'set-paths 'add-ilmbase-include-path
194 (lambda* (#:key inputs #:allow-other-keys)
195 ;; OpenEXR propagates ilmbase, but its include files do not appear
196 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
197 ;; the CPATH to satisfy the dependency on "half.h".
199 (string-append (assoc-ref inputs "ilmbase")
201 ":" (or (getenv "CPATH") "")))
205 ("jemalloc" ,jemalloc)
208 ("libxrender" ,libxrender)
209 ("openimageio" ,openimageio)
211 ("opensubdiv" ,opensubdiv)
213 ("openjpeg" ,openjpeg)
214 ("libjpeg" ,libjpeg-turbo)
220 ("libsndfile" ,libsndfile)
221 ("freetype" ,freetype)
225 ("python-numpy" ,python-numpy)
228 (home-page "https://blender.org/")
229 (synopsis "3D graphics creation suite")
231 "Blender is a 3D graphics creation suite. It supports the entirety of
232 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
233 compositing and motion tracking, even video editing and game creation. The
234 application can be customized via its API for Python scripting.")
235 (license license:gpl2+)))
237 (define-public assimp
244 (url "https://github.com/assimp/assimp.git")
245 (commit (string-append "v" version))))
246 (file-name (git-file-name name version))
249 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
250 (build-system cmake-build-system)
253 (home-page "http://www.assimp.org/")
254 (synopsis "Asset import library")
256 "The Open Asset Import Library loads more than 40 3D file formats into
257 one unified data structure. Additionally, assimp features various mesh post
258 processing tools: normals and tangent space generation, triangulation, vertex
259 cache locality optimization, removal of degenerate primitives and duplicate
260 vertices, sorting by primitive type, merging of redundant materials and many
262 (license license:bsd-3)))
271 "https://github.com/CGAL/cgal/releases/download/releases/"
272 "CGAL-" version "/CGAL-" version ".tar.xz"))
275 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
276 (build-system cmake-build-system)
278 '(#:tests? #f)) ; no test target
283 (home-page "https://www.cgal.org/")
284 (synopsis "Computational geometry algorithms library")
286 "CGAL provides easy access to efficient and reliable geometric algorithms
287 in the form of a C++ library. CGAL is used in various areas needing geometric
288 computation, such as: computer graphics, scientific visualization, computer
289 aided design and modeling, geographic information systems, molecular biology,
290 medical imaging, robotics and motion planning, mesh generation, numerical
291 methods, etc. It provides data structures and algorithms such as
292 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
295 ;; The 'LICENSE' file explains that a subset is available under more
296 ;; permissive licenses.
297 (license license:gpl3+)))
299 (define-public ilmbase
306 (url "https://github.com/openexr/openexr")
307 (commit (string-append "v" version))))
308 (file-name (git-file-name "ilmbase" version))
311 "1k50cvi3sk6gf6w713lkk2gv5cvs74vkc7s7k4z6nmyhi4g89w4y"))
312 (patches (search-patches "ilmbase-fix-tests.patch"
313 "ilmbase-fix-test-arm.patch"))))
314 (build-system cmake-build-system)
316 `(#:phases (modify-phases %standard-phases
317 (add-after 'unpack 'change-directory
321 (home-page "https://www.openexr.com/")
322 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
324 "IlmBase provides several utility libraries for C++. Half is a class
325 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
326 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
327 quaternions and other useful 2D and 3D math functions. Iex is an
328 exception-handling library.")
329 (license license:bsd-3)))
339 (url "https://github.com/OGRECave/ogre.git")
340 (commit (string-append "v" version))
341 (recursive? #t))) ;for Dear ImGui submodule
342 (file-name (git-file-name name version))
344 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
345 (build-system cmake-build-system)
348 (modify-phases %standard-phases
349 (add-before 'configure 'pre-configure
350 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
351 ;; a consequence, we cannot suggest ours in configure flags. Fix
353 (lambda* (#:key inputs outputs #:allow-other-keys)
354 (substitute* "CMakeLists.txt"
355 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
358 (let* ((out (assoc-ref %outputs "out"))
360 (string-join (list (string-append out "/lib")
361 (string-append out "/lib/OGRE"))
363 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
364 "-DOGRE_BUILD_DEPENDENCIES=OFF"
365 "-DOGRE_BUILD_TESTS=TRUE"
366 "-DOGRE_INSTALL_DOCS=TRUE"
367 "-DOGRE_INSTALL_SAMPLES=TRUE"
368 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
372 ("googletest" ,googletest-1.8)
373 ("pkg-config" ,pkg-config)))
375 `(("font-dejavu" ,font-dejavu)
376 ("freeimage" ,freeimage)
377 ("freetype" ,freetype)
380 ("libxrandr" ,libxrandr)
384 ("zziplib" ,zziplib)))
385 (synopsis "Scene-oriented, flexible 3D engine written in C++")
387 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
388 flexible 3D engine written in C++ designed to make it easier and more intuitive
389 for developers to produce applications utilising hardware-accelerated 3D
391 (home-page "https://www.ogre3d.org/")
392 (license license:expat)))
394 (define-public openexr
397 (version (package-version ilmbase))
399 (inherit (package-source ilmbase))
400 (file-name (git-file-name "openexr" version))
401 (modules '((guix build utils)))
404 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
408 (build-system cmake-build-system)
411 (modify-phases %standard-phases
412 (add-after 'unpack 'change-directory
416 (add-before 'check 'increase-test-timeout
418 ;; On armhf-linux, we need to override the CTest default
419 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
420 (setenv "CTEST_TEST_TIMEOUT" "2000")
422 ,@(if (not (target-64bit?))
423 `((add-after 'change-directory 'disable-broken-test
424 ;; This test fails on i686. Upstream developers suggest that
425 ;; this test is broken on i686 and can be safely disabled:
426 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
428 (substitute* "IlmImfTest/main.cpp"
429 ((".*testOptimizedInterleavePatterns.*") ""))
433 `(("pkg-config" ,pkg-config)))
435 `(("ilmbase" ,ilmbase) ;used in public headers
436 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
437 (home-page "https://www.openexr.com/")
438 (synopsis "High-dynamic range file format library")
440 "OpenEXR is a high dynamic-range (HDR) image file format developed for
441 use in computer imaging applications. The IlmImf C++ libraries support
442 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
443 (license license:bsd-3)))
445 (define-public openimageio
452 (url "https://github.com/OpenImageIO/oiio.git")
453 (commit (string-append "Release-" version))))
454 (file-name (git-file-name name version))
457 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
458 (build-system cmake-build-system)
459 ;; FIXME: To run all tests successfully, test image sets from multiple
460 ;; third party sources have to be present. For details see
461 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
465 `(("pkg-config" ,pkg-config)))
469 ("libjpeg" ,libjpeg-turbo)
476 (synopsis "C++ library for reading and writing images")
478 "OpenImageIO is a library for reading and writing images, and a bunch of
479 related classes, utilities, and applications. There is a particular emphasis
480 on formats and functionality used in professional, large-scale animation and
481 visual effects work for film.")
482 (home-page "https://www.openimageio.org")
483 (license license:bsd-3)))
485 (define-public openscenegraph
487 (name "openscenegraph")
493 (url "https://github.com/openscenegraph/OpenSceneGraph")
494 (commit (string-append "OpenSceneGraph-" version))))
496 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
497 (file-name (git-file-name name version))))
499 `((upstream-name . "OpenSceneGraph")))
500 (build-system cmake-build-system)
502 `(#:tests? #f ; no test target available
503 ;; Without this flag, 'rd' will be added to the name of the
504 ;; library binaries and break linking with other programs.
505 #:build-type "Release"
507 (list (string-append "-DCMAKE_INSTALL_RPATH="
508 (assoc-ref %outputs "out") "/lib:"
509 (assoc-ref %outputs "out") "/lib64"))))
511 `(("pkg-config" ,pkg-config)
515 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
518 ("libxrandr" ,libxrandr)
521 (synopsis "High-performance real-time graphics toolkit")
523 "The OpenSceneGraph is a high-performance 3D graphics toolkit
524 used by application developers in fields such as visual simulation, games,
525 virtual reality, scientific visualization and modeling.")
526 (home-page "http://www.openscenegraph.org")
527 ;; The 'LICENSE' file explains that the source is licensed under
528 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
529 (license license:lgpl2.1)))
531 ;; We need this for simgear
532 (define-public openscenegraph-3.4
533 (package (inherit openscenegraph)
534 (name "openscenegraph")
540 (url "https://github.com/openscenegraph/OpenSceneGraph")
541 (commit (string-append "OpenSceneGraph-" version))))
542 (file-name (git-file-name name version))
545 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
547 (substitute-keyword-arguments (package-arguments openscenegraph)
548 ((#:configure-flags flags)
550 ;; The jpeg plugin requires conversion between integers and booleans
551 "-DCMAKE_CXX_FLAGS=-fpermissive"
554 `(("libjpeg" ,libjpeg-turbo)
555 ,@(package-inputs openscenegraph)))))
558 (define-public openmw-openscenegraph
559 ;; OpenMW prefers its own fork of openscenegraph:
560 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
561 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
564 (inherit openscenegraph)
565 (version (git-version "3.6" "1" commit))
570 (url "https://github.com/OpenMW/osg/")
572 (file-name (git-file-name (package-name openscenegraph) version))
575 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
577 (substitute-keyword-arguments (package-arguments openscenegraph)
578 ((#:configure-flags flags)
579 ;; As per the above wiki link, the following plugins are enough:
581 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
582 "-DBUILD_OSG_PLUGIN_OSG=1"
583 "-DBUILD_OSG_PLUGIN_DDS=1"
584 "-DBUILD_OSG_PLUGIN_TGA=1"
585 "-DBUILD_OSG_PLUGIN_BMP=1"
586 "-DBUILD_OSG_PLUGIN_JPEG=1"
587 "-DBUILD_OSG_PLUGIN_PNG=1"
588 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
589 ;; The jpeg plugin requires conversion between integers and booleans
590 "-DCMAKE_CXX_FLAGS=-fpermissive")
593 (define-public povray
600 (url "https://github.com/POV-Ray/povray")
601 (commit (string-append "v" version))))
602 (file-name (git-file-name name version))
605 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
606 (modules '((guix build utils)))
609 ;; Delete bundled libraries.
610 (delete-file-recursively "libraries")
612 (build-system gnu-build-system)
614 `(("autoconf" ,autoconf)
615 ("automake" ,automake)
616 ("pkg-config" ,pkg-config)))
619 ("libjpeg" ,libjpeg-turbo)
627 (list "COMPILED_BY=Guix"
628 (string-append "--with-boost-libdir="
629 (assoc-ref %build-inputs "boost") "/lib")
630 "--disable-optimiz-arch")
632 (modify-phases %standard-phases
633 (add-after 'unpack 'run-prebuild
635 (setenv "HOME" (getcwd))
636 (with-directory-excursion "unix"
637 (substitute* "prebuild.sh"
638 (("/bin/sh") (which "sh")))
639 (invoke "sh" "prebuild.sh"))
641 ;; The bootstrap script is run by the prebuild script in the
642 ;; "run-prebuild" phase.
643 (delete 'bootstrap))))
644 (synopsis "Tool for creating three-dimensional graphics")
646 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
647 for producing high-quality computer graphics. @code{POV-Ray} creates
648 three-dimensional, photo-realistic images using a rendering technique called
649 ray-tracing. It reads in a text file containing information describing the
650 objects and lighting in a scene and generates an image of that scene from the
651 view point of a camera also described in the text file. Ray-tracing is not a
652 fast process by any means, but it produces very high quality images with
653 realistic reflections, shading, perspective and other effects.")
654 (home-page "http://www.povray.org/")
655 (license license:agpl3+)))
657 (define-public rapicorn
663 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
664 "rapicorn-" version ".tar.xz"))
667 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
668 (patches (search-patches "rapicorn-isnan.patch"))))
669 (build-system gnu-build-system)
672 (modify-phases %standard-phases
673 (add-after 'unpack 'fix-tests
675 ;; Our grep does not support perl regular expressions.
676 (substitute* "taptool.sh"
677 (("grep -P") "grep -E"))
678 ;; Disable path tests because we cannot access /bin or /sbin.
679 (substitute* "rcore/tests/multitest.cc"
680 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
682 (add-before 'check 'pre-check
684 ;; The test suite requires a running X server (with DISPLAY
685 ;; number 99 or higher).
686 (system "Xvfb :99 &")
687 (setenv "DISPLAY" ":99")
689 (add-after 'unpack 'replace-fhs-paths
691 (substitute* (cons "Makefile.decl"
692 (find-files "." "^Makefile\\.in$"))
693 (("/bin/ls") (which "ls"))
694 (("/usr/bin/env") (which "env")))
696 ;; These libraries are listed in the "Required" section of the pkg-config
699 `(("librsvg" ,librsvg)
703 ("python2-enum34" ,python2-enum34)))
705 `(("gdk-pixbuf" ,gdk-pixbuf)
706 ("libpng" ,libpng-1.2)
707 ("readline" ,readline)
708 ("libcroco" ,libcroco)
710 ("cython" ,python2-cython)))
712 `(("pandoc" ,ghc-pandoc)
716 ("graphviz" ,graphviz)
717 ("intltool" ,intltool)
718 ("pkg-config" ,pkg-config)
719 ("xvfb" ,xorg-server-for-tests)))
720 (home-page "https://rapicorn.testbit.org/")
721 (synopsis "Toolkit for rapid development of user interfaces")
723 "Rapicorn is a toolkit for rapid development of user interfaces in C++
724 and Python. The user interface is designed in a declarative markup language
725 and is connected to the programming logic using data bindings and commands.")
726 (license license:mpl2.0)))
734 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
738 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
739 (build-system cmake-build-system)
740 (arguments '(#:tests? #f)) ;no 'test' target
742 ;; Headers include OpenEXR and IlmBase headers.
743 (propagated-inputs `(("openexr" ,openexr)))
745 (home-page "http://ampasctl.sourceforge.net")
746 (synopsis "Color Transformation Language")
748 "The Color Transformation Language, or CTL, is a small programming
749 language that was designed to serve as a building block for digital color
750 management systems. CTL allows users to describe color transforms in a
751 concise and unambiguous way by expressing them as programs. In order to apply
752 a given transform to an image, the color management system instructs a CTL
753 interpreter to load and run the CTL program that describes the transform. The
754 original and the transformed image constitute the CTL program's input and
757 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
758 ;; and headers use different wording.
759 (license (license:non-copyleft "file://LICENSE"))))
761 (define-public brdf-explorer
762 ;; There are no release tarballs, and not even tags in the repo,
763 ;; so use the latest revision.
764 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
767 (name "brdf-explorer")
768 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
772 (url "https://github.com/wdas/brdf.git")
776 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
777 (file-name (string-append name "-" version "-checkout"))))
778 (build-system gnu-build-system)
780 `(#:phases (modify-phases %standard-phases
782 (lambda* (#:key outputs #:allow-other-keys)
783 (let ((out (assoc-ref outputs "out")))
785 (string-append "prefix=" out)))))
786 (add-after 'install 'wrap-program
787 (lambda* (#:key outputs #:allow-other-keys)
788 (let* ((out (assoc-ref outputs "out"))
789 (bin (string-append out "/bin"))
792 (with-directory-excursion bin
793 (rename-file "brdf" ".brdf-real")
794 (call-with-output-file "brdf"
796 (format port "#!/bin/sh
797 # Run the thing from its home, otherwise it just bails out.
799 exec -a \"$0\" ~a/.brdf-real~%"
801 (chmod "brdf" #o555)))
804 `(("qttools" ,qttools))) ;for 'qmake'
809 ("freeglut" ,freeglut)
811 (home-page "https://www.disneyanimation.com/technology/brdf.html")
813 "Analyze bidirectional reflectance distribution functions (BRDFs)")
815 "BRDF Explorer is an application that allows the development and analysis
816 of bidirectional reflectance distribution functions (BRDFs). It can load and
817 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
818 language), measured material data from the MERL database, and anisotropic
819 measured material data from MIT CSAIL. Graphs and visualizations update in
820 real time as parameters are changed, making it a useful tool for evaluating
821 and understanding different BRDFs (and other component functions).")
822 (license license:ms-pl))))
830 (uri (list (string-append
831 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
834 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
837 ;; Site was discontinued.
838 (string-append "http://www.antigrain.com/agg-"
841 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
842 (patches (search-patches "agg-am_c_prototype.patch"))))
843 (build-system gnu-build-system)
846 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
848 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
850 "--disable-examples")
852 (modify-phases %standard-phases
855 ;; let's call configure from configure phase and not now
856 (substitute* "autogen.sh" (("./configure") "# ./configure"))
857 (invoke "sh" "autogen.sh"))))))
859 `(("pkg-config" ,pkg-config)
861 ("autoconf" ,autoconf)
862 ("automake" ,automake)))
865 ("freetype" ,freetype)
868 ;; Antigrain.com was discontinued.
869 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
870 (synopsis "High-quality 2D graphics rendering engine for C++")
872 "Anti-Grain Geometry is a high quality rendering engine written in C++.
873 It supports sub-pixel resolutions and anti-aliasing. It is also library for
874 rendering SVG graphics.")
875 (license license:gpl2+)))
877 (define-public python-pastel
879 (name "python-pastel")
884 (uri (pypi-uri "pastel" version))
887 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
888 (build-system python-build-system)
890 `(#:phases (modify-phases %standard-phases
892 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
894 `(("python-pytest" ,python-pytest)))
895 (home-page "https://github.com/sdispater/pastel")
896 (synopsis "Library to colorize strings in your terminal")
897 (description "Pastel is a simple library to help you colorize strings in
899 (license license:expat)))
901 (define-public python2-pastel
902 (package-with-python2 python-pastel))
904 (define-public fgallery
912 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
913 "fgallery-" version ".zip"))
916 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
917 (build-system gnu-build-system)
919 `(#:tests? #f ; no tests
921 (modify-phases %standard-phases
925 (lambda* (#:key inputs outputs #:allow-other-keys)
926 (let* ((out (assoc-ref outputs "out"))
927 (bin (string-append out "/bin/"))
928 (share (string-append out "/share/fgallery"))
929 (man (string-append out "/share/man/man1"))
930 (perl5lib (getenv "PERL5LIB"))
931 (script (string-append share "/fgallery")))
932 (define (bin-directory input-name)
933 (string-append (assoc-ref inputs input-name) "/bin"))
936 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
939 (copy-recursively "." share)
941 ;; fgallery copies files from store when it is run. The
942 ;; read-only permissions from the store directories will cause
943 ;; fgallery to fail. Do not preserve file attributes when
944 ;; copying files to prevent it.
947 "'cp', '--no-preserve=all'"))
950 (symlink script (string-append out "/bin/fgallery"))
954 ,(map bin-directory '("imagemagick"
962 `("PERL5LIB" ":" prefix (,perl5lib)))
966 ;; TODO: Add missing optional dependency: facedetect.
968 `(("imagemagick" ,imagemagick)
971 ("libjpeg" ,libjpeg-turbo)
974 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
975 ("perl-image-exiftool" ,perl-image-exiftool)
976 ("jpegoptim" ,jpegoptim)
977 ("pngcrush" ,pngcrush)
979 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
980 (synopsis "Static photo gallery generator")
982 "FGallery is a static, JavaScript photo gallery generator with minimalist
983 look. The result can be uploaded on any web server without additional
985 (license license:gpl2+)))
987 (define-public opensubdiv
994 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
995 (commit (string-append "v" (string-join (string-split version #\.)
997 (file-name (git-file-name name version))
1000 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1001 (build-system cmake-build-system)
1003 `(#:phases (modify-phases %standard-phases
1004 (add-before 'configure 'set-glew-location
1005 (lambda* (#:key inputs #:allow-other-keys)
1006 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1008 (add-before 'check 'start-xorg-server
1009 (lambda* (#:key inputs #:allow-other-keys)
1010 ;; The test suite requires a running X server.
1011 (system (string-append (assoc-ref inputs "xorg-server")
1013 (setenv "DISPLAY" ":1")
1016 `(("xorg-server" ,xorg-server-for-tests)))
1019 ("libxrandr" ,libxrandr)
1020 ("libxcursor" ,libxcursor)
1021 ("libxinerama" ,libxinerama)
1025 (home-page "https://graphics.pixar.com/opensubdiv/")
1026 (synopsis "High performance subdivision surface evaluation")
1027 (description "OpenSubdiv is a set of libraries that implement high
1028 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1029 and GPU architectures.")
1030 (license license:asl2.0)))
1032 (define-public opencsg
1033 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1041 (url "https://github.com/floriankirsch/OpenCSG.git")
1042 (commit (string-append "opencsg-"
1043 (string-map dot-to-dash version)
1045 (file-name (git-file-name name version))
1048 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1049 (build-system gnu-build-system)
1052 (modify-phases %standard-phases
1054 (lambda* (#:key outputs #:allow-other-keys)
1055 (substitute* "src/Makefile"
1056 (("/usr/local") (assoc-ref outputs "out")))
1058 (add-before 'build 'skip-example
1059 (lambda _ (chdir "src") #t)))))
1062 ("freeglut" ,freeglut)))
1063 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1065 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1066 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1067 For example, two shapes can be combined by uniting them, by intersecting them,
1068 or by subtracting one shape from the other.")
1069 (home-page "http://www.opencsg.org/")
1070 (license license:gpl2))))
1072 (define-public coin3D
1073 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1074 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1076 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1080 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1085 (url "https://bitbucket.org/Coin3D/coin")
1086 (changeset changeset)))
1087 (file-name (git-file-name name version))
1089 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1090 (modules '((guix build utils)))
1093 (for-each delete-file
1095 "cfg/wrapmsvc.exe"))
1097 (build-system cmake-build-system)
1099 `(("doxygen" ,doxygen)
1100 ("graphviz" ,graphviz)))
1103 ("freeglut" ,freeglut)
1108 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1109 (string-append "-DBOOST_ROOT="
1110 (assoc-ref %build-inputs "boost")))))
1111 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1113 "High-level 3D visualization library with Open Inventor 2.1 API")
1115 "Coin is a 3D graphics library with an Application Programming Interface
1116 based on the Open Inventor 2.1 API. For those who are not familiar with
1117 Open Inventor, it is a scene-graph based retain-mode rendering and model
1118 interaction library, written in C++, which has become the de facto
1119 standard graphics library for 3D visualization and visual simulation
1120 software in the scientific and engineering community.")
1121 (license license:bsd-3))))
1123 (define-public superfamiconv
1125 (name "superfamiconv")
1131 (url "https://github.com/Optiroc/SuperFamiconv")
1132 (commit (string-append "v" version))))
1133 (file-name (git-file-name name version))
1136 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1137 (build-system gnu-build-system)
1139 `(#:tests? #f ; no tests
1141 (modify-phases %standard-phases
1144 (lambda* (#:key outputs #:allow-other-keys)
1145 (let* ((outdir (assoc-ref outputs "out"))
1146 (bindir (string-append outdir "/bin")))
1147 (install-file "bin/superfamiconv" bindir)
1149 (home-page "https://github.com/Optiroc/SuperFamiconv")
1150 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1151 and PC Engine formats")
1152 (description "SuperFamiconv is a converter for tiled graphics, supporting
1153 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1154 Automated palette selection is supported.")
1155 (license license:expat)))