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, 2021 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>
28 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
30 ;;; This file is part of GNU Guix.
32 ;;; GNU Guix is free software; you can redistribute it and/or modify it
33 ;;; under the terms of the GNU General Public License as published by
34 ;;; the Free Software Foundation; either version 3 of the License, or (at
35 ;;; your option) any later version.
37 ;;; GNU Guix is distributed in the hope that it will be useful, but
38 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 ;;; GNU General Public License for more details.
42 ;;; You should have received a copy of the GNU General Public License
43 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
45 (define-module (gnu packages graphics)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages algebra)
48 #:use-module (gnu packages audio)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bash)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages boost)
54 #:use-module (gnu packages cdrom)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages crypto)
58 #:use-module (gnu packages datastructures)
59 #:use-module (gnu packages documentation)
60 #:use-module (gnu packages flex)
61 #:use-module (gnu packages fonts)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages freedesktop)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages ghostscript)
66 #:use-module (gnu packages gl)
67 #:use-module (gnu packages glib)
68 #:use-module (gnu packages gnome)
69 #:use-module (gnu packages gnunet)
70 #:use-module (gnu packages graphviz)
71 #:use-module (gnu packages gstreamer)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages haskell-xyz)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages image-processing)
76 #:use-module (gnu packages imagemagick)
77 #:use-module (gnu packages jemalloc)
78 #:use-module (gnu packages kde-frameworks)
79 #:use-module (gnu packages libusb)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages lua)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages mp3)
84 #:use-module (gnu packages multiprecision)
85 #:use-module (gnu packages pdf)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages photo)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages plotutils)
90 #:use-module (gnu packages pretty-print)
91 #:use-module (gnu packages pth)
92 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
93 #:use-module (gnu packages python)
94 #:use-module (gnu packages python-xyz)
95 #:use-module (gnu packages qt)
96 #:use-module (gnu packages readline)
97 #:use-module (gnu packages sdl)
98 #:use-module (gnu packages stb)
99 #:use-module (gnu packages swig)
100 #:use-module (gnu packages tbb)
101 #:use-module (gnu packages upnp)
102 #:use-module (gnu packages video)
103 #:use-module (gnu packages vulkan)
104 #:use-module (gnu packages xiph)
105 #:use-module (gnu packages xml)
106 #:use-module (gnu packages xorg)
107 #:use-module (gnu packages xdisorg)
108 #:use-module (guix build-system copy)
109 #:use-module (guix build-system cmake)
110 #:use-module (guix build-system gnu)
111 #:use-module (guix build-system meson)
112 #:use-module (guix build-system python)
113 #:use-module (guix build-system qt)
114 #:use-module (guix download)
115 #:use-module (guix git-download)
116 #:use-module (guix hg-download)
117 #:use-module ((guix licenses) #:prefix license:)
118 #:use-module (guix packages)
119 #:use-module (guix utils))
121 (define-public eglexternalplatform
123 (name "eglexternalplatform")
130 (url "https://github.com/NVIDIA/eglexternalplatform")
133 (git-file-name name version))
135 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
136 (build-system copy-build-system)
139 (modify-phases %standard-phases
140 (add-after 'unpack 'patch-pkgconfig
141 (lambda* (#:key outputs #:allow-other-keys)
142 (substitute* "eglexternalplatform.pc"
144 (assoc-ref outputs "out")))
146 (add-after 'install 'revise
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let* ((out (assoc-ref outputs "out")))
149 (mkdir-p (string-append out "/include/EGL"))
151 (string-append out "/interface")
152 (string-append out "/include/EGL"))
153 (mkdir-p (string-append out "/share/pkgconfig"))
155 (string-append out "/eglexternalplatform.pc")
156 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
157 (for-each delete-file-recursively
159 (string-append out "/samples")
160 (string-append out "/COPYING")
161 (string-append out "/README.md"))))
163 (synopsis "EGL External Platform interface")
164 (description "EGLExternalPlatform is an specification of the EGL External
165 Platform interface for writing EGL platforms and their interactions with modern
166 window systems on top of existing low-level EGL platform implementations. This
167 keeps window system implementation specifics out of EGL drivers by using
168 application-facing EGL functions.")
169 (home-page "https://github.com/NVIDIA/eglexternalplatform")
170 (license license:expat)))
172 (define-public egl-wayland
180 (url "https://github.com/NVIDIA/egl-wayland")
182 (file-name (git-file-name name version))
184 (base32 "0xcx1132zwyp4qps074m72ngjlfmysi1jc2d0lp1ml1r9bllkam6"))))
185 (build-system meson-build-system)
187 `(("pkg-config" ,pkg-config)))
190 ("wayland" ,wayland)))
192 `(("eglexternalplatform" ,eglexternalplatform)))
193 (synopsis "EGLStream-based Wayland external platform")
194 (description "EGL-Wayland is an implementation of a EGL External Platform
195 library to add client-side Wayland support to EGL on top of EGLDevice and
196 EGLStream families of extensions.")
197 (home-page "https://github.com/NVIDIA/egl-wayland")
198 (license license:expat)))
209 (url "https://github.com/hodefoting/mmm")
212 (git-file-name name version))
214 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
215 (build-system meson-build-system)
218 ("pkg-config" ,pkg-config)))
223 (synopsis "Memory Mapped Machine")
224 (description "MMM is a shared memory protocol for virtualising access to
225 framebuffer graphics, audio output and input event.")
226 (home-page "https://github.com/hodefoting/mrg")
227 (license license:isc)))
229 (define-public directfb
238 (url "https://github.com/deniskropp/DirectFB")
239 (commit "DIRECTFB_1_7_7")))
240 (file-name (git-file-name name version))
242 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
243 (build-system gnu-build-system)
246 (modify-phases %standard-phases
247 (add-after 'unpack 'disable-configure-during-bootstrap
249 (substitute* "autogen.sh"
250 (("^.*\\$srcdir/configure.*") ""))
253 `(("autoconf" ,autoconf)
254 ("automake" ,automake)
257 ("pkg-config" ,pkg-config)))
261 ("freetype" ,freetype)
263 ("gstreamer" ,gstreamer)
266 ("jpeg" ,libjpeg-turbo)
269 ("libtimidity" ,libtimidity)
270 ("linux-headers" ,linux-libre-headers)
282 ("vorbisfile" ,libvorbis)
286 ("xcomposite" ,libxcomposite)
288 ("xproto" ,xorgproto)
292 (synopsis "DFB Graphics Library")
293 (description "DirectFB is a graphics library which was designed with embedded
294 systems in mind. It offers maximum hardware accelerated performance at a
295 minimum of resource usage and overhead.")
296 (home-page "https://github.com/deniskropp/DirectFB")
297 (license license:lgpl2.1+)))
308 (url "https://github.com/deniskropp/flux")
310 (file-name (git-file-name name version))
312 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
313 (build-system gnu-build-system)
315 `(("autoconf" ,autoconf)
316 ("automake" ,automake)
318 ("pkg-config" ,pkg-config)))
319 (synopsis "Interface description language")
320 (description "Flux is an interface description language used by DirectFB.
321 Fluxcomp compiles .flux files to .cpp or .c files.")
322 (home-page "https://www.directfb.org/")
323 (license license:lgpl2.1+))) ; Same as DirectFB
333 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
335 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
336 (build-system gnu-build-system)
339 (modify-phases %standard-phases
340 (add-after 'unpack 'patch
342 (substitute* "configure"
343 (("-I/usr/include/freetype2")
346 (assoc-ref %build-inputs "freetype")
347 "/include/freetype2"))))
350 `(("doxygen" ,doxygen)))
353 ("freetype" ,freetype)
356 ("jpeg" ,libjpeg-turbo)
360 ("xcursor" ,libxcursor)
362 ("xfixes" ,libxfixes)
365 ("xrandr" ,libxrandr)
366 ("xrender" ,libxrender)
367 ("xshm" ,libxshmfence)
369 (synopsis "Widget Toolkit for building GUI")
370 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
371 Graphical User Interfaces easily and effectively. It offers a wide, and
372 growing, collection of Controls, and provides state of the art facilities such
373 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
374 manipulation. FOX also implements icons, images, and user-convenience features
375 such as status line help, and tooltips. Tooltips may even be used for 3D
377 (home-page "http://www.fox-toolkit.org")
378 (license license:lgpl2.1+)))
380 (define-public autotrace
381 (let ((commit "travis-20190624.59")
382 (version-base "0.40.0"))
385 (version (string-append version-base "-"
386 (if (string-prefix? "travis-" commit)
387 (string-drop commit 7)
392 (url "https://github.com/autotrace/autotrace")
394 (file-name (git-file-name name version))
395 (patches (search-patches "autotrace-glib-compat.patch"))
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 openvdb
473 (url "https://github.com/AcademySoftwareFoundation/openvdb/")
474 (commit (string-append "v" version))
476 (file-name (git-file-name name version))
479 "0qzx6l5c183k6j9zki31gg9aixf5s1j46wdi7wr1h3bz7k53syg9"))))
480 (build-system cmake-build-system)
483 (list (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
484 (assoc-ref %outputs "out") "/lib"))))
492 `(("pkg-config" ,pkg-config)))
493 (home-page "https://www.openvdb.org/")
494 (synopsis "Sparse volume data structure and tools")
495 (description "OpenVDB is a C++ library comprising a hierarchical data
496 structure and a large suite of tools for the efficient storage and
497 manipulation of sparse volumetric data discretized on three-dimensional grids.
498 It was developed by DreamWorks Animation for use in volumetric applications
499 typically encountered in feature film production.")
500 (license license:mpl2.0)))
502 (define-public blender
508 (uri (string-append "https://download.blender.org/source/"
509 "blender-" version ".tar.xz"))
512 "15a5vffn18a920286x0avbc2rap56k6y531wgibq68r90g2cz4g7"))))
513 (build-system cmake-build-system)
515 (let ((python-version (version-major+minor (package-version python))))
516 `(;; Test files are very large and not included in the release tarball.
519 (list "-DWITH_CODEC_FFMPEG=ON"
520 "-DWITH_CODEC_SNDFILE=ON"
522 "-DWITH_DOC_MANPAGE=ON"
524 "-DWITH_IMAGE_OPENJPEG=ON"
525 "-DWITH_INPUT_NDOF=ON"
526 "-DWITH_INSTALL_PORTABLE=OFF"
528 "-DWITH_MOD_OCEANSIM=ON"
530 "-DWITH_OPENSUBDIV=ON"
531 "-DWITH_PYTHON_INSTALL=OFF"
532 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
533 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
535 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
536 "/include/python" ,python-version)
537 (string-append "-DPYTHON_VERSION=" ,python-version)
538 (string-append "-DPYTHON_NUMPY_INCLUDE_DIRS="
539 (assoc-ref %build-inputs "python-numpy")
540 "/lib/python" ,python-version "/site-packages/numpy/core/include/")
541 (string-append "-DPYTHON_NUMPY_PATH="
542 (assoc-ref %build-inputs "python-numpy")
543 "/lib/python" ,python-version "/site-packages/"))
545 (modify-phases %standard-phases
546 ;; XXX This file doesn't exist in the Git sources but will probably
547 ;; exist in the eventual 2.80 source tarball.
548 (add-after 'unpack 'fix-broken-import
550 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
551 (("import encode_bin") "from . import encode_bin"))
553 (add-after 'set-paths 'add-ilmbase-include-path
554 (lambda* (#:key inputs #:allow-other-keys)
555 ;; OpenEXR propagates ilmbase, but its include files do not appear
556 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
557 ;; the CPATH to satisfy the dependency on "half.h".
559 (string-append (assoc-ref inputs "ilmbase")
561 ":" (or (getenv "CPATH") "")))
565 ("jemalloc" ,jemalloc)
568 ("libxrender" ,libxrender)
569 ("opencolorio" ,opencolorio)
570 ("openimageio" ,openimageio)
572 ("opensubdiv" ,opensubdiv)
574 ("openjpeg" ,openjpeg)
575 ("libjpeg" ,libjpeg-turbo)
581 ("libsndfile" ,libsndfile)
582 ("freetype" ,freetype)
587 ("python-numpy" ,python-numpy)
592 (home-page "https://blender.org/")
593 (synopsis "3D graphics creation suite")
595 "Blender is a 3D graphics creation suite. It supports the entirety of
596 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
597 compositing and motion tracking, even video editing and game creation. The
598 application can be customized via its API for Python scripting.")
599 (license license:gpl2+)))
601 (define-public blender-2.79
607 (uri (string-append "https://download.blender.org/source/"
608 "blender-" version ".tar.gz"))
611 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
612 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
613 "blender-2.79-oiio2.patch"
614 ;; The following patches may be
615 ;; needed when the default GCC is
617 ;; "blender-2.79-gcc8.patch"
618 ;; "blender-2.79-gcc9.patch"
619 "blender-2.79-python-3.7-fix.patch"
620 "blender-2.79-python-3.8-fix.patch"))))
621 (build-system cmake-build-system)
623 (let ((python-version (version-major+minor (package-version python))))
624 `(;; Test files are very large and not included in the release tarball.
627 (list "-DWITH_CODEC_FFMPEG=ON"
628 "-DWITH_CODEC_SNDFILE=ON"
630 "-DWITH_DOC_MANPAGE=ON"
632 "-DWITH_GAMEENGINE=ON"
633 "-DWITH_IMAGE_OPENJPEG=ON"
634 "-DWITH_INPUT_NDOF=ON"
635 "-DWITH_INSTALL_PORTABLE=OFF"
637 "-DWITH_MOD_OCEANSIM=ON"
639 "-DWITH_PYTHON_INSTALL=OFF"
640 "-DWITH_PYTHON_INSTALL=OFF"
641 "-DWITH_SYSTEM_OPENJPEG=ON"
642 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
643 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
645 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
646 "/include/python" ,python-version)
647 (string-append "-DPYTHON_VERSION=" ,python-version))
649 (modify-phases %standard-phases
650 (add-after 'unpack 'fix-broken-import
652 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
653 (("import encode_bin") "from . import encode_bin"))
655 (add-after 'set-paths 'add-ilmbase-include-path
656 (lambda* (#:key inputs #:allow-other-keys)
657 ;; OpenEXR propagates ilmbase, but its include files do not appear
658 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
659 ;; the CPATH to satisfy the dependency on "half.h".
661 (string-append (assoc-ref inputs "ilmbase")
663 ":" (or (getenv "CPATH") "")))
667 ("jemalloc" ,jemalloc)
669 ("opencolorio" ,opencolorio)
670 ("openimageio" ,openimageio)
673 ("openjpeg" ,openjpeg)
674 ("libjpeg" ,libjpeg-turbo)
680 ("libsndfile" ,libsndfile)
681 ("freetype" ,freetype)
687 (home-page "https://blender.org/")
688 (synopsis "3D graphics creation suite")
690 "Blender is a 3D graphics creation suite. It supports the entirety of
691 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
692 compositing and motion tracking, even video editing and game creation. The
693 application can be customized via its API for Python scripting.
695 NOTE: This older version of Blender is the last release that does not require
696 OpenGL 3. It is retained for use with older computers.")
697 (license license:gpl2+)))
706 (url "https://github.com/guillaumechereau/goxel")
707 (commit (string-append "v" version))))
708 (file-name (git-file-name name version))
711 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
712 (build-system gnu-build-system)
715 #:phases (modify-phases %standard-phases (delete 'configure))
716 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
719 `(("pkg-config" ,pkg-config)))
724 (home-page "https://goxel.xyz/")
725 (synopsis "Voxel editor")
727 "Goxel is a voxel editor that features unlimited scene size, unlimited
728 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
729 and export to various formats including the format used by Magicavoxel.")
730 (license license:gpl3+)))
732 (define-public assimp
739 (url "https://github.com/assimp/assimp")
740 (commit (string-append "v" version))))
741 (file-name (git-file-name name version))
744 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
745 (build-system cmake-build-system)
748 (home-page "http://www.assimp.org/")
749 (synopsis "Asset import library")
751 "The Open Asset Import Library loads more than 40 3D file formats into
752 one unified data structure. Additionally, assimp features various mesh post
753 processing tools: normals and tangent space generation, triangulation, vertex
754 cache locality optimization, removal of degenerate primitives and duplicate
755 vertices, sorting by primitive type, merging of redundant materials and many
757 (license license:bsd-3)))
766 "https://github.com/CGAL/cgal/releases/download/v" version
767 "/CGAL-" version ".tar.xz"))
770 "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
771 (build-system cmake-build-system)
774 ;; Prevent two mostly-duplicate directories. Use Guix's versioned
775 ;; default for licences instead of CGAL's unversioned one.
776 (list (string-append "-DCGAL_INSTALL_DOC_DIR=share/doc/"
778 #:tests? #f)) ; no test target
783 (home-page "https://www.cgal.org/")
784 (synopsis "Computational geometry algorithms library")
786 "CGAL provides easy access to efficient and reliable geometric algorithms
787 in the form of a C++ library. CGAL is used in various areas needing geometric
788 computation, such as: computer graphics, scientific visualization, computer
789 aided design and modeling, geographic information systems, molecular biology,
790 medical imaging, robotics and motion planning, mesh generation, numerical
791 methods, etc. It provides data structures and algorithms such as
792 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
795 ;; The 'LICENSE' file explains that a subset is available under more
796 ;; permissive licenses.
797 (license license:gpl3+)))
799 (define-public ilmbase
806 (url "https://github.com/openexr/openexr")
807 (commit (string-append "v" version))))
808 (file-name (git-file-name "ilmbase" version))
811 "0mjzb3fd8b9pcqmrgy5cdsmvqd70hmlvjnfypi66v59h3fhrmgd8"))
812 (patches (search-patches "ilmbase-fix-tests.patch"))))
813 (build-system cmake-build-system)
815 `(#:phases (modify-phases %standard-phases
816 (add-after 'unpack 'change-directory
820 (home-page "https://www.openexr.com/")
821 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
823 "IlmBase provides several utility libraries for C++. Half is a class
824 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
825 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
826 quaternions and other useful 2D and 3D math functions. Iex is an
827 exception-handling library.")
828 (license license:bsd-3)))
830 (define-public lib2geom
831 ;; Use the latest master commit, as the 1.0 release suffer build problems.
833 (commit "b29d60e49a58f4e8069544b44863b1a623e4ee59"))
836 (version (git-version "1.0" revision commit))
840 (url "https://gitlab.com/inkscape/lib2geom.git")
842 (file-name (git-file-name name version))
845 "0xd8f3cgfnipdav4w8j54r7hzy9f3m7xk42ppcfhdjz2hriggyk6"))
847 ;; Patch submitted to upstream (see:
848 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
849 (search-patches "lib2geom-fix-tests.patch"))
850 (modules '((guix build utils)))
853 ;; Fix py2geom module initialization (see:
854 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
855 (substitute* "src/py2geom/__init__.py"
856 (("_py2geom") "py2geom._py2geom"))
858 (build-system cmake-build-system)
860 `(#:imported-modules ((guix build python-build-system)
861 ,@%cmake-build-system-modules)
862 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
863 "-D2GEOM_BOOST_PYTHON=ON"
864 ;; Compiling the Cython bindings fail (see:
865 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
866 "-D2GEOM_CYTHON_BINDINGS=OFF")
868 (modify-phases %standard-phases
869 (add-after 'unpack 'patch-python-lib-install-path
870 (lambda* (#:key inputs outputs #:allow-other-keys)
871 (let* ((python-version (@ (guix build python-build-system)
873 (python-maj-min-version (python-version
874 (assoc-ref inputs "python")))
875 (site-package (string-append
876 (assoc-ref outputs "out")
877 "/lib/python" python-maj-min-version
879 (substitute* '("src/cython/CMakeLists.txt"
880 "src/py2geom/CMakeLists.txt")
881 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
882 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
884 (native-inputs `(("python" ,python-wrapper)
885 ("googletest" ,googletest)
886 ("pkg-config" ,pkg-config)))
887 (inputs `(("cairo" ,cairo)
888 ("pycairo" ,python-pycairo)
889 ("double-conversion" ,double-conversion)
893 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
894 (home-page "https://gitlab.com/inkscape/lib2geom/")
895 (synopsis "C++ 2D graphics library")
896 (description "2geom is a C++ library of mathematics for paths, curves,
897 and other geometric calculations. Designed for vector graphics, it tackles
898 Bézier curves, conic sections, paths, intersections, transformations, and
900 ;; Because the library is linked with the GNU Scientific Library
901 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
902 ;; https://gitlab.com/inkscape/inkscape/issues/784).
903 (license license:gpl3+))))
905 (define-public pstoedit
911 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
912 version "/pstoedit-" version ".tar.gz"))
915 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
916 (build-system gnu-build-system)
918 `(("pkg-config" ,pkg-config)))
920 `(("ghostscript" ,ghostscript)
921 ("imagemagick" ,imagemagick)
922 ("libplot" ,plotutils)
923 ("libjpeg" ,libjpeg-turbo)
924 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
925 (home-page "http://www.pstoedit.net/")
926 (synopsis "Converter for PostScript and PDF graphics")
927 (description "The @code{pstoedit} utility allows translating graphics
928 in the PostScript or PDF (Portable Document Format) formats to various
929 other vector formats such as:
934 @item Flattened PostScript
935 @item DXF, a CAD (Computed-Aided Design) exchange format
936 @item PIC (for troff/groff)
937 @item MetaPost (for usage with TeX/LaTeX)
938 @item LaTeX2e picture
939 @item GNU Metafile (for use with plotutils/libplot)
940 @item Any format supported by ImageMagick
942 (license license:gpl2+)))
944 (define-public dear-imgui
952 (url "https://github.com/ocornut/imgui")
953 (commit (string-append "v" version))))
954 (file-name (git-file-name name version))
956 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
957 (build-system gnu-build-system)
960 (list (string-append "CC=" ,(cc-for-target))
961 (string-append "PREFIX=" (assoc-ref %outputs "out"))
962 (string-append "VERSION=" ,version))
963 #:tests? #f ; no test suite
965 (modify-phases %standard-phases
966 (add-after 'unpack 'unpack-debian-files
967 (lambda* (#:key inputs #:allow-other-keys)
968 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
969 (apply invoke "patch" "-Np1" "-i"
970 (find-files "debian/patches" "\\.patch$"))
971 (substitute* "Makefile"
972 (("<stb/") "<") ; Guix doesn't use this subdirectory
973 ;; Don't build or install the static library.
974 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
975 (substitute* (list "imgui.pc.in"
977 ;; Don't link against a non-existent library.
980 (delete 'configure) ; no configure script
982 ;; The default ‘install’ target installs the static library. Don't.
983 (lambda* (#:key make-flags #:allow-other-keys)
984 (apply invoke "make" "install-shared" "install-header"
988 ;; Upstream doesn't provide a build system. Use Debian's.
991 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
992 version "+ds-1.debian.tar.xz"))
994 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
995 ("pkg-config" ,pkg-config)))
997 `(("freetype" ,freetype)
998 ("stb-rect-pack" ,stb-rect-pack)
999 ("stb-truetype" ,stb-truetype)))
1000 (home-page "https://github.com/ocornut/imgui")
1001 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
1003 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
1004 It creates optimized vertex buffers that you can render anytime in your
1005 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
1006 self-contained, without external dependencies.
1008 Dear ImGui is aimed at content creation, visualization, and debugging tools as
1009 opposed to average end-user interfaces. Hence it favors simplicity and
1010 productivity but lacks certain features often found in higher-level libraries.
1011 It is particularly suited to integration in game engine tooling, real-time 3D
1012 applications, full-screen applications, and embedded platforms without standard
1013 operating system features.")
1014 (license license:expat))) ; some examples/ use the zlib licence
1024 (url "https://github.com/OGRECave/ogre")
1025 (commit (string-append "v" version))))
1026 (file-name (git-file-name name version))
1028 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
1029 (build-system cmake-build-system)
1032 (modify-phases %standard-phases
1033 (add-before 'configure 'unpack-dear-imgui
1034 (lambda* (#:key inputs #:allow-other-keys)
1035 (copy-recursively (assoc-ref inputs "dear-imgui-source")
1036 "../dear-imgui-source")
1038 (add-before 'configure 'pre-configure
1039 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1040 ;; a consequence, we cannot suggest ours in configure flags. Fix
1042 (lambda* (#:key inputs outputs #:allow-other-keys)
1043 (substitute* "CMakeLists.txt"
1044 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1047 (let* ((out (assoc-ref %outputs "out"))
1049 (string-join (list (string-append out "/lib")
1050 (string-append out "/lib/OGRE"))
1052 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1053 "-DIMGUI_DIR=../dear-imgui-source"
1054 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1055 "-DOGRE_BUILD_TESTS=TRUE"
1056 "-DOGRE_INSTALL_DOCS=TRUE"
1057 "-DOGRE_INSTALL_SAMPLES=TRUE"
1058 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1061 ("dear-imgui-source" ,(package-source dear-imgui))
1062 ("doxygen" ,doxygen)
1063 ("googletest" ,googletest-1.8)
1064 ("pkg-config" ,pkg-config)))
1066 `(("font-dejavu" ,font-dejavu)
1067 ("freeimage" ,freeimage)
1068 ("freetype" ,freetype)
1071 ("libxrandr" ,libxrandr)
1072 ("pugixml" ,pugixml)
1074 ("tinyxml" ,tinyxml)
1075 ("zziplib" ,zziplib)))
1076 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1078 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1079 flexible 3D engine written in C++ designed to make it easier and more intuitive
1080 for developers to produce applications utilising hardware-accelerated 3D
1082 (home-page "https://www.ogre3d.org/")
1083 (license license:expat)))
1085 (define-public openexr
1088 (version (package-version ilmbase))
1090 (inherit (package-source ilmbase))
1091 (file-name (git-file-name "openexr" version))
1092 (modules '((guix build utils)))
1095 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1099 (build-system cmake-build-system)
1102 (modify-phases %standard-phases
1103 (add-after 'unpack 'change-directory
1107 (add-after 'change-directory 'increase-test-timeout
1109 ;; On armhf-linux, we need to override the CTest default
1110 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1111 (substitute* "IlmImfTest/CMakeLists.txt"
1112 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1115 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1117 ,@(if (not (target-64bit?))
1118 `((add-after 'change-directory 'disable-broken-test
1119 ;; This test fails on i686. Upstream developers suggest that
1120 ;; this test is broken on i686 and can be safely disabled:
1121 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1123 (substitute* "IlmImfTest/main.cpp"
1124 ((".*testOptimizedInterleavePatterns.*") ""))
1128 `(("pkg-config" ,pkg-config)))
1130 `(("ilmbase" ,ilmbase) ;used in public headers
1131 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1132 (home-page "https://www.openexr.com/")
1133 (synopsis "High-dynamic range file format library")
1135 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1136 use in computer imaging applications. The IlmImf C++ libraries support
1137 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1138 (license license:bsd-3)))
1140 (define-public openimageio
1142 (name "openimageio")
1143 (version "2.2.10.1")
1147 (url "https://github.com/OpenImageIO/oiio")
1148 (commit (string-append "Release-" version))))
1149 (file-name (git-file-name name version))
1152 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1153 (build-system cmake-build-system)
1154 ;; FIXME: To run all tests successfully, test image sets from multiple
1155 ;; third party sources have to be present. For details see
1156 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1159 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1161 `(("pkg-config" ,pkg-config)))
1166 ("libjpeg" ,libjpeg-turbo)
1167 ("libtiff" ,libtiff)
1169 ("openexr" ,openexr)
1170 ("ilmbase" ,ilmbase)
1171 ("pugixml" ,pugixml)
1172 ("python" ,python-wrapper)
1173 ("pybind11" ,pybind11)
1174 ("robin-map" ,robin-map)
1176 (synopsis "C++ library for reading and writing images")
1178 "OpenImageIO is a library for reading and writing images, and a bunch of
1179 related classes, utilities, and applications. There is a particular emphasis
1180 on formats and functionality used in professional, large-scale animation and
1181 visual effects work for film.")
1182 (home-page "https://www.openimageio.org")
1183 (license license:bsd-3)))
1185 (define-public openscenegraph
1187 (name "openscenegraph")
1193 (url "https://github.com/openscenegraph/OpenSceneGraph")
1194 (commit (string-append "OpenSceneGraph-" version))))
1196 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1197 (file-name (git-file-name name version))))
1199 `((upstream-name . "OpenSceneGraph")))
1200 (build-system cmake-build-system)
1202 `(#:tests? #f ; no test target available
1203 ;; Without this flag, 'rd' will be added to the name of the
1204 ;; library binaries and break linking with other programs.
1205 #:build-type "Release"
1207 (list (string-append "-DCMAKE_INSTALL_RPATH="
1208 (assoc-ref %outputs "out") "/lib:"
1209 (assoc-ref %outputs "out") "/lib64"))))
1211 `(("pkg-config" ,pkg-config)
1214 `(("giflib" ,giflib)
1215 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1217 ("librsvg" ,librsvg)
1218 ("libxrandr" ,libxrandr)
1221 (synopsis "High-performance real-time graphics toolkit")
1223 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1224 used by application developers in fields such as visual simulation, games,
1225 virtual reality, scientific visualization and modeling.")
1226 (home-page "http://www.openscenegraph.org")
1227 ;; The 'LICENSE' file explains that the source is licensed under
1228 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1229 (license license:lgpl2.1)))
1231 ;; We need this for simgear
1232 (define-public openscenegraph-3.4
1233 (package (inherit openscenegraph)
1234 (name "openscenegraph")
1240 (url "https://github.com/openscenegraph/OpenSceneGraph")
1241 (commit (string-append "OpenSceneGraph-" version))))
1242 (file-name (git-file-name name version))
1245 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1247 (substitute-keyword-arguments (package-arguments openscenegraph)
1248 ((#:configure-flags flags)
1250 ;; The jpeg plugin requires conversion between integers and booleans
1251 "-DCMAKE_CXX_FLAGS=-fpermissive"
1254 `(("libjpeg" ,libjpeg-turbo)
1255 ,@(package-inputs openscenegraph)))))
1258 (define-public openmw-openscenegraph
1259 ;; OpenMW prefers its own fork of openscenegraph:
1260 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1261 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1264 (inherit openscenegraph)
1265 (version (git-version "3.6" "1" commit))
1270 (url "https://github.com/OpenMW/osg/")
1272 (file-name (git-file-name (package-name openscenegraph) version))
1275 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1277 (substitute-keyword-arguments (package-arguments openscenegraph)
1278 ((#:configure-flags flags)
1279 ;; As per the above wiki link, the following plugins are enough:
1281 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1282 "-DBUILD_OSG_PLUGIN_OSG=1"
1283 "-DBUILD_OSG_PLUGIN_DDS=1"
1284 "-DBUILD_OSG_PLUGIN_TGA=1"
1285 "-DBUILD_OSG_PLUGIN_BMP=1"
1286 "-DBUILD_OSG_PLUGIN_JPEG=1"
1287 "-DBUILD_OSG_PLUGIN_PNG=1"
1288 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1289 ;; The jpeg plugin requires conversion between integers and booleans
1290 "-DCMAKE_CXX_FLAGS=-fpermissive")
1293 (define-public povray
1300 (url "https://github.com/POV-Ray/povray")
1301 (commit (string-append "v" version))))
1302 (file-name (git-file-name name version))
1305 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1306 (modules '((guix build utils)))
1309 ;; Delete bundled libraries.
1310 (delete-file-recursively "libraries")
1312 (build-system gnu-build-system)
1314 `(("autoconf" ,autoconf)
1315 ("automake" ,automake)
1316 ("pkg-config" ,pkg-config)))
1319 ("libjpeg" ,libjpeg-turbo)
1321 ("libtiff" ,libtiff)
1322 ("openexr" ,openexr)
1327 (list "COMPILED_BY=Guix"
1328 (string-append "--with-boost-libdir="
1329 (assoc-ref %build-inputs "boost") "/lib")
1330 "--disable-optimiz-arch")
1332 (modify-phases %standard-phases
1333 (add-after 'unpack 'run-prebuild
1335 (setenv "HOME" (getcwd))
1336 (with-directory-excursion "unix"
1337 (substitute* "prebuild.sh"
1338 (("/bin/sh") (which "sh")))
1339 (invoke "sh" "prebuild.sh"))
1341 ;; The bootstrap script is run by the prebuild script in the
1342 ;; "run-prebuild" phase.
1343 (delete 'bootstrap))))
1344 (synopsis "Tool for creating three-dimensional graphics")
1346 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1347 for producing high-quality computer graphics. @code{POV-Ray} creates
1348 three-dimensional, photo-realistic images using a rendering technique called
1349 ray-tracing. It reads in a text file containing information describing the
1350 objects and lighting in a scene and generates an image of that scene from the
1351 view point of a camera also described in the text file. Ray-tracing is not a
1352 fast process by any means, but it produces very high quality images with
1353 realistic reflections, shading, perspective and other effects.")
1354 (home-page "http://www.povray.org/")
1355 (license license:agpl3+)))
1357 (define-public rapicorn
1363 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1364 "rapicorn-" version ".tar.xz"))
1367 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1368 (patches (search-patches "rapicorn-isnan.patch"))))
1369 (build-system gnu-build-system)
1372 (modify-phases %standard-phases
1373 (add-after 'unpack 'fix-tests
1375 ;; Our grep does not support perl regular expressions.
1376 (substitute* "taptool.sh"
1377 (("grep -P") "grep -E"))
1378 ;; Disable path tests because we cannot access /bin or /sbin.
1379 (substitute* "rcore/tests/multitest.cc"
1380 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1382 (add-before 'check 'pre-check
1384 ;; The test suite requires a running X server (with DISPLAY
1385 ;; number 99 or higher).
1386 (system "Xvfb :99 &")
1387 (setenv "DISPLAY" ":99")
1389 (add-after 'unpack 'replace-fhs-paths
1391 (substitute* (cons "Makefile.decl"
1392 (find-files "." "^Makefile\\.in$"))
1393 (("/bin/ls") (which "ls"))
1394 (("/usr/bin/env") (which "env")))
1396 ;; These libraries are listed in the "Required" section of the pkg-config
1399 `(("librsvg" ,librsvg)
1402 ("libxml2" ,libxml2)
1403 ("python2-enum34" ,python2-enum34)))
1405 `(("gdk-pixbuf" ,gdk-pixbuf)
1406 ("libpng" ,libpng-1.2)
1407 ("readline" ,readline)
1408 ("libcroco" ,libcroco)
1409 ("python" ,python-2)
1410 ("cython" ,python2-cython)))
1412 `(("pandoc" ,pandoc)
1415 ("doxygen" ,doxygen)
1416 ("graphviz" ,graphviz)
1417 ("intltool" ,intltool)
1418 ("pkg-config" ,pkg-config)
1419 ("xvfb" ,xorg-server-for-tests)))
1420 (home-page "https://rapicorn.testbit.org/")
1421 (synopsis "Toolkit for rapid development of user interfaces")
1423 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1424 and Python. The user interface is designed in a declarative markup language
1425 and is connected to the programming logic using data bindings and commands.")
1426 (license license:mpl2.0)))
1434 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1438 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1439 (build-system cmake-build-system)
1440 (arguments '(#:tests? #f)) ;no 'test' target
1442 ;; Headers include OpenEXR and IlmBase headers.
1443 (propagated-inputs `(("openexr" ,openexr)))
1445 (home-page "http://ampasctl.sourceforge.net")
1446 (synopsis "Color Transformation Language")
1448 "The Color Transformation Language, or CTL, is a small programming
1449 language that was designed to serve as a building block for digital color
1450 management systems. CTL allows users to describe color transforms in a
1451 concise and unambiguous way by expressing them as programs. In order to apply
1452 a given transform to an image, the color management system instructs a CTL
1453 interpreter to load and run the CTL program that describes the transform. The
1454 original and the transformed image constitute the CTL program's input and
1457 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1458 ;; and headers use different wording.
1459 (license (license:non-copyleft "file://LICENSE"))))
1461 (define-public brdf-explorer
1462 ;; There are no release tarballs, and not even tags in the repo,
1463 ;; so use the latest revision.
1464 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1467 (name "brdf-explorer")
1468 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1472 (url "https://github.com/wdas/brdf")
1476 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1477 (file-name (string-append name "-" version "-checkout"))))
1478 (build-system gnu-build-system)
1480 `(#:phases (modify-phases %standard-phases
1482 (lambda* (#:key outputs #:allow-other-keys)
1483 (let ((out (assoc-ref outputs "out")))
1485 (string-append "prefix=" out)))))
1486 (add-after 'install 'wrap-program
1487 (lambda* (#:key outputs #:allow-other-keys)
1488 (let* ((out (assoc-ref outputs "out"))
1489 (bin (string-append out "/bin"))
1490 (data (string-append
1491 out "/share/brdf")))
1492 (with-directory-excursion bin
1493 (rename-file "brdf" ".brdf-real")
1494 (call-with-output-file "brdf"
1496 (format port "#!/bin/sh
1497 # Run the thing from its home, otherwise it just bails out.
1499 exec -a \"$0\" ~a/.brdf-real~%"
1501 (chmod "brdf" #o555)))
1504 `(("qttools" ,qttools))) ;for 'qmake'
1506 `(("qtbase" ,qtbase-5)
1509 ("freeglut" ,freeglut)
1511 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1513 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1515 "BRDF Explorer is an application that allows the development and analysis
1516 of bidirectional reflectance distribution functions (BRDFs). It can load and
1517 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1518 language), measured material data from the MERL database, and anisotropic
1519 measured material data from MIT CSAIL. Graphs and visualizations update in
1520 real time as parameters are changed, making it a useful tool for evaluating
1521 and understanding different BRDFs (and other component functions).")
1522 (license license:ms-pl))))
1530 (uri (list (string-append
1531 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1534 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1537 ;; Site was discontinued.
1538 (string-append "http://www.antigrain.com/agg-"
1539 version ".tar.gz")))
1541 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1542 (patches (search-patches "agg-am_c_prototype.patch"))))
1543 (build-system gnu-build-system)
1546 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1548 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1550 "--disable-examples")
1552 (modify-phases %standard-phases
1555 ;; let's call configure from configure phase and not now
1556 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1557 (invoke "sh" "autogen.sh"))))))
1559 `(("pkg-config" ,pkg-config)
1560 ("libtool" ,libtool)
1561 ("autoconf" ,autoconf)
1562 ("automake" ,automake)))
1564 `(("libx11" ,libx11)
1565 ("freetype" ,freetype)
1568 ;; Antigrain.com was discontinued.
1569 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1570 (synopsis "High-quality 2D graphics rendering engine for C++")
1572 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1573 It supports sub-pixel resolutions and anti-aliasing. It is also a library for
1574 rendering @acronym{SVG, Scalable Vector Graphics}.")
1575 (license license:gpl2+)))
1577 (define-public python-pastel
1579 (name "python-pastel")
1584 (uri (pypi-uri "pastel" version))
1587 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1588 (build-system python-build-system)
1590 `(#:phases (modify-phases %standard-phases
1592 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1594 `(("python-pytest" ,python-pytest)))
1595 (home-page "https://github.com/sdispater/pastel")
1596 (synopsis "Library to colorize strings in your terminal")
1597 (description "Pastel is a simple library to help you colorize strings in
1599 (license license:expat)))
1601 (define-public python2-pastel
1602 (package-with-python2 python-pastel))
1604 (define-public fgallery
1612 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1613 "fgallery-" version ".zip"))
1616 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1617 (build-system gnu-build-system)
1619 `(#:tests? #f ; no tests
1621 (modify-phases %standard-phases
1625 (lambda* (#:key inputs outputs #:allow-other-keys)
1626 (let* ((out (assoc-ref outputs "out"))
1627 (bin (string-append out "/bin/"))
1628 (share (string-append out "/share/fgallery"))
1629 (man (string-append out "/share/man/man1"))
1630 (perl5lib (getenv "PERL5LIB"))
1631 (script (string-append share "/fgallery")))
1632 (define (bin-directory input-name)
1633 (string-append (assoc-ref inputs input-name) "/bin"))
1636 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1639 (copy-recursively "." share)
1641 ;; fgallery copies files from store when it is run. The
1642 ;; read-only permissions from the store directories will cause
1643 ;; fgallery to fail. Do not preserve file attributes when
1644 ;; copying files to prevent it.
1647 "'cp', '--no-preserve=all'"))
1650 (symlink script (string-append out "/bin/fgallery"))
1652 (wrap-program script
1654 ,(map bin-directory '("imagemagick"
1662 `("PERL5LIB" ":" prefix (,perl5lib)))
1665 `(("unzip" ,unzip)))
1666 ;; TODO: Add missing optional dependency: facedetect.
1668 `(("imagemagick" ,imagemagick)
1671 ("libjpeg" ,libjpeg-turbo)
1674 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1675 ("perl-image-exiftool" ,perl-image-exiftool)
1676 ("jpegoptim" ,jpegoptim)
1677 ("pngcrush" ,pngcrush)
1679 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1680 (synopsis "Static photo gallery generator")
1682 "FGallery is a static, JavaScript photo gallery generator with minimalist
1683 look. The result can be uploaded on any web server without additional
1685 (license license:gpl2+)))
1687 (define-public opensubdiv
1694 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1695 (commit (string-append "v" (string-join (string-split version #\.)
1697 (file-name (git-file-name name version))
1700 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1701 (build-system cmake-build-system)
1703 `(#:phases (modify-phases %standard-phases
1704 (add-before 'configure 'set-glew-location
1705 (lambda* (#:key inputs #:allow-other-keys)
1706 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1708 (add-before 'check 'start-xorg-server
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 ;; The test suite requires a running X server.
1711 (system (string-append (assoc-ref inputs "xorg-server")
1713 (setenv "DISPLAY" ":1")
1716 `(("xorg-server" ,xorg-server-for-tests)))
1719 ("libxrandr" ,libxrandr)
1720 ("libxcursor" ,libxcursor)
1721 ("libxinerama" ,libxinerama)
1725 (home-page "https://graphics.pixar.com/opensubdiv/")
1726 (synopsis "High performance subdivision surface evaluation")
1727 (description "OpenSubdiv is a set of libraries that implement high
1728 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1729 and GPU architectures.")
1730 (license license:asl2.0)))
1732 (define-public opencsg
1733 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1741 (url "https://github.com/floriankirsch/OpenCSG")
1742 (commit (string-append "opencsg-"
1743 (string-map dot-to-dash version)
1745 (file-name (git-file-name name version))
1748 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1749 (build-system gnu-build-system)
1752 (modify-phases %standard-phases
1754 (lambda* (#:key outputs #:allow-other-keys)
1755 (substitute* "src/Makefile"
1756 (("/usr/local") (assoc-ref outputs "out")))
1758 (add-before 'build 'skip-example
1759 (lambda _ (chdir "src") #t)))))
1762 ("freeglut" ,freeglut)))
1763 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1765 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1766 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1767 For example, two shapes can be combined by uniting them, by intersecting them,
1768 or by subtracting one shape from the other.")
1769 (home-page "http://www.opencsg.org/")
1770 (license license:gpl2))))
1772 (define-public coin3D
1773 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1774 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1776 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1780 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1785 (url "https://bitbucket.org/Coin3D/coin")
1786 (changeset changeset)))
1787 (file-name (git-file-name name version))
1789 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1790 (modules '((guix build utils)))
1793 (for-each delete-file
1795 "cfg/wrapmsvc.exe"))
1797 (build-system cmake-build-system)
1799 `(("doxygen" ,doxygen)
1800 ("graphviz" ,graphviz)))
1803 ("freeglut" ,freeglut)
1808 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1809 (string-append "-DBOOST_ROOT="
1810 (assoc-ref %build-inputs "boost")))))
1811 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1813 "High-level 3D visualization library with Open Inventor 2.1 API")
1815 "Coin is a 3D graphics library with an Application Programming Interface
1816 based on the Open Inventor 2.1 API. For those who are not familiar with
1817 Open Inventor, it is a scene-graph based retain-mode rendering and model
1818 interaction library, written in C++, which has become the de facto
1819 standard graphics library for 3D visualization and visual simulation
1820 software in the scientific and engineering community.")
1821 (license license:bsd-3))))
1823 (define-public coin3D-4
1831 (url "https://github.com/coin3d/coin")
1832 (commit (string-append "Coin-" version))
1834 (file-name (git-file-name name version))
1836 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1837 (modules '((guix build utils)))
1841 (for-each delete-file
1843 "cfg/wrapmsvc.exe"))
1844 ;; Delete references to packaging tool cpack. Otherwise the build
1845 ;; fails with "add_subdirectory given source "cpack.d" which is not
1846 ;; an existing directory."
1847 (substitute* "CMakeLists.txt"
1848 ((".*cpack.d.*") ""))
1850 (build-system cmake-build-system)
1852 `(("doxygen" ,doxygen)
1853 ("graphviz" ,graphviz)))
1856 ("freeglut" ,freeglut)
1861 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1862 (string-append "-DBOOST_ROOT="
1863 (assoc-ref %build-inputs "boost")))))
1864 (home-page "https://github.com/coin3d/coin")
1866 "High-level 3D visualization library with Open Inventor 2.1 API")
1868 "Coin is a 3D graphics library with an Application Programming Interface
1869 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1870 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1871 library, written in C++, which has become the de facto standard graphics
1872 library for 3D visualization and visual simulation software in the scientific
1873 and engineering community.")
1874 (license license:bsd-3)))
1876 (define-public superfamiconv
1878 (name "superfamiconv")
1884 (url "https://github.com/Optiroc/SuperFamiconv")
1885 (commit (string-append "v" version))))
1886 (file-name (git-file-name name version))
1889 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1890 (build-system gnu-build-system)
1892 `(#:tests? #f ; no tests
1894 (modify-phases %standard-phases
1897 (lambda* (#:key outputs #:allow-other-keys)
1898 (let* ((outdir (assoc-ref outputs "out"))
1899 (bindir (string-append outdir "/bin")))
1900 (install-file "bin/superfamiconv" bindir)
1902 (home-page "https://github.com/Optiroc/SuperFamiconv")
1903 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1904 and PC Engine formats")
1905 (description "SuperFamiconv is a converter for tiled graphics, supporting
1906 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1907 Automated palette selection is supported.")
1908 (license license:expat)))
1910 (define-public drawpile
1911 ;; This commit fix building with libmicrohttpd>=0.71.
1912 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1916 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1920 (url "https://github.com/drawpile/Drawpile")
1922 (file-name (git-file-name name version))
1925 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1926 (build-system qt-build-system)
1929 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1931 `(("extra-cmake-modules" ,extra-cmake-modules)
1932 ("pkg-config" ,pkg-config)))
1934 `(("giflib" ,giflib)
1935 ("karchive" ,karchive)
1937 ("libmicrohttpd" ,libmicrohttpd)
1938 ("libsodium" ,libsodium)
1941 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1942 ("qtbase" ,qtbase-5)
1943 ("qtkeychain" ,qtkeychain)
1944 ("qtmultimedia" ,qtmultimedia)
1946 ("qtx11extras" ,qtx11extras)))
1947 (home-page "https://drawpile.net")
1948 (synopsis "Collaborative drawing program")
1949 (description "Drawpile is a drawing program that allows share the canvas
1950 with other users in real time.
1952 Some feature highlights:
1954 @item Shared canvas using the built-in server or a dedicated server
1955 @item Record, play back and export drawing sessions
1956 @item Simple animation support
1957 @item Layers and blending modes
1959 @item Supports pressure sensitive Wacom tablets
1961 @item Supports OpenRaster file format
1962 @item Encrypted connections using SSL
1963 @item Automatic port forwarding with UPnP
1965 (license license:gpl3+))))
1967 (define-public monado
1973 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1974 name "/-/archive/v" version "/"
1975 name "-v" version ".tar.bz2"))
1978 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1979 (build-system meson-build-system)
1981 `(("ffmpeg" ,ffmpeg)
1982 ("glslang" ,glslang)
1986 ("libxrandr" ,libxrandr)
1989 ("vulkan-loader" ,vulkan-loader)))
1992 ("pkg-config" ,pkg-config)
1993 ("vulkan-headers" ,vulkan-headers)))
1996 (list "-Dinstall-active-runtime=false")))
1997 (home-page "https://monado.freedesktop.org/")
1998 (synopsis "OpenXR runtime")
1999 (description "Monado is an OpenXR runtime delivering immersive experiences
2000 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
2001 a complete and conforming implementation of the OpenXR API made by Khronos.")
2002 (license license:boost1.0)))