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–2021 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, 2020 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, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
24 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
25 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
26 ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
27 ;;; Copyright © 2021 Andy Tai <atai@atai.org>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages graphics)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages algebra)
47 #:use-module (gnu packages audio)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages boost)
53 #:use-module (gnu packages cdrom)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages crypto)
57 #:use-module (gnu packages datastructures)
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages flex)
60 #:use-module (gnu packages fonts)
61 #:use-module (gnu packages fontutils)
62 #:use-module (gnu packages freedesktop)
63 #:use-module (gnu packages gettext)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gnome)
68 #:use-module (gnu packages gnunet)
69 #:use-module (gnu packages graphviz)
70 #:use-module (gnu packages gstreamer)
71 #:use-module (gnu packages gtk)
72 #:use-module (gnu packages haskell-xyz)
73 #:use-module (gnu packages image)
74 #:use-module (gnu packages image-processing)
75 #:use-module (gnu packages imagemagick)
76 #:use-module (gnu packages jemalloc)
77 #:use-module (gnu packages kde-frameworks)
78 #:use-module (gnu packages libusb)
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages lua)
81 #:use-module (gnu packages maths)
82 #:use-module (gnu packages mp3)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages pdf)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages photo)
87 #:use-module (gnu packages pkg-config)
88 #:use-module (gnu packages plotutils)
89 #:use-module (gnu packages pretty-print)
90 #:use-module (gnu packages pth)
91 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
92 #:use-module (gnu packages python)
93 #:use-module (gnu packages python-xyz)
94 #:use-module (gnu packages qt)
95 #:use-module (gnu packages readline)
96 #:use-module (gnu packages sdl)
97 #:use-module (gnu packages stb)
98 #:use-module (gnu packages swig)
99 #:use-module (gnu packages tbb)
100 #:use-module (gnu packages upnp)
101 #:use-module (gnu packages video)
102 #:use-module (gnu packages vulkan)
103 #:use-module (gnu packages xiph)
104 #:use-module (gnu packages xml)
105 #:use-module (gnu packages xorg)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (guix build-system copy)
108 #:use-module (guix build-system cmake)
109 #:use-module (guix build-system gnu)
110 #:use-module (guix build-system meson)
111 #:use-module (guix build-system python)
112 #:use-module (guix build-system qt)
113 #:use-module (guix download)
114 #:use-module (guix git-download)
115 #:use-module (guix hg-download)
116 #:use-module ((guix licenses) #:prefix license:)
117 #:use-module (guix packages)
118 #:use-module (guix utils))
120 (define-public eglexternalplatform
122 (name "eglexternalplatform")
129 (url "https://github.com/NVIDIA/eglexternalplatform")
132 (git-file-name name version))
134 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
135 (build-system copy-build-system)
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-pkgconfig
140 (lambda* (#:key outputs #:allow-other-keys)
141 (substitute* "eglexternalplatform.pc"
143 (assoc-ref outputs "out")))
145 (add-after 'install 'revise
146 (lambda* (#:key outputs #:allow-other-keys)
147 (let* ((out (assoc-ref outputs "out")))
148 (mkdir-p (string-append out "/include/EGL"))
150 (string-append out "/interface")
151 (string-append out "/include/EGL"))
152 (mkdir-p (string-append out "/share/pkgconfig"))
154 (string-append out "/eglexternalplatform.pc")
155 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
156 (for-each delete-file-recursively
158 (string-append out "/samples")
159 (string-append out "/COPYING")
160 (string-append out "/README.md"))))
162 (synopsis "EGL External Platform interface")
163 (description "EGLExternalPlatform is an specification of the EGL External
164 Platform interface for writing EGL platforms and their interactions with modern
165 window systems on top of existing low-level EGL platform implementations. This
166 keeps window system implementation specifics out of EGL drivers by using
167 application-facing EGL functions.")
168 (home-page "https://github.com/NVIDIA/eglexternalplatform")
169 (license license:expat)))
171 (define-public egl-wayland
180 (url "https://github.com/NVIDIA/egl-wayland")
183 (git-file-name name version))
185 (base32 "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk"))))
186 (build-system meson-build-system)
188 `(("pkg-config" ,pkg-config)))
191 ("wayland" ,wayland)))
193 `(("eglexternalplatform" ,eglexternalplatform)))
194 (synopsis "EGLStream-based Wayland external platform")
195 (description "EGL-Wayland is an implementation of a EGL External Platform
196 library to add client-side Wayland support to EGL on top of EGLDevice and
197 EGLStream families of extensions.")
198 (home-page "https://github.com/NVIDIA/egl-wayland")
199 (license license:expat)))
210 (url "https://github.com/hodefoting/mmm")
213 (git-file-name name version))
215 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
216 (build-system meson-build-system)
219 ("pkg-config" ,pkg-config)))
224 (synopsis "Memory Mapped Machine")
225 (description "MMM is a shared memory protocol for virtualising access to
226 framebuffer graphics, audio output and input event.")
227 (home-page "https://github.com/hodefoting/mrg")
228 (license license:isc)))
230 (define-public directfb
239 (url "https://github.com/deniskropp/DirectFB")
240 (commit "DIRECTFB_1_7_7")))
241 (file-name (git-file-name name version))
243 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
244 (build-system gnu-build-system)
247 (modify-phases %standard-phases
248 (add-after 'unpack 'disable-configure-during-bootstrap
250 (substitute* "autogen.sh"
251 (("^.*\\$srcdir/configure.*") ""))
254 `(("autoconf" ,autoconf)
255 ("automake" ,automake)
258 ("pkg-config" ,pkg-config)))
262 ("freetype" ,freetype)
264 ("gstreamer" ,gstreamer)
267 ("jpeg" ,libjpeg-turbo)
270 ("libtimidity" ,libtimidity)
271 ("linux-headers" ,linux-libre-headers)
283 ("vorbisfile" ,libvorbis)
287 ("xcomposite" ,libxcomposite)
289 ("xproto" ,xorgproto)
293 (synopsis "DFB Graphics Library")
294 (description "DirectFB is a graphics library which was designed with embedded
295 systems in mind. It offers maximum hardware accelerated performance at a
296 minimum of resource usage and overhead.")
297 (home-page "https://github.com/deniskropp/DirectFB")
298 (license license:lgpl2.1+)))
309 (url "https://github.com/deniskropp/flux")
311 (file-name (git-file-name name version))
313 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
314 (build-system gnu-build-system)
316 `(("autoconf" ,autoconf)
317 ("automake" ,automake)
319 ("pkg-config" ,pkg-config)))
320 (synopsis "Interface description language")
321 (description "Flux is an interface description language used by DirectFB.
322 Fluxcomp compiles .flux files to .cpp or .c files.")
323 (home-page "http://www.directfb.org/")
324 (license license:lgpl2.1+))) ; Same as DirectFB
334 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
336 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
337 (build-system gnu-build-system)
340 (modify-phases %standard-phases
341 (add-after 'unpack 'patch
343 (substitute* "configure"
344 (("-I/usr/include/freetype2")
347 (assoc-ref %build-inputs "freetype")
348 "/include/freetype2"))))
351 `(("doxygen" ,doxygen)))
354 ("freetype" ,freetype)
357 ("jpeg" ,libjpeg-turbo)
361 ("xcursor" ,libxcursor)
363 ("xfixes" ,libxfixes)
366 ("xrandr" ,libxrandr)
367 ("xrender" ,libxrender)
368 ("xshm" ,libxshmfence)
370 (synopsis "Widget Toolkit for building GUI")
371 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
372 Graphical User Interfaces easily and effectively. It offers a wide, and
373 growing, collection of Controls, and provides state of the art facilities such
374 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
375 manipulation. FOX also implements icons, images, and user-convenience features
376 such as status line help, and tooltips. Tooltips may even be used for 3D
378 (home-page "http://www.fox-toolkit.org")
379 (license license:lgpl2.1+)))
381 (define-public autotrace
382 (let ((commit "travis-20190624.59")
383 (version-base "0.40.0"))
386 (version (string-append version-base "-"
387 (if (string-prefix? "travis-" commit)
388 (string-drop commit 7)
393 (url "https://github.com/autotrace/autotrace")
395 (file-name (git-file-name name version))
398 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
399 (build-system gnu-build-system)
401 `(#:phases (modify-phases %standard-phases
402 ;; See: https://github.com/autotrace/autotrace/issues/27.
403 (add-after 'unpack 'include-spline.h-header
405 (substitute* "Makefile.am"
406 ((".*src/types.h.*" all)
407 (string-append all "\t\tsrc/spline.h \\\n")))
409 ;; See: https://github.com/autotrace/autotrace/issues/26.
412 (invoke "sh" "tests/runtests.sh"))))))
415 ("pkg-config" ,pkg-config)
416 ("autoconf" ,autoconf)
417 ("automake" ,automake)
418 ("intltool" ,intltool)
420 ("gettext" ,gettext-minimal)))
423 ("libjpeg" ,libjpeg-turbo)
425 ("imagemagick" ,imagemagick)
426 ("pstoedit" ,pstoedit)))
427 (home-page "https://github.com/autotrace/autotrace")
428 (synopsis "Bitmap to vector graphics converter")
429 (description "AutoTrace is a utility for converting bitmap into vector
430 graphics. It can trace outlines and midlines, effect color reduction or
431 despeckling and has support for many input and output formats. It can be used
432 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
433 (license (list license:gpl2+ ;for the utility itself
434 license:lgpl2.1+))))) ;for use as a library
436 (define-public embree
443 (url "https://github.com/embree/embree")
444 (commit (string-append "v" version))))
445 (file-name (git-file-name name version))
448 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
449 (build-system cmake-build-system)
451 `(#:tests? #f ; no tests (apparently)
454 "-DEMBREE_ISPC_SUPPORT=OFF")))
458 (home-page "https://www.embree.org/")
459 (synopsis "High performance ray tracing kernels")
461 "Embree is a collection of high-performance ray tracing kernels.
462 Embree is meant to increase performance of photo-realistic rendering
464 (license license:asl2.0)))
466 (define-public blender
472 (uri (string-append "https://download.blender.org/source/"
473 "blender-" version ".tar.xz"))
476 "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm"))))
477 (build-system cmake-build-system)
479 (let ((python-version (version-major+minor (package-version python))))
480 `(;; Test files are very large and not included in the release tarball.
483 (list "-DWITH_CODEC_FFMPEG=ON"
484 "-DWITH_CODEC_SNDFILE=ON"
486 "-DWITH_DOC_MANPAGE=ON"
488 "-DWITH_IMAGE_OPENJPEG=ON"
489 "-DWITH_INPUT_NDOF=ON"
490 "-DWITH_INSTALL_PORTABLE=OFF"
492 "-DWITH_MOD_OCEANSIM=ON"
493 "-DWITH_OPENSUBDIV=ON"
494 "-DWITH_PYTHON_INSTALL=OFF"
495 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
496 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
498 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
499 "/include/python" ,python-version)
500 (string-append "-DPYTHON_VERSION=" ,python-version)
501 (string-append "-DPYTHON_NUMPY_PATH="
502 (assoc-ref %build-inputs "python-numpy")
503 "/lib/python" ,python-version "/site-packages/"))
505 (modify-phases %standard-phases
506 ;; XXX This file doesn't exist in the Git sources but will probably
507 ;; exist in the eventual 2.80 source tarball.
508 (add-after 'unpack 'fix-broken-import
510 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
511 (("import encode_bin") "from . import encode_bin"))
513 (add-after 'set-paths 'add-ilmbase-include-path
514 (lambda* (#:key inputs #:allow-other-keys)
515 ;; OpenEXR propagates ilmbase, but its include files do not appear
516 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
517 ;; the CPATH to satisfy the dependency on "half.h".
519 (string-append (assoc-ref inputs "ilmbase")
521 ":" (or (getenv "CPATH") "")))
525 ("jemalloc" ,jemalloc)
528 ("libxrender" ,libxrender)
529 ("opencolorio" ,opencolorio)
530 ("openimageio" ,openimageio)
532 ("opensubdiv" ,opensubdiv)
534 ("openjpeg" ,openjpeg)
535 ("libjpeg" ,libjpeg-turbo)
541 ("libsndfile" ,libsndfile)
542 ("freetype" ,freetype)
547 ("python-numpy" ,python-numpy)
551 (home-page "https://blender.org/")
552 (synopsis "3D graphics creation suite")
554 "Blender is a 3D graphics creation suite. It supports the entirety of
555 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
556 compositing and motion tracking, even video editing and game creation. The
557 application can be customized via its API for Python scripting.")
558 (license license:gpl2+)))
560 (define-public blender-2.79
566 (uri (string-append "https://download.blender.org/source/"
567 "blender-" version ".tar.gz"))
570 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
571 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
572 "blender-2.79-oiio2.patch"
573 ;; The following patches may be
574 ;; needed when the default GCC is
576 ;; "blender-2.79-gcc8.patch"
577 ;; "blender-2.79-gcc9.patch"
578 "blender-2.79-python-3.7-fix.patch"
579 "blender-2.79-python-3.8-fix.patch"))))
580 (build-system cmake-build-system)
582 (let ((python-version (version-major+minor (package-version python))))
583 `(;; Test files are very large and not included in the release tarball.
586 (list "-DWITH_CODEC_FFMPEG=ON"
587 "-DWITH_CODEC_SNDFILE=ON"
589 "-DWITH_DOC_MANPAGE=ON"
591 "-DWITH_GAMEENGINE=ON"
592 "-DWITH_IMAGE_OPENJPEG=ON"
593 "-DWITH_INPUT_NDOF=ON"
594 "-DWITH_INSTALL_PORTABLE=OFF"
596 "-DWITH_MOD_OCEANSIM=ON"
598 "-DWITH_PYTHON_INSTALL=OFF"
599 "-DWITH_PYTHON_INSTALL=OFF"
600 "-DWITH_SYSTEM_OPENJPEG=ON"
601 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
602 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
604 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
605 "/include/python" ,python-version)
606 (string-append "-DPYTHON_VERSION=" ,python-version))
608 (modify-phases %standard-phases
609 (add-after 'unpack 'fix-broken-import
611 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
612 (("import encode_bin") "from . import encode_bin"))
614 (add-after 'set-paths 'add-ilmbase-include-path
615 (lambda* (#:key inputs #:allow-other-keys)
616 ;; OpenEXR propagates ilmbase, but its include files do not appear
617 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
618 ;; the CPATH to satisfy the dependency on "half.h".
620 (string-append (assoc-ref inputs "ilmbase")
622 ":" (or (getenv "CPATH") "")))
626 ("jemalloc" ,jemalloc)
628 ("opencolorio" ,opencolorio)
629 ("openimageio" ,openimageio)
632 ("openjpeg" ,openjpeg)
633 ("libjpeg" ,libjpeg-turbo)
639 ("libsndfile" ,libsndfile)
640 ("freetype" ,freetype)
646 (home-page "https://blender.org/")
647 (synopsis "3D graphics creation suite")
649 "Blender is a 3D graphics creation suite. It supports the entirety of
650 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
651 compositing and motion tracking, even video editing and game creation. The
652 application can be customized via its API for Python scripting.
654 NOTE: This older version of Blender is the last release that does not require
655 OpenGL 3. It is retained for use with older computers.")
656 (license license:gpl2+)))
665 (url "https://github.com/guillaumechereau/goxel")
666 (commit (string-append "v" version))))
667 (file-name (git-file-name name version))
670 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
671 (build-system gnu-build-system)
674 #:phases (modify-phases %standard-phases (delete 'configure))
675 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
678 `(("pkg-config" ,pkg-config)))
683 (home-page "https://goxel.xyz/")
684 (synopsis "Voxel editor")
686 "Goxel is a voxel editor that features unlimited scene size, unlimited
687 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
688 and export to various formats including the format used by Magicavoxel.")
689 (license license:gpl3+)))
691 (define-public assimp
698 (url "https://github.com/assimp/assimp")
699 (commit (string-append "v" version))))
700 (file-name (git-file-name name version))
703 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
704 (build-system cmake-build-system)
707 (home-page "http://www.assimp.org/")
708 (synopsis "Asset import library")
710 "The Open Asset Import Library loads more than 40 3D file formats into
711 one unified data structure. Additionally, assimp features various mesh post
712 processing tools: normals and tangent space generation, triangulation, vertex
713 cache locality optimization, removal of degenerate primitives and duplicate
714 vertices, sorting by primitive type, merging of redundant materials and many
716 (license license:bsd-3)))
725 "https://github.com/CGAL/cgal/releases/download/releases/"
726 "CGAL-" version "/CGAL-" version ".tar.xz"))
729 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
730 (build-system cmake-build-system)
732 '(#:tests? #f)) ; no test target
737 (home-page "https://www.cgal.org/")
738 (synopsis "Computational geometry algorithms library")
740 "CGAL provides easy access to efficient and reliable geometric algorithms
741 in the form of a C++ library. CGAL is used in various areas needing geometric
742 computation, such as: computer graphics, scientific visualization, computer
743 aided design and modeling, geographic information systems, molecular biology,
744 medical imaging, robotics and motion planning, mesh generation, numerical
745 methods, etc. It provides data structures and algorithms such as
746 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
749 ;; The 'LICENSE' file explains that a subset is available under more
750 ;; permissive licenses.
751 (license license:gpl3+)))
753 (define-public ilmbase
760 (url "https://github.com/openexr/openexr")
761 (commit (string-append "v" version))))
762 (file-name (git-file-name "ilmbase" version))
765 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
766 (patches (search-patches "ilmbase-fix-tests.patch"))))
767 (build-system cmake-build-system)
769 `(#:phases (modify-phases %standard-phases
770 (add-after 'unpack 'change-directory
774 (home-page "https://www.openexr.com/")
775 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
777 "IlmBase provides several utility libraries for C++. Half is a class
778 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
779 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
780 quaternions and other useful 2D and 3D math functions. Iex is an
781 exception-handling library.")
782 (license license:bsd-3)))
784 (define-public lib2geom
785 ;; Use the latest master commit, as the 1.0 release suffer build problems.
787 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
790 (version (git-version "1.0" revision commit))
794 (url "https://gitlab.com/inkscape/lib2geom.git")
796 (file-name (git-file-name name version))
799 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
801 ;; Patch submitted to upstream (see:
802 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
803 (search-patches "lib2geom-fix-tests.patch"))
804 (modules '((guix build utils)))
807 ;; Fix py2geom module initialization (see:
808 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
809 (substitute* "src/py2geom/__init__.py"
810 (("_py2geom") "py2geom._py2geom"))
812 (build-system cmake-build-system)
814 `(#:imported-modules ((guix build python-build-system)
815 ,@%cmake-build-system-modules)
816 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
817 "-D2GEOM_BOOST_PYTHON=ON"
818 ;; Compiling the Cython bindings fail (see:
819 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
820 "-D2GEOM_CYTHON_BINDINGS=OFF")
822 (modify-phases %standard-phases
823 (add-after 'unpack 'patch-python-lib-install-path
824 (lambda* (#:key inputs outputs #:allow-other-keys)
825 (let* ((python-version (@ (guix build python-build-system)
827 (python-maj-min-version (python-version
828 (assoc-ref inputs "python")))
829 (site-package (string-append
830 (assoc-ref outputs "out")
831 "/lib/python" python-maj-min-version
833 (substitute* '("src/cython/CMakeLists.txt"
834 "src/py2geom/CMakeLists.txt")
835 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
836 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
838 (native-inputs `(("python" ,python-wrapper)
839 ("googletest" ,googletest)
840 ("pkg-config" ,pkg-config)))
841 (inputs `(("cairo" ,cairo)
842 ("pycairo" ,python-pycairo)
843 ("double-conversion" ,double-conversion)
847 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
848 (home-page "https://gitlab.com/inkscape/lib2geom/")
849 (synopsis "C++ 2D graphics library")
850 (description "2geom is a C++ library of mathematics for paths, curves,
851 and other geometric calculations. Designed for vector graphics, it tackles
852 Bézier curves, conic sections, paths, intersections, transformations, and
854 ;; Because the library is linked with the GNU Scientific Library
855 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
856 ;; https://gitlab.com/inkscape/inkscape/issues/784).
857 (license license:gpl3+))))
859 (define-public pstoedit
865 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
866 version "/pstoedit-" version ".tar.gz"))
869 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
870 (build-system gnu-build-system)
872 `(("pkg-config" ,pkg-config)))
874 `(("ghostscript" ,ghostscript)
875 ("imagemagick" ,imagemagick)
876 ("libplot" ,plotutils)
877 ("libjpeg" ,libjpeg-turbo)
878 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
879 (home-page "http://www.pstoedit.net/")
880 (synopsis "Converter for PostScript and PDF graphics")
881 (description "The @code{pstoedit} utility allows translating graphics
882 in the PostScript or PDF (Portable Document Format) formats to various
883 other vector formats such as:
888 @item Flattened PostScript
889 @item DXF, a CAD (Computed-Aided Design) exchange format
890 @item PIC (for troff/groff)
891 @item MetaPost (for usage with TeX/LaTeX)
892 @item LaTeX2e picture
893 @item GNU Metafile (for use with plotutils/libplot)
894 @item Any format supported by ImageMagick
896 (license license:gpl2+)))
898 (define-public dear-imgui
906 (url "https://github.com/ocornut/imgui")
907 (commit (string-append "v" version))))
908 (file-name (git-file-name name version))
910 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
911 (build-system gnu-build-system)
914 (list (string-append "CC=" ,(cc-for-target))
915 (string-append "PREFIX=" (assoc-ref %outputs "out"))
916 (string-append "VERSION=" ,version))
917 #:tests? #f ; no test suite
919 (modify-phases %standard-phases
920 (add-after 'unpack 'unpack-debian-files
921 (lambda* (#:key inputs #:allow-other-keys)
922 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
923 (apply invoke "patch" "-Np1" "-i"
924 (find-files "debian/patches" "\\.patch$"))
925 (substitute* "Makefile"
926 (("<stb/") "<") ; Guix doesn't use this subdirectory
927 ;; Don't build or install the static library.
928 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
929 (substitute* (list "imgui.pc.in"
931 ;; Don't link against a non-existent library.
934 (delete 'configure) ; no configure script
936 ;; The default ‘install’ target installs the static library. Don't.
937 (lambda* (#:key make-flags #:allow-other-keys)
938 (apply invoke "make" "install-shared" "install-header"
942 ;; Upstream doesn't provide a build system. Use Debian's.
945 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
946 version "+ds-1.debian.tar.xz"))
948 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
949 ("pkg-config" ,pkg-config)))
951 `(("freetype" ,freetype)
952 ("stb-rect-pack" ,stb-rect-pack)
953 ("stb-truetype" ,stb-truetype)))
954 (home-page "https://github.com/ocornut/imgui")
955 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
957 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
958 It creates optimized vertex buffers that you can render anytime in your
959 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
960 self-contained, without external dependencies.
962 Dear ImGui is aimed at content creation, visualization, and debugging tools as
963 opposed to average end-user interfaces. Hence it favors simplicity and
964 productivity but lacks certain features often found in higher-level libraries.
965 It is particularly suited to integration in game engine tooling, real-time 3D
966 applications, full-screen applications, and embedded platforms without standard
967 operating system features.")
968 (license license:expat))) ; some examples/ use the zlib licence
978 (url "https://github.com/OGRECave/ogre")
979 (commit (string-append "v" version))))
980 (file-name (git-file-name name version))
982 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
983 (build-system cmake-build-system)
986 (modify-phases %standard-phases
987 (add-before 'configure 'unpack-dear-imgui
988 (lambda* (#:key inputs #:allow-other-keys)
989 (copy-recursively (assoc-ref inputs "dear-imgui-source")
990 "../dear-imgui-source")
992 (add-before 'configure 'pre-configure
993 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
994 ;; a consequence, we cannot suggest ours in configure flags. Fix
996 (lambda* (#:key inputs outputs #:allow-other-keys)
997 (substitute* "CMakeLists.txt"
998 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1001 (let* ((out (assoc-ref %outputs "out"))
1003 (string-join (list (string-append out "/lib")
1004 (string-append out "/lib/OGRE"))
1006 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1007 "-DIMGUI_DIR=../dear-imgui-source"
1008 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1009 "-DOGRE_BUILD_TESTS=TRUE"
1010 "-DOGRE_INSTALL_DOCS=TRUE"
1011 "-DOGRE_INSTALL_SAMPLES=TRUE"
1012 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1015 ("dear-imgui-source" ,(package-source dear-imgui))
1016 ("doxygen" ,doxygen)
1017 ("googletest" ,googletest-1.8)
1018 ("pkg-config" ,pkg-config)))
1020 `(("font-dejavu" ,font-dejavu)
1021 ("freeimage" ,freeimage)
1022 ("freetype" ,freetype)
1025 ("libxrandr" ,libxrandr)
1026 ("pugixml" ,pugixml)
1028 ("tinyxml" ,tinyxml)
1029 ("zziplib" ,zziplib)))
1030 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1032 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1033 flexible 3D engine written in C++ designed to make it easier and more intuitive
1034 for developers to produce applications utilising hardware-accelerated 3D
1036 (home-page "https://www.ogre3d.org/")
1037 (license license:expat)))
1039 (define-public openexr
1042 (version (package-version ilmbase))
1044 (inherit (package-source ilmbase))
1045 (file-name (git-file-name "openexr" version))
1046 (modules '((guix build utils)))
1049 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1053 (build-system cmake-build-system)
1056 (modify-phases %standard-phases
1057 (add-after 'unpack 'change-directory
1061 (add-after 'change-directory 'increase-test-timeout
1063 ;; On armhf-linux, we need to override the CTest default
1064 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1065 (substitute* "IlmImfTest/CMakeLists.txt"
1066 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1069 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1071 ,@(if (not (target-64bit?))
1072 `((add-after 'change-directory 'disable-broken-test
1073 ;; This test fails on i686. Upstream developers suggest that
1074 ;; this test is broken on i686 and can be safely disabled:
1075 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1077 (substitute* "IlmImfTest/main.cpp"
1078 ((".*testOptimizedInterleavePatterns.*") ""))
1082 `(("pkg-config" ,pkg-config)))
1084 `(("ilmbase" ,ilmbase) ;used in public headers
1085 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1086 (home-page "https://www.openexr.com/")
1087 (synopsis "High-dynamic range file format library")
1089 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1090 use in computer imaging applications. The IlmImf C++ libraries support
1091 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1092 (license license:bsd-3)))
1094 (define-public openimageio
1096 (name "openimageio")
1097 (version "2.2.10.1")
1101 (url "https://github.com/OpenImageIO/oiio")
1102 (commit (string-append "Release-" version))))
1103 (file-name (git-file-name name version))
1106 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1107 (build-system cmake-build-system)
1108 ;; FIXME: To run all tests successfully, test image sets from multiple
1109 ;; third party sources have to be present. For details see
1110 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1113 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1115 `(("pkg-config" ,pkg-config)))
1120 ("libjpeg" ,libjpeg-turbo)
1121 ("libtiff" ,libtiff)
1123 ("openexr" ,openexr)
1124 ("ilmbase" ,ilmbase)
1125 ("pugixml" ,pugixml)
1126 ("python" ,python-wrapper)
1127 ("pybind11" ,pybind11)
1128 ("robin-map" ,robin-map)
1130 (synopsis "C++ library for reading and writing images")
1132 "OpenImageIO is a library for reading and writing images, and a bunch of
1133 related classes, utilities, and applications. There is a particular emphasis
1134 on formats and functionality used in professional, large-scale animation and
1135 visual effects work for film.")
1136 (home-page "https://www.openimageio.org")
1137 (license license:bsd-3)))
1139 (define-public openscenegraph
1141 (name "openscenegraph")
1147 (url "https://github.com/openscenegraph/OpenSceneGraph")
1148 (commit (string-append "OpenSceneGraph-" version))))
1150 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1151 (file-name (git-file-name name version))))
1153 `((upstream-name . "OpenSceneGraph")))
1154 (build-system cmake-build-system)
1156 `(#:tests? #f ; no test target available
1157 ;; Without this flag, 'rd' will be added to the name of the
1158 ;; library binaries and break linking with other programs.
1159 #:build-type "Release"
1161 (list (string-append "-DCMAKE_INSTALL_RPATH="
1162 (assoc-ref %outputs "out") "/lib:"
1163 (assoc-ref %outputs "out") "/lib64"))))
1165 `(("pkg-config" ,pkg-config)
1168 `(("giflib" ,giflib)
1169 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1171 ("librsvg" ,librsvg)
1172 ("libxrandr" ,libxrandr)
1175 (synopsis "High-performance real-time graphics toolkit")
1177 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1178 used by application developers in fields such as visual simulation, games,
1179 virtual reality, scientific visualization and modeling.")
1180 (home-page "http://www.openscenegraph.org")
1181 ;; The 'LICENSE' file explains that the source is licensed under
1182 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1183 (license license:lgpl2.1)))
1185 ;; We need this for simgear
1186 (define-public openscenegraph-3.4
1187 (package (inherit openscenegraph)
1188 (name "openscenegraph")
1194 (url "https://github.com/openscenegraph/OpenSceneGraph")
1195 (commit (string-append "OpenSceneGraph-" version))))
1196 (file-name (git-file-name name version))
1199 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1201 (substitute-keyword-arguments (package-arguments openscenegraph)
1202 ((#:configure-flags flags)
1204 ;; The jpeg plugin requires conversion between integers and booleans
1205 "-DCMAKE_CXX_FLAGS=-fpermissive"
1208 `(("libjpeg" ,libjpeg-turbo)
1209 ,@(package-inputs openscenegraph)))))
1212 (define-public openmw-openscenegraph
1213 ;; OpenMW prefers its own fork of openscenegraph:
1214 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1215 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1218 (inherit openscenegraph)
1219 (version (git-version "3.6" "1" commit))
1224 (url "https://github.com/OpenMW/osg/")
1226 (file-name (git-file-name (package-name openscenegraph) version))
1229 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1231 (substitute-keyword-arguments (package-arguments openscenegraph)
1232 ((#:configure-flags flags)
1233 ;; As per the above wiki link, the following plugins are enough:
1235 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1236 "-DBUILD_OSG_PLUGIN_OSG=1"
1237 "-DBUILD_OSG_PLUGIN_DDS=1"
1238 "-DBUILD_OSG_PLUGIN_TGA=1"
1239 "-DBUILD_OSG_PLUGIN_BMP=1"
1240 "-DBUILD_OSG_PLUGIN_JPEG=1"
1241 "-DBUILD_OSG_PLUGIN_PNG=1"
1242 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1243 ;; The jpeg plugin requires conversion between integers and booleans
1244 "-DCMAKE_CXX_FLAGS=-fpermissive")
1247 (define-public povray
1254 (url "https://github.com/POV-Ray/povray")
1255 (commit (string-append "v" version))))
1256 (file-name (git-file-name name version))
1259 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1260 (modules '((guix build utils)))
1263 ;; Delete bundled libraries.
1264 (delete-file-recursively "libraries")
1266 (build-system gnu-build-system)
1268 `(("autoconf" ,autoconf)
1269 ("automake" ,automake)
1270 ("pkg-config" ,pkg-config)))
1273 ("libjpeg" ,libjpeg-turbo)
1275 ("libtiff" ,libtiff)
1276 ("openexr" ,openexr)
1281 (list "COMPILED_BY=Guix"
1282 (string-append "--with-boost-libdir="
1283 (assoc-ref %build-inputs "boost") "/lib")
1284 "--disable-optimiz-arch")
1286 (modify-phases %standard-phases
1287 (add-after 'unpack 'run-prebuild
1289 (setenv "HOME" (getcwd))
1290 (with-directory-excursion "unix"
1291 (substitute* "prebuild.sh"
1292 (("/bin/sh") (which "sh")))
1293 (invoke "sh" "prebuild.sh"))
1295 ;; The bootstrap script is run by the prebuild script in the
1296 ;; "run-prebuild" phase.
1297 (delete 'bootstrap))))
1298 (synopsis "Tool for creating three-dimensional graphics")
1300 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1301 for producing high-quality computer graphics. @code{POV-Ray} creates
1302 three-dimensional, photo-realistic images using a rendering technique called
1303 ray-tracing. It reads in a text file containing information describing the
1304 objects and lighting in a scene and generates an image of that scene from the
1305 view point of a camera also described in the text file. Ray-tracing is not a
1306 fast process by any means, but it produces very high quality images with
1307 realistic reflections, shading, perspective and other effects.")
1308 (home-page "http://www.povray.org/")
1309 (license license:agpl3+)))
1311 (define-public rapicorn
1317 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1318 "rapicorn-" version ".tar.xz"))
1321 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1322 (patches (search-patches "rapicorn-isnan.patch"))))
1323 (build-system gnu-build-system)
1326 (modify-phases %standard-phases
1327 (add-after 'unpack 'fix-tests
1329 ;; Our grep does not support perl regular expressions.
1330 (substitute* "taptool.sh"
1331 (("grep -P") "grep -E"))
1332 ;; Disable path tests because we cannot access /bin or /sbin.
1333 (substitute* "rcore/tests/multitest.cc"
1334 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1336 (add-before 'check 'pre-check
1338 ;; The test suite requires a running X server (with DISPLAY
1339 ;; number 99 or higher).
1340 (system "Xvfb :99 &")
1341 (setenv "DISPLAY" ":99")
1343 (add-after 'unpack 'replace-fhs-paths
1345 (substitute* (cons "Makefile.decl"
1346 (find-files "." "^Makefile\\.in$"))
1347 (("/bin/ls") (which "ls"))
1348 (("/usr/bin/env") (which "env")))
1350 ;; These libraries are listed in the "Required" section of the pkg-config
1353 `(("librsvg" ,librsvg)
1356 ("libxml2" ,libxml2)
1357 ("python2-enum34" ,python2-enum34)))
1359 `(("gdk-pixbuf" ,gdk-pixbuf)
1360 ("libpng" ,libpng-1.2)
1361 ("readline" ,readline)
1362 ("libcroco" ,libcroco)
1363 ("python" ,python-2)
1364 ("cython" ,python2-cython)))
1366 `(("pandoc" ,pandoc)
1369 ("doxygen" ,doxygen)
1370 ("graphviz" ,graphviz)
1371 ("intltool" ,intltool)
1372 ("pkg-config" ,pkg-config)
1373 ("xvfb" ,xorg-server-for-tests)))
1374 (home-page "https://rapicorn.testbit.org/")
1375 (synopsis "Toolkit for rapid development of user interfaces")
1377 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1378 and Python. The user interface is designed in a declarative markup language
1379 and is connected to the programming logic using data bindings and commands.")
1380 (license license:mpl2.0)))
1388 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1392 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1393 (build-system cmake-build-system)
1394 (arguments '(#:tests? #f)) ;no 'test' target
1396 ;; Headers include OpenEXR and IlmBase headers.
1397 (propagated-inputs `(("openexr" ,openexr)))
1399 (home-page "http://ampasctl.sourceforge.net")
1400 (synopsis "Color Transformation Language")
1402 "The Color Transformation Language, or CTL, is a small programming
1403 language that was designed to serve as a building block for digital color
1404 management systems. CTL allows users to describe color transforms in a
1405 concise and unambiguous way by expressing them as programs. In order to apply
1406 a given transform to an image, the color management system instructs a CTL
1407 interpreter to load and run the CTL program that describes the transform. The
1408 original and the transformed image constitute the CTL program's input and
1411 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1412 ;; and headers use different wording.
1413 (license (license:non-copyleft "file://LICENSE"))))
1415 (define-public brdf-explorer
1416 ;; There are no release tarballs, and not even tags in the repo,
1417 ;; so use the latest revision.
1418 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1421 (name "brdf-explorer")
1422 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1426 (url "https://github.com/wdas/brdf")
1430 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1431 (file-name (string-append name "-" version "-checkout"))))
1432 (build-system gnu-build-system)
1434 `(#:phases (modify-phases %standard-phases
1436 (lambda* (#:key outputs #:allow-other-keys)
1437 (let ((out (assoc-ref outputs "out")))
1439 (string-append "prefix=" out)))))
1440 (add-after 'install 'wrap-program
1441 (lambda* (#:key outputs #:allow-other-keys)
1442 (let* ((out (assoc-ref outputs "out"))
1443 (bin (string-append out "/bin"))
1444 (data (string-append
1445 out "/share/brdf")))
1446 (with-directory-excursion bin
1447 (rename-file "brdf" ".brdf-real")
1448 (call-with-output-file "brdf"
1450 (format port "#!/bin/sh
1451 # Run the thing from its home, otherwise it just bails out.
1453 exec -a \"$0\" ~a/.brdf-real~%"
1455 (chmod "brdf" #o555)))
1458 `(("qttools" ,qttools))) ;for 'qmake'
1460 `(("qtbase" ,qtbase)
1463 ("freeglut" ,freeglut)
1465 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1467 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1469 "BRDF Explorer is an application that allows the development and analysis
1470 of bidirectional reflectance distribution functions (BRDFs). It can load and
1471 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1472 language), measured material data from the MERL database, and anisotropic
1473 measured material data from MIT CSAIL. Graphs and visualizations update in
1474 real time as parameters are changed, making it a useful tool for evaluating
1475 and understanding different BRDFs (and other component functions).")
1476 (license license:ms-pl))))
1484 (uri (list (string-append
1485 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1488 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1491 ;; Site was discontinued.
1492 (string-append "http://www.antigrain.com/agg-"
1493 version ".tar.gz")))
1495 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1496 (patches (search-patches "agg-am_c_prototype.patch"))))
1497 (build-system gnu-build-system)
1500 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1502 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1504 "--disable-examples")
1506 (modify-phases %standard-phases
1509 ;; let's call configure from configure phase and not now
1510 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1511 (invoke "sh" "autogen.sh"))))))
1513 `(("pkg-config" ,pkg-config)
1514 ("libtool" ,libtool)
1515 ("autoconf" ,autoconf)
1516 ("automake" ,automake)))
1518 `(("libx11" ,libx11)
1519 ("freetype" ,freetype)
1522 ;; Antigrain.com was discontinued.
1523 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1524 (synopsis "High-quality 2D graphics rendering engine for C++")
1526 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1527 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1528 rendering SVG graphics.")
1529 (license license:gpl2+)))
1531 (define-public python-pastel
1533 (name "python-pastel")
1538 (uri (pypi-uri "pastel" version))
1541 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1542 (build-system python-build-system)
1544 `(#:phases (modify-phases %standard-phases
1546 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1548 `(("python-pytest" ,python-pytest)))
1549 (home-page "https://github.com/sdispater/pastel")
1550 (synopsis "Library to colorize strings in your terminal")
1551 (description "Pastel is a simple library to help you colorize strings in
1553 (license license:expat)))
1555 (define-public python2-pastel
1556 (package-with-python2 python-pastel))
1558 (define-public fgallery
1566 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1567 "fgallery-" version ".zip"))
1570 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1571 (build-system gnu-build-system)
1573 `(#:tests? #f ; no tests
1575 (modify-phases %standard-phases
1579 (lambda* (#:key inputs outputs #:allow-other-keys)
1580 (let* ((out (assoc-ref outputs "out"))
1581 (bin (string-append out "/bin/"))
1582 (share (string-append out "/share/fgallery"))
1583 (man (string-append out "/share/man/man1"))
1584 (perl5lib (getenv "PERL5LIB"))
1585 (script (string-append share "/fgallery")))
1586 (define (bin-directory input-name)
1587 (string-append (assoc-ref inputs input-name) "/bin"))
1590 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1593 (copy-recursively "." share)
1595 ;; fgallery copies files from store when it is run. The
1596 ;; read-only permissions from the store directories will cause
1597 ;; fgallery to fail. Do not preserve file attributes when
1598 ;; copying files to prevent it.
1601 "'cp', '--no-preserve=all'"))
1604 (symlink script (string-append out "/bin/fgallery"))
1606 (wrap-program script
1608 ,(map bin-directory '("imagemagick"
1616 `("PERL5LIB" ":" prefix (,perl5lib)))
1619 `(("unzip" ,unzip)))
1620 ;; TODO: Add missing optional dependency: facedetect.
1622 `(("imagemagick" ,imagemagick)
1625 ("libjpeg" ,libjpeg-turbo)
1628 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1629 ("perl-image-exiftool" ,perl-image-exiftool)
1630 ("jpegoptim" ,jpegoptim)
1631 ("pngcrush" ,pngcrush)
1633 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1634 (synopsis "Static photo gallery generator")
1636 "FGallery is a static, JavaScript photo gallery generator with minimalist
1637 look. The result can be uploaded on any web server without additional
1639 (license license:gpl2+)))
1641 (define-public opensubdiv
1648 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1649 (commit (string-append "v" (string-join (string-split version #\.)
1651 (file-name (git-file-name name version))
1654 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1655 (build-system cmake-build-system)
1657 `(#:phases (modify-phases %standard-phases
1658 (add-before 'configure 'set-glew-location
1659 (lambda* (#:key inputs #:allow-other-keys)
1660 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1662 (add-before 'check 'start-xorg-server
1663 (lambda* (#:key inputs #:allow-other-keys)
1664 ;; The test suite requires a running X server.
1665 (system (string-append (assoc-ref inputs "xorg-server")
1667 (setenv "DISPLAY" ":1")
1670 `(("xorg-server" ,xorg-server-for-tests)))
1673 ("libxrandr" ,libxrandr)
1674 ("libxcursor" ,libxcursor)
1675 ("libxinerama" ,libxinerama)
1679 (home-page "https://graphics.pixar.com/opensubdiv/")
1680 (synopsis "High performance subdivision surface evaluation")
1681 (description "OpenSubdiv is a set of libraries that implement high
1682 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1683 and GPU architectures.")
1684 (license license:asl2.0)))
1686 (define-public opencsg
1687 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1695 (url "https://github.com/floriankirsch/OpenCSG")
1696 (commit (string-append "opencsg-"
1697 (string-map dot-to-dash version)
1699 (file-name (git-file-name name version))
1702 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1703 (build-system gnu-build-system)
1706 (modify-phases %standard-phases
1708 (lambda* (#:key outputs #:allow-other-keys)
1709 (substitute* "src/Makefile"
1710 (("/usr/local") (assoc-ref outputs "out")))
1712 (add-before 'build 'skip-example
1713 (lambda _ (chdir "src") #t)))))
1716 ("freeglut" ,freeglut)))
1717 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1719 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1720 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1721 For example, two shapes can be combined by uniting them, by intersecting them,
1722 or by subtracting one shape from the other.")
1723 (home-page "http://www.opencsg.org/")
1724 (license license:gpl2))))
1726 (define-public coin3D
1727 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1728 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1730 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1734 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1739 (url "https://bitbucket.org/Coin3D/coin")
1740 (changeset changeset)))
1741 (file-name (git-file-name name version))
1743 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1744 (modules '((guix build utils)))
1747 (for-each delete-file
1749 "cfg/wrapmsvc.exe"))
1751 (build-system cmake-build-system)
1753 `(("doxygen" ,doxygen)
1754 ("graphviz" ,graphviz)))
1757 ("freeglut" ,freeglut)
1762 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1763 (string-append "-DBOOST_ROOT="
1764 (assoc-ref %build-inputs "boost")))))
1765 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1767 "High-level 3D visualization library with Open Inventor 2.1 API")
1769 "Coin is a 3D graphics library with an Application Programming Interface
1770 based on the Open Inventor 2.1 API. For those who are not familiar with
1771 Open Inventor, it is a scene-graph based retain-mode rendering and model
1772 interaction library, written in C++, which has become the de facto
1773 standard graphics library for 3D visualization and visual simulation
1774 software in the scientific and engineering community.")
1775 (license license:bsd-3))))
1777 (define-public coin3D-4
1785 (url "https://github.com/coin3d/coin")
1786 (commit (string-append "Coin-" version))
1788 (file-name (git-file-name name version))
1790 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1791 (modules '((guix build utils)))
1795 (for-each delete-file
1797 "cfg/wrapmsvc.exe"))
1798 ;; Delete references to packaging tool cpack. Otherwise the build
1799 ;; fails with "add_subdirectory given source "cpack.d" which is not
1800 ;; an existing directory."
1801 (substitute* "CMakeLists.txt"
1802 ((".*cpack.d.*") ""))
1804 (build-system cmake-build-system)
1806 `(("doxygen" ,doxygen)
1807 ("graphviz" ,graphviz)))
1810 ("freeglut" ,freeglut)
1815 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1816 (string-append "-DBOOST_ROOT="
1817 (assoc-ref %build-inputs "boost")))))
1818 (home-page "https://github.com/coin3d/coin")
1820 "High-level 3D visualization library with Open Inventor 2.1 API")
1822 "Coin is a 3D graphics library with an Application Programming Interface
1823 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1824 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1825 library, written in C++, which has become the de facto standard graphics
1826 library for 3D visualization and visual simulation software in the scientific
1827 and engineering community.")
1828 (license license:bsd-3)))
1830 (define-public superfamiconv
1832 (name "superfamiconv")
1838 (url "https://github.com/Optiroc/SuperFamiconv")
1839 (commit (string-append "v" version))))
1840 (file-name (git-file-name name version))
1843 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1844 (build-system gnu-build-system)
1846 `(#:tests? #f ; no tests
1848 (modify-phases %standard-phases
1851 (lambda* (#:key outputs #:allow-other-keys)
1852 (let* ((outdir (assoc-ref outputs "out"))
1853 (bindir (string-append outdir "/bin")))
1854 (install-file "bin/superfamiconv" bindir)
1856 (home-page "https://github.com/Optiroc/SuperFamiconv")
1857 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1858 and PC Engine formats")
1859 (description "SuperFamiconv is a converter for tiled graphics, supporting
1860 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1861 Automated palette selection is supported.")
1862 (license license:expat)))
1864 (define-public drawpile
1865 ;; This commit fix building with libmicrohttpd>=0.71.
1866 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1870 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1874 (url "https://github.com/drawpile/Drawpile")
1876 (file-name (git-file-name name version))
1879 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1880 (build-system qt-build-system)
1883 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1885 `(("extra-cmake-modules" ,extra-cmake-modules)
1886 ("pkg-config" ,pkg-config)))
1888 `(("giflib" ,giflib)
1889 ("karchive" ,karchive)
1891 ("libmicrohttpd" ,libmicrohttpd)
1892 ("libsodium" ,libsodium)
1895 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1897 ("qtkeychain" ,qtkeychain)
1898 ("qtmultimedia" ,qtmultimedia)
1900 ("qtx11extras" ,qtx11extras)))
1901 (home-page "https://drawpile.net")
1902 (synopsis "Collaborative drawing program")
1903 (description "Drawpile is a drawing program that allows share the canvas
1904 with other users in real time.
1906 Some feature highlights:
1908 @item Shared canvas using the built-in server or a dedicated server
1909 @item Record, play back and export drawing sessions
1910 @item Simple animation support
1911 @item Layers and blending modes
1913 @item Supports pressure sensitive Wacom tablets
1915 @item Supports OpenRaster file format
1916 @item Encrypted connections using SSL
1917 @item Automatic port forwarding with UPnP
1919 (license license:gpl3+))))
1921 (define-public monado
1927 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1928 name "/-/archive/v" version "/"
1929 name "-v" version ".tar.bz2"))
1932 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1933 (build-system meson-build-system)
1935 `(("ffmpeg" ,ffmpeg)
1936 ("glslang" ,glslang)
1940 ("libxrandr" ,libxrandr)
1943 ("vulkan-loader" ,vulkan-loader)))
1946 ("pkg-config" ,pkg-config)
1947 ("vulkan-headers" ,vulkan-headers)))
1950 (list "-Dinstall-active-runtime=false")))
1951 (home-page "https://monado.freedesktop.org/")
1952 (synopsis "OpenXR runtime")
1953 (description "Monado is an OpenXR runtime delivering immersive experiences
1954 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
1955 a complete and conforming implementation of the OpenXR API made by Khronos.")
1956 (license license:boost1.0)))