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
181 (url "https://github.com/NVIDIA/egl-wayland")
184 (git-file-name name version))
186 (base32 "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk"))))
187 (build-system meson-build-system)
189 `(("pkg-config" ,pkg-config)))
192 ("wayland" ,wayland)))
194 `(("eglexternalplatform" ,eglexternalplatform)))
195 (synopsis "EGLStream-based Wayland external platform")
196 (description "EGL-Wayland is an implementation of a EGL External Platform
197 library to add client-side Wayland support to EGL on top of EGLDevice and
198 EGLStream families of extensions.")
199 (home-page "https://github.com/NVIDIA/egl-wayland")
200 (license license:expat)))
211 (url "https://github.com/hodefoting/mmm")
214 (git-file-name name version))
216 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
217 (build-system meson-build-system)
220 ("pkg-config" ,pkg-config)))
225 (synopsis "Memory Mapped Machine")
226 (description "MMM is a shared memory protocol for virtualising access to
227 framebuffer graphics, audio output and input event.")
228 (home-page "https://github.com/hodefoting/mrg")
229 (license license:isc)))
231 (define-public directfb
240 (url "https://github.com/deniskropp/DirectFB")
241 (commit "DIRECTFB_1_7_7")))
242 (file-name (git-file-name name version))
244 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
245 (build-system gnu-build-system)
248 (modify-phases %standard-phases
249 (add-after 'unpack 'disable-configure-during-bootstrap
251 (substitute* "autogen.sh"
252 (("^.*\\$srcdir/configure.*") ""))
255 `(("autoconf" ,autoconf)
256 ("automake" ,automake)
259 ("pkg-config" ,pkg-config)))
263 ("freetype" ,freetype)
265 ("gstreamer" ,gstreamer)
268 ("jpeg" ,libjpeg-turbo)
271 ("libtimidity" ,libtimidity)
272 ("linux-headers" ,linux-libre-headers)
284 ("vorbisfile" ,libvorbis)
288 ("xcomposite" ,libxcomposite)
290 ("xproto" ,xorgproto)
294 (synopsis "DFB Graphics Library")
295 (description "DirectFB is a graphics library which was designed with embedded
296 systems in mind. It offers maximum hardware accelerated performance at a
297 minimum of resource usage and overhead.")
298 (home-page "https://github.com/deniskropp/DirectFB")
299 (license license:lgpl2.1+)))
310 (url "https://github.com/deniskropp/flux")
312 (file-name (git-file-name name version))
314 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
315 (build-system gnu-build-system)
317 `(("autoconf" ,autoconf)
318 ("automake" ,automake)
320 ("pkg-config" ,pkg-config)))
321 (synopsis "Interface description language")
322 (description "Flux is an interface description language used by DirectFB.
323 Fluxcomp compiles .flux files to .cpp or .c files.")
324 (home-page "https://www.directfb.org/")
325 (license license:lgpl2.1+))) ; Same as DirectFB
335 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
337 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
338 (build-system gnu-build-system)
341 (modify-phases %standard-phases
342 (add-after 'unpack 'patch
344 (substitute* "configure"
345 (("-I/usr/include/freetype2")
348 (assoc-ref %build-inputs "freetype")
349 "/include/freetype2"))))
352 `(("doxygen" ,doxygen)))
355 ("freetype" ,freetype)
358 ("jpeg" ,libjpeg-turbo)
362 ("xcursor" ,libxcursor)
364 ("xfixes" ,libxfixes)
367 ("xrandr" ,libxrandr)
368 ("xrender" ,libxrender)
369 ("xshm" ,libxshmfence)
371 (synopsis "Widget Toolkit for building GUI")
372 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
373 Graphical User Interfaces easily and effectively. It offers a wide, and
374 growing, collection of Controls, and provides state of the art facilities such
375 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
376 manipulation. FOX also implements icons, images, and user-convenience features
377 such as status line help, and tooltips. Tooltips may even be used for 3D
379 (home-page "http://www.fox-toolkit.org")
380 (license license:lgpl2.1+)))
382 (define-public autotrace
383 (let ((commit "travis-20190624.59")
384 (version-base "0.40.0"))
387 (version (string-append version-base "-"
388 (if (string-prefix? "travis-" commit)
389 (string-drop commit 7)
394 (url "https://github.com/autotrace/autotrace")
396 (file-name (git-file-name name version))
399 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
400 (build-system gnu-build-system)
402 `(#:phases (modify-phases %standard-phases
403 ;; See: https://github.com/autotrace/autotrace/issues/27.
404 (add-after 'unpack 'include-spline.h-header
406 (substitute* "Makefile.am"
407 ((".*src/types.h.*" all)
408 (string-append all "\t\tsrc/spline.h \\\n")))
410 ;; See: https://github.com/autotrace/autotrace/issues/26.
413 (invoke "sh" "tests/runtests.sh"))))))
416 ("pkg-config" ,pkg-config)
417 ("autoconf" ,autoconf)
418 ("automake" ,automake)
419 ("intltool" ,intltool)
421 ("gettext" ,gettext-minimal)))
424 ("libjpeg" ,libjpeg-turbo)
426 ("imagemagick" ,imagemagick)
427 ("pstoedit" ,pstoedit)))
428 (home-page "https://github.com/autotrace/autotrace")
429 (synopsis "Bitmap to vector graphics converter")
430 (description "AutoTrace is a utility for converting bitmap into vector
431 graphics. It can trace outlines and midlines, effect color reduction or
432 despeckling and has support for many input and output formats. It can be used
433 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
434 (license (list license:gpl2+ ;for the utility itself
435 license:lgpl2.1+))))) ;for use as a library
437 (define-public embree
444 (url "https://github.com/embree/embree")
445 (commit (string-append "v" version))))
446 (file-name (git-file-name name version))
449 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
450 (build-system cmake-build-system)
452 `(#:tests? #f ; no tests (apparently)
455 "-DEMBREE_ISPC_SUPPORT=OFF")))
459 (home-page "https://www.embree.org/")
460 (synopsis "High performance ray tracing kernels")
462 "Embree is a collection of high-performance ray tracing kernels.
463 Embree is meant to increase performance of photo-realistic rendering
465 (license license:asl2.0)))
467 (define-public openvdb
474 (url "https://github.com/AcademySoftwareFoundation/openvdb/")
475 (commit (string-append "v" version))
477 (file-name (git-file-name name version))
480 "0qzx6l5c183k6j9zki31gg9aixf5s1j46wdi7wr1h3bz7k53syg9"))))
481 (build-system cmake-build-system)
484 (list (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
485 (assoc-ref %outputs "out") "/lib"))))
493 `(("pkg-config" ,pkg-config)))
494 (home-page "https://www.openvdb.org/")
495 (synopsis "Sparse volume data structure and tools")
496 (description "OpenVDB is a C++ library comprising a hierarchical data
497 structure and a large suite of tools for the efficient storage and
498 manipulation of sparse volumetric data discretized on three-dimensional grids.
499 It was developed by DreamWorks Animation for use in volumetric applications
500 typically encountered in feature film production.")
501 (license license:mpl2.0)))
503 (define-public blender
509 (uri (string-append "https://download.blender.org/source/"
510 "blender-" version ".tar.xz"))
513 "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm"))))
514 (build-system cmake-build-system)
516 (let ((python-version (version-major+minor (package-version python))))
517 `(;; Test files are very large and not included in the release tarball.
520 (list "-DWITH_CODEC_FFMPEG=ON"
521 "-DWITH_CODEC_SNDFILE=ON"
523 "-DWITH_DOC_MANPAGE=ON"
525 "-DWITH_IMAGE_OPENJPEG=ON"
526 "-DWITH_INPUT_NDOF=ON"
527 "-DWITH_INSTALL_PORTABLE=OFF"
529 "-DWITH_MOD_OCEANSIM=ON"
531 "-DWITH_OPENSUBDIV=ON"
532 "-DWITH_PYTHON_INSTALL=OFF"
533 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
534 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
536 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
537 "/include/python" ,python-version)
538 (string-append "-DPYTHON_VERSION=" ,python-version)
539 (string-append "-DPYTHON_NUMPY_PATH="
540 (assoc-ref %build-inputs "python-numpy")
541 "/lib/python" ,python-version "/site-packages/"))
543 (modify-phases %standard-phases
544 ;; XXX This file doesn't exist in the Git sources but will probably
545 ;; exist in the eventual 2.80 source tarball.
546 (add-after 'unpack 'fix-broken-import
548 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
549 (("import encode_bin") "from . import encode_bin"))
551 (add-after 'set-paths 'add-ilmbase-include-path
552 (lambda* (#:key inputs #:allow-other-keys)
553 ;; OpenEXR propagates ilmbase, but its include files do not appear
554 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
555 ;; the CPATH to satisfy the dependency on "half.h".
557 (string-append (assoc-ref inputs "ilmbase")
559 ":" (or (getenv "CPATH") "")))
563 ("jemalloc" ,jemalloc)
566 ("libxrender" ,libxrender)
567 ("opencolorio" ,opencolorio)
568 ("openimageio" ,openimageio)
570 ("opensubdiv" ,opensubdiv)
572 ("openjpeg" ,openjpeg)
573 ("libjpeg" ,libjpeg-turbo)
579 ("libsndfile" ,libsndfile)
580 ("freetype" ,freetype)
585 ("python-numpy" ,python-numpy)
590 (home-page "https://blender.org/")
591 (synopsis "3D graphics creation suite")
593 "Blender is a 3D graphics creation suite. It supports the entirety of
594 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
595 compositing and motion tracking, even video editing and game creation. The
596 application can be customized via its API for Python scripting.")
597 (license license:gpl2+)))
599 (define-public blender-2.79
605 (uri (string-append "https://download.blender.org/source/"
606 "blender-" version ".tar.gz"))
609 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
610 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
611 "blender-2.79-oiio2.patch"
612 ;; The following patches may be
613 ;; needed when the default GCC is
615 ;; "blender-2.79-gcc8.patch"
616 ;; "blender-2.79-gcc9.patch"
617 "blender-2.79-python-3.7-fix.patch"
618 "blender-2.79-python-3.8-fix.patch"))))
619 (build-system cmake-build-system)
621 (let ((python-version (version-major+minor (package-version python))))
622 `(;; Test files are very large and not included in the release tarball.
625 (list "-DWITH_CODEC_FFMPEG=ON"
626 "-DWITH_CODEC_SNDFILE=ON"
628 "-DWITH_DOC_MANPAGE=ON"
630 "-DWITH_GAMEENGINE=ON"
631 "-DWITH_IMAGE_OPENJPEG=ON"
632 "-DWITH_INPUT_NDOF=ON"
633 "-DWITH_INSTALL_PORTABLE=OFF"
635 "-DWITH_MOD_OCEANSIM=ON"
637 "-DWITH_PYTHON_INSTALL=OFF"
638 "-DWITH_PYTHON_INSTALL=OFF"
639 "-DWITH_SYSTEM_OPENJPEG=ON"
640 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
641 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
643 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
644 "/include/python" ,python-version)
645 (string-append "-DPYTHON_VERSION=" ,python-version))
647 (modify-phases %standard-phases
648 (add-after 'unpack 'fix-broken-import
650 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
651 (("import encode_bin") "from . import encode_bin"))
653 (add-after 'set-paths 'add-ilmbase-include-path
654 (lambda* (#:key inputs #:allow-other-keys)
655 ;; OpenEXR propagates ilmbase, but its include files do not appear
656 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
657 ;; the CPATH to satisfy the dependency on "half.h".
659 (string-append (assoc-ref inputs "ilmbase")
661 ":" (or (getenv "CPATH") "")))
665 ("jemalloc" ,jemalloc)
667 ("opencolorio" ,opencolorio)
668 ("openimageio" ,openimageio)
671 ("openjpeg" ,openjpeg)
672 ("libjpeg" ,libjpeg-turbo)
678 ("libsndfile" ,libsndfile)
679 ("freetype" ,freetype)
685 (home-page "https://blender.org/")
686 (synopsis "3D graphics creation suite")
688 "Blender is a 3D graphics creation suite. It supports the entirety of
689 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
690 compositing and motion tracking, even video editing and game creation. The
691 application can be customized via its API for Python scripting.
693 NOTE: This older version of Blender is the last release that does not require
694 OpenGL 3. It is retained for use with older computers.")
695 (license license:gpl2+)))
704 (url "https://github.com/guillaumechereau/goxel")
705 (commit (string-append "v" version))))
706 (file-name (git-file-name name version))
709 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
710 (build-system gnu-build-system)
713 #:phases (modify-phases %standard-phases (delete 'configure))
714 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
717 `(("pkg-config" ,pkg-config)))
722 (home-page "https://goxel.xyz/")
723 (synopsis "Voxel editor")
725 "Goxel is a voxel editor that features unlimited scene size, unlimited
726 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
727 and export to various formats including the format used by Magicavoxel.")
728 (license license:gpl3+)))
730 (define-public assimp
737 (url "https://github.com/assimp/assimp")
738 (commit (string-append "v" version))))
739 (file-name (git-file-name name version))
742 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
743 (build-system cmake-build-system)
746 (home-page "http://www.assimp.org/")
747 (synopsis "Asset import library")
749 "The Open Asset Import Library loads more than 40 3D file formats into
750 one unified data structure. Additionally, assimp features various mesh post
751 processing tools: normals and tangent space generation, triangulation, vertex
752 cache locality optimization, removal of degenerate primitives and duplicate
753 vertices, sorting by primitive type, merging of redundant materials and many
755 (license license:bsd-3)))
764 "https://github.com/CGAL/cgal/releases/download/v" version
765 "/CGAL-" version ".tar.xz"))
768 "1rhrpjsp4081nn2q215h78kc4msrj0081zg65k1gfp5hl88bg03y"))))
769 (build-system cmake-build-system)
771 '(#:tests? #f)) ; no test target
776 (home-page "https://www.cgal.org/")
777 (synopsis "Computational geometry algorithms library")
779 "CGAL provides easy access to efficient and reliable geometric algorithms
780 in the form of a C++ library. CGAL is used in various areas needing geometric
781 computation, such as: computer graphics, scientific visualization, computer
782 aided design and modeling, geographic information systems, molecular biology,
783 medical imaging, robotics and motion planning, mesh generation, numerical
784 methods, etc. It provides data structures and algorithms such as
785 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
788 ;; The 'LICENSE' file explains that a subset is available under more
789 ;; permissive licenses.
790 (license license:gpl3+)))
792 (define-public ilmbase
799 (url "https://github.com/openexr/openexr")
800 (commit (string-append "v" version))))
801 (file-name (git-file-name "ilmbase" version))
804 "0mjzb3fd8b9pcqmrgy5cdsmvqd70hmlvjnfypi66v59h3fhrmgd8"))
805 (patches (search-patches "ilmbase-fix-tests.patch"))))
806 (build-system cmake-build-system)
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'change-directory
813 (home-page "https://www.openexr.com/")
814 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
816 "IlmBase provides several utility libraries for C++. Half is a class
817 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
818 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
819 quaternions and other useful 2D and 3D math functions. Iex is an
820 exception-handling library.")
821 (license license:bsd-3)))
823 (define-public lib2geom
824 ;; Use the latest master commit, as the 1.0 release suffer build problems.
826 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
829 (version (git-version "1.0" revision commit))
833 (url "https://gitlab.com/inkscape/lib2geom.git")
835 (file-name (git-file-name name version))
838 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
840 ;; Patch submitted to upstream (see:
841 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
842 (search-patches "lib2geom-fix-tests.patch"))
843 (modules '((guix build utils)))
846 ;; Fix py2geom module initialization (see:
847 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
848 (substitute* "src/py2geom/__init__.py"
849 (("_py2geom") "py2geom._py2geom"))
851 (build-system cmake-build-system)
853 `(#:imported-modules ((guix build python-build-system)
854 ,@%cmake-build-system-modules)
855 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
856 "-D2GEOM_BOOST_PYTHON=ON"
857 ;; Compiling the Cython bindings fail (see:
858 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
859 "-D2GEOM_CYTHON_BINDINGS=OFF")
861 (modify-phases %standard-phases
862 (add-after 'unpack 'patch-python-lib-install-path
863 (lambda* (#:key inputs outputs #:allow-other-keys)
864 (let* ((python-version (@ (guix build python-build-system)
866 (python-maj-min-version (python-version
867 (assoc-ref inputs "python")))
868 (site-package (string-append
869 (assoc-ref outputs "out")
870 "/lib/python" python-maj-min-version
872 (substitute* '("src/cython/CMakeLists.txt"
873 "src/py2geom/CMakeLists.txt")
874 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
875 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
877 (native-inputs `(("python" ,python-wrapper)
878 ("googletest" ,googletest)
879 ("pkg-config" ,pkg-config)))
880 (inputs `(("cairo" ,cairo)
881 ("pycairo" ,python-pycairo)
882 ("double-conversion" ,double-conversion)
886 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
887 (home-page "https://gitlab.com/inkscape/lib2geom/")
888 (synopsis "C++ 2D graphics library")
889 (description "2geom is a C++ library of mathematics for paths, curves,
890 and other geometric calculations. Designed for vector graphics, it tackles
891 Bézier curves, conic sections, paths, intersections, transformations, and
893 ;; Because the library is linked with the GNU Scientific Library
894 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
895 ;; https://gitlab.com/inkscape/inkscape/issues/784).
896 (license license:gpl3+))))
898 (define-public pstoedit
904 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
905 version "/pstoedit-" version ".tar.gz"))
908 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
909 (build-system gnu-build-system)
911 `(("pkg-config" ,pkg-config)))
913 `(("ghostscript" ,ghostscript)
914 ("imagemagick" ,imagemagick)
915 ("libplot" ,plotutils)
916 ("libjpeg" ,libjpeg-turbo)
917 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
918 (home-page "http://www.pstoedit.net/")
919 (synopsis "Converter for PostScript and PDF graphics")
920 (description "The @code{pstoedit} utility allows translating graphics
921 in the PostScript or PDF (Portable Document Format) formats to various
922 other vector formats such as:
927 @item Flattened PostScript
928 @item DXF, a CAD (Computed-Aided Design) exchange format
929 @item PIC (for troff/groff)
930 @item MetaPost (for usage with TeX/LaTeX)
931 @item LaTeX2e picture
932 @item GNU Metafile (for use with plotutils/libplot)
933 @item Any format supported by ImageMagick
935 (license license:gpl2+)))
937 (define-public dear-imgui
945 (url "https://github.com/ocornut/imgui")
946 (commit (string-append "v" version))))
947 (file-name (git-file-name name version))
949 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
950 (build-system gnu-build-system)
953 (list (string-append "CC=" ,(cc-for-target))
954 (string-append "PREFIX=" (assoc-ref %outputs "out"))
955 (string-append "VERSION=" ,version))
956 #:tests? #f ; no test suite
958 (modify-phases %standard-phases
959 (add-after 'unpack 'unpack-debian-files
960 (lambda* (#:key inputs #:allow-other-keys)
961 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
962 (apply invoke "patch" "-Np1" "-i"
963 (find-files "debian/patches" "\\.patch$"))
964 (substitute* "Makefile"
965 (("<stb/") "<") ; Guix doesn't use this subdirectory
966 ;; Don't build or install the static library.
967 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
968 (substitute* (list "imgui.pc.in"
970 ;; Don't link against a non-existent library.
973 (delete 'configure) ; no configure script
975 ;; The default ‘install’ target installs the static library. Don't.
976 (lambda* (#:key make-flags #:allow-other-keys)
977 (apply invoke "make" "install-shared" "install-header"
981 ;; Upstream doesn't provide a build system. Use Debian's.
984 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
985 version "+ds-1.debian.tar.xz"))
987 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
988 ("pkg-config" ,pkg-config)))
990 `(("freetype" ,freetype)
991 ("stb-rect-pack" ,stb-rect-pack)
992 ("stb-truetype" ,stb-truetype)))
993 (home-page "https://github.com/ocornut/imgui")
994 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
996 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
997 It creates optimized vertex buffers that you can render anytime in your
998 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
999 self-contained, without external dependencies.
1001 Dear ImGui is aimed at content creation, visualization, and debugging tools as
1002 opposed to average end-user interfaces. Hence it favors simplicity and
1003 productivity but lacks certain features often found in higher-level libraries.
1004 It is particularly suited to integration in game engine tooling, real-time 3D
1005 applications, full-screen applications, and embedded platforms without standard
1006 operating system features.")
1007 (license license:expat))) ; some examples/ use the zlib licence
1017 (url "https://github.com/OGRECave/ogre")
1018 (commit (string-append "v" version))))
1019 (file-name (git-file-name name version))
1021 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
1022 (build-system cmake-build-system)
1025 (modify-phases %standard-phases
1026 (add-before 'configure 'unpack-dear-imgui
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (copy-recursively (assoc-ref inputs "dear-imgui-source")
1029 "../dear-imgui-source")
1031 (add-before 'configure 'pre-configure
1032 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1033 ;; a consequence, we cannot suggest ours in configure flags. Fix
1035 (lambda* (#:key inputs outputs #:allow-other-keys)
1036 (substitute* "CMakeLists.txt"
1037 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1040 (let* ((out (assoc-ref %outputs "out"))
1042 (string-join (list (string-append out "/lib")
1043 (string-append out "/lib/OGRE"))
1045 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1046 "-DIMGUI_DIR=../dear-imgui-source"
1047 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1048 "-DOGRE_BUILD_TESTS=TRUE"
1049 "-DOGRE_INSTALL_DOCS=TRUE"
1050 "-DOGRE_INSTALL_SAMPLES=TRUE"
1051 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1054 ("dear-imgui-source" ,(package-source dear-imgui))
1055 ("doxygen" ,doxygen)
1056 ("googletest" ,googletest-1.8)
1057 ("pkg-config" ,pkg-config)))
1059 `(("font-dejavu" ,font-dejavu)
1060 ("freeimage" ,freeimage)
1061 ("freetype" ,freetype)
1064 ("libxrandr" ,libxrandr)
1065 ("pugixml" ,pugixml)
1067 ("tinyxml" ,tinyxml)
1068 ("zziplib" ,zziplib)))
1069 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1071 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1072 flexible 3D engine written in C++ designed to make it easier and more intuitive
1073 for developers to produce applications utilising hardware-accelerated 3D
1075 (home-page "https://www.ogre3d.org/")
1076 (license license:expat)))
1078 (define-public openexr
1081 (version (package-version ilmbase))
1083 (inherit (package-source ilmbase))
1084 (file-name (git-file-name "openexr" version))
1085 (modules '((guix build utils)))
1088 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1092 (build-system cmake-build-system)
1095 (modify-phases %standard-phases
1096 (add-after 'unpack 'change-directory
1100 (add-after 'change-directory 'increase-test-timeout
1102 ;; On armhf-linux, we need to override the CTest default
1103 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1104 (substitute* "IlmImfTest/CMakeLists.txt"
1105 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1108 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1110 ,@(if (not (target-64bit?))
1111 `((add-after 'change-directory 'disable-broken-test
1112 ;; This test fails on i686. Upstream developers suggest that
1113 ;; this test is broken on i686 and can be safely disabled:
1114 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1116 (substitute* "IlmImfTest/main.cpp"
1117 ((".*testOptimizedInterleavePatterns.*") ""))
1121 `(("pkg-config" ,pkg-config)))
1123 `(("ilmbase" ,ilmbase) ;used in public headers
1124 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1125 (home-page "https://www.openexr.com/")
1126 (synopsis "High-dynamic range file format library")
1128 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1129 use in computer imaging applications. The IlmImf C++ libraries support
1130 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1131 (license license:bsd-3)))
1133 (define-public openimageio
1135 (name "openimageio")
1136 (version "2.2.10.1")
1140 (url "https://github.com/OpenImageIO/oiio")
1141 (commit (string-append "Release-" version))))
1142 (file-name (git-file-name name version))
1145 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1146 (build-system cmake-build-system)
1147 ;; FIXME: To run all tests successfully, test image sets from multiple
1148 ;; third party sources have to be present. For details see
1149 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1152 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1154 `(("pkg-config" ,pkg-config)))
1159 ("libjpeg" ,libjpeg-turbo)
1160 ("libtiff" ,libtiff)
1162 ("openexr" ,openexr)
1163 ("ilmbase" ,ilmbase)
1164 ("pugixml" ,pugixml)
1165 ("python" ,python-wrapper)
1166 ("pybind11" ,pybind11)
1167 ("robin-map" ,robin-map)
1169 (synopsis "C++ library for reading and writing images")
1171 "OpenImageIO is a library for reading and writing images, and a bunch of
1172 related classes, utilities, and applications. There is a particular emphasis
1173 on formats and functionality used in professional, large-scale animation and
1174 visual effects work for film.")
1175 (home-page "https://www.openimageio.org")
1176 (license license:bsd-3)))
1178 (define-public openscenegraph
1180 (name "openscenegraph")
1186 (url "https://github.com/openscenegraph/OpenSceneGraph")
1187 (commit (string-append "OpenSceneGraph-" version))))
1189 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1190 (file-name (git-file-name name version))))
1192 `((upstream-name . "OpenSceneGraph")))
1193 (build-system cmake-build-system)
1195 `(#:tests? #f ; no test target available
1196 ;; Without this flag, 'rd' will be added to the name of the
1197 ;; library binaries and break linking with other programs.
1198 #:build-type "Release"
1200 (list (string-append "-DCMAKE_INSTALL_RPATH="
1201 (assoc-ref %outputs "out") "/lib:"
1202 (assoc-ref %outputs "out") "/lib64"))))
1204 `(("pkg-config" ,pkg-config)
1207 `(("giflib" ,giflib)
1208 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1210 ("librsvg" ,librsvg)
1211 ("libxrandr" ,libxrandr)
1214 (synopsis "High-performance real-time graphics toolkit")
1216 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1217 used by application developers in fields such as visual simulation, games,
1218 virtual reality, scientific visualization and modeling.")
1219 (home-page "http://www.openscenegraph.org")
1220 ;; The 'LICENSE' file explains that the source is licensed under
1221 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1222 (license license:lgpl2.1)))
1224 ;; We need this for simgear
1225 (define-public openscenegraph-3.4
1226 (package (inherit openscenegraph)
1227 (name "openscenegraph")
1233 (url "https://github.com/openscenegraph/OpenSceneGraph")
1234 (commit (string-append "OpenSceneGraph-" version))))
1235 (file-name (git-file-name name version))
1238 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1240 (substitute-keyword-arguments (package-arguments openscenegraph)
1241 ((#:configure-flags flags)
1243 ;; The jpeg plugin requires conversion between integers and booleans
1244 "-DCMAKE_CXX_FLAGS=-fpermissive"
1247 `(("libjpeg" ,libjpeg-turbo)
1248 ,@(package-inputs openscenegraph)))))
1251 (define-public openmw-openscenegraph
1252 ;; OpenMW prefers its own fork of openscenegraph:
1253 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1254 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1257 (inherit openscenegraph)
1258 (version (git-version "3.6" "1" commit))
1263 (url "https://github.com/OpenMW/osg/")
1265 (file-name (git-file-name (package-name openscenegraph) version))
1268 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1270 (substitute-keyword-arguments (package-arguments openscenegraph)
1271 ((#:configure-flags flags)
1272 ;; As per the above wiki link, the following plugins are enough:
1274 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1275 "-DBUILD_OSG_PLUGIN_OSG=1"
1276 "-DBUILD_OSG_PLUGIN_DDS=1"
1277 "-DBUILD_OSG_PLUGIN_TGA=1"
1278 "-DBUILD_OSG_PLUGIN_BMP=1"
1279 "-DBUILD_OSG_PLUGIN_JPEG=1"
1280 "-DBUILD_OSG_PLUGIN_PNG=1"
1281 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1282 ;; The jpeg plugin requires conversion between integers and booleans
1283 "-DCMAKE_CXX_FLAGS=-fpermissive")
1286 (define-public povray
1293 (url "https://github.com/POV-Ray/povray")
1294 (commit (string-append "v" version))))
1295 (file-name (git-file-name name version))
1298 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1299 (modules '((guix build utils)))
1302 ;; Delete bundled libraries.
1303 (delete-file-recursively "libraries")
1305 (build-system gnu-build-system)
1307 `(("autoconf" ,autoconf)
1308 ("automake" ,automake)
1309 ("pkg-config" ,pkg-config)))
1312 ("libjpeg" ,libjpeg-turbo)
1314 ("libtiff" ,libtiff)
1315 ("openexr" ,openexr)
1320 (list "COMPILED_BY=Guix"
1321 (string-append "--with-boost-libdir="
1322 (assoc-ref %build-inputs "boost") "/lib")
1323 "--disable-optimiz-arch")
1325 (modify-phases %standard-phases
1326 (add-after 'unpack 'run-prebuild
1328 (setenv "HOME" (getcwd))
1329 (with-directory-excursion "unix"
1330 (substitute* "prebuild.sh"
1331 (("/bin/sh") (which "sh")))
1332 (invoke "sh" "prebuild.sh"))
1334 ;; The bootstrap script is run by the prebuild script in the
1335 ;; "run-prebuild" phase.
1336 (delete 'bootstrap))))
1337 (synopsis "Tool for creating three-dimensional graphics")
1339 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1340 for producing high-quality computer graphics. @code{POV-Ray} creates
1341 three-dimensional, photo-realistic images using a rendering technique called
1342 ray-tracing. It reads in a text file containing information describing the
1343 objects and lighting in a scene and generates an image of that scene from the
1344 view point of a camera also described in the text file. Ray-tracing is not a
1345 fast process by any means, but it produces very high quality images with
1346 realistic reflections, shading, perspective and other effects.")
1347 (home-page "http://www.povray.org/")
1348 (license license:agpl3+)))
1350 (define-public rapicorn
1356 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1357 "rapicorn-" version ".tar.xz"))
1360 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1361 (patches (search-patches "rapicorn-isnan.patch"))))
1362 (build-system gnu-build-system)
1365 (modify-phases %standard-phases
1366 (add-after 'unpack 'fix-tests
1368 ;; Our grep does not support perl regular expressions.
1369 (substitute* "taptool.sh"
1370 (("grep -P") "grep -E"))
1371 ;; Disable path tests because we cannot access /bin or /sbin.
1372 (substitute* "rcore/tests/multitest.cc"
1373 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1375 (add-before 'check 'pre-check
1377 ;; The test suite requires a running X server (with DISPLAY
1378 ;; number 99 or higher).
1379 (system "Xvfb :99 &")
1380 (setenv "DISPLAY" ":99")
1382 (add-after 'unpack 'replace-fhs-paths
1384 (substitute* (cons "Makefile.decl"
1385 (find-files "." "^Makefile\\.in$"))
1386 (("/bin/ls") (which "ls"))
1387 (("/usr/bin/env") (which "env")))
1389 ;; These libraries are listed in the "Required" section of the pkg-config
1392 `(("librsvg" ,librsvg)
1395 ("libxml2" ,libxml2)
1396 ("python2-enum34" ,python2-enum34)))
1398 `(("gdk-pixbuf" ,gdk-pixbuf)
1399 ("libpng" ,libpng-1.2)
1400 ("readline" ,readline)
1401 ("libcroco" ,libcroco)
1402 ("python" ,python-2)
1403 ("cython" ,python2-cython)))
1405 `(("pandoc" ,pandoc)
1408 ("doxygen" ,doxygen)
1409 ("graphviz" ,graphviz)
1410 ("intltool" ,intltool)
1411 ("pkg-config" ,pkg-config)
1412 ("xvfb" ,xorg-server-for-tests)))
1413 (home-page "https://rapicorn.testbit.org/")
1414 (synopsis "Toolkit for rapid development of user interfaces")
1416 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1417 and Python. The user interface is designed in a declarative markup language
1418 and is connected to the programming logic using data bindings and commands.")
1419 (license license:mpl2.0)))
1427 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1431 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1432 (build-system cmake-build-system)
1433 (arguments '(#:tests? #f)) ;no 'test' target
1435 ;; Headers include OpenEXR and IlmBase headers.
1436 (propagated-inputs `(("openexr" ,openexr)))
1438 (home-page "http://ampasctl.sourceforge.net")
1439 (synopsis "Color Transformation Language")
1441 "The Color Transformation Language, or CTL, is a small programming
1442 language that was designed to serve as a building block for digital color
1443 management systems. CTL allows users to describe color transforms in a
1444 concise and unambiguous way by expressing them as programs. In order to apply
1445 a given transform to an image, the color management system instructs a CTL
1446 interpreter to load and run the CTL program that describes the transform. The
1447 original and the transformed image constitute the CTL program's input and
1450 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1451 ;; and headers use different wording.
1452 (license (license:non-copyleft "file://LICENSE"))))
1454 (define-public brdf-explorer
1455 ;; There are no release tarballs, and not even tags in the repo,
1456 ;; so use the latest revision.
1457 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1460 (name "brdf-explorer")
1461 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1465 (url "https://github.com/wdas/brdf")
1469 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1470 (file-name (string-append name "-" version "-checkout"))))
1471 (build-system gnu-build-system)
1473 `(#:phases (modify-phases %standard-phases
1475 (lambda* (#:key outputs #:allow-other-keys)
1476 (let ((out (assoc-ref outputs "out")))
1478 (string-append "prefix=" out)))))
1479 (add-after 'install 'wrap-program
1480 (lambda* (#:key outputs #:allow-other-keys)
1481 (let* ((out (assoc-ref outputs "out"))
1482 (bin (string-append out "/bin"))
1483 (data (string-append
1484 out "/share/brdf")))
1485 (with-directory-excursion bin
1486 (rename-file "brdf" ".brdf-real")
1487 (call-with-output-file "brdf"
1489 (format port "#!/bin/sh
1490 # Run the thing from its home, otherwise it just bails out.
1492 exec -a \"$0\" ~a/.brdf-real~%"
1494 (chmod "brdf" #o555)))
1497 `(("qttools" ,qttools))) ;for 'qmake'
1499 `(("qtbase" ,qtbase)
1502 ("freeglut" ,freeglut)
1504 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1506 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1508 "BRDF Explorer is an application that allows the development and analysis
1509 of bidirectional reflectance distribution functions (BRDFs). It can load and
1510 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1511 language), measured material data from the MERL database, and anisotropic
1512 measured material data from MIT CSAIL. Graphs and visualizations update in
1513 real time as parameters are changed, making it a useful tool for evaluating
1514 and understanding different BRDFs (and other component functions).")
1515 (license license:ms-pl))))
1523 (uri (list (string-append
1524 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1527 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1530 ;; Site was discontinued.
1531 (string-append "http://www.antigrain.com/agg-"
1532 version ".tar.gz")))
1534 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1535 (patches (search-patches "agg-am_c_prototype.patch"))))
1536 (build-system gnu-build-system)
1539 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1541 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1543 "--disable-examples")
1545 (modify-phases %standard-phases
1548 ;; let's call configure from configure phase and not now
1549 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1550 (invoke "sh" "autogen.sh"))))))
1552 `(("pkg-config" ,pkg-config)
1553 ("libtool" ,libtool)
1554 ("autoconf" ,autoconf)
1555 ("automake" ,automake)))
1557 `(("libx11" ,libx11)
1558 ("freetype" ,freetype)
1561 ;; Antigrain.com was discontinued.
1562 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1563 (synopsis "High-quality 2D graphics rendering engine for C++")
1565 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1566 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1567 rendering SVG graphics.")
1568 (license license:gpl2+)))
1570 (define-public python-pastel
1572 (name "python-pastel")
1577 (uri (pypi-uri "pastel" version))
1580 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1581 (build-system python-build-system)
1583 `(#:phases (modify-phases %standard-phases
1585 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1587 `(("python-pytest" ,python-pytest)))
1588 (home-page "https://github.com/sdispater/pastel")
1589 (synopsis "Library to colorize strings in your terminal")
1590 (description "Pastel is a simple library to help you colorize strings in
1592 (license license:expat)))
1594 (define-public python2-pastel
1595 (package-with-python2 python-pastel))
1597 (define-public fgallery
1605 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1606 "fgallery-" version ".zip"))
1609 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1610 (build-system gnu-build-system)
1612 `(#:tests? #f ; no tests
1614 (modify-phases %standard-phases
1618 (lambda* (#:key inputs outputs #:allow-other-keys)
1619 (let* ((out (assoc-ref outputs "out"))
1620 (bin (string-append out "/bin/"))
1621 (share (string-append out "/share/fgallery"))
1622 (man (string-append out "/share/man/man1"))
1623 (perl5lib (getenv "PERL5LIB"))
1624 (script (string-append share "/fgallery")))
1625 (define (bin-directory input-name)
1626 (string-append (assoc-ref inputs input-name) "/bin"))
1629 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1632 (copy-recursively "." share)
1634 ;; fgallery copies files from store when it is run. The
1635 ;; read-only permissions from the store directories will cause
1636 ;; fgallery to fail. Do not preserve file attributes when
1637 ;; copying files to prevent it.
1640 "'cp', '--no-preserve=all'"))
1643 (symlink script (string-append out "/bin/fgallery"))
1645 (wrap-program script
1647 ,(map bin-directory '("imagemagick"
1655 `("PERL5LIB" ":" prefix (,perl5lib)))
1658 `(("unzip" ,unzip)))
1659 ;; TODO: Add missing optional dependency: facedetect.
1661 `(("imagemagick" ,imagemagick)
1664 ("libjpeg" ,libjpeg-turbo)
1667 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1668 ("perl-image-exiftool" ,perl-image-exiftool)
1669 ("jpegoptim" ,jpegoptim)
1670 ("pngcrush" ,pngcrush)
1672 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1673 (synopsis "Static photo gallery generator")
1675 "FGallery is a static, JavaScript photo gallery generator with minimalist
1676 look. The result can be uploaded on any web server without additional
1678 (license license:gpl2+)))
1680 (define-public opensubdiv
1687 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1688 (commit (string-append "v" (string-join (string-split version #\.)
1690 (file-name (git-file-name name version))
1693 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1694 (build-system cmake-build-system)
1696 `(#:phases (modify-phases %standard-phases
1697 (add-before 'configure 'set-glew-location
1698 (lambda* (#:key inputs #:allow-other-keys)
1699 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1701 (add-before 'check 'start-xorg-server
1702 (lambda* (#:key inputs #:allow-other-keys)
1703 ;; The test suite requires a running X server.
1704 (system (string-append (assoc-ref inputs "xorg-server")
1706 (setenv "DISPLAY" ":1")
1709 `(("xorg-server" ,xorg-server-for-tests)))
1712 ("libxrandr" ,libxrandr)
1713 ("libxcursor" ,libxcursor)
1714 ("libxinerama" ,libxinerama)
1718 (home-page "https://graphics.pixar.com/opensubdiv/")
1719 (synopsis "High performance subdivision surface evaluation")
1720 (description "OpenSubdiv is a set of libraries that implement high
1721 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1722 and GPU architectures.")
1723 (license license:asl2.0)))
1725 (define-public opencsg
1726 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1734 (url "https://github.com/floriankirsch/OpenCSG")
1735 (commit (string-append "opencsg-"
1736 (string-map dot-to-dash version)
1738 (file-name (git-file-name name version))
1741 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1742 (build-system gnu-build-system)
1745 (modify-phases %standard-phases
1747 (lambda* (#:key outputs #:allow-other-keys)
1748 (substitute* "src/Makefile"
1749 (("/usr/local") (assoc-ref outputs "out")))
1751 (add-before 'build 'skip-example
1752 (lambda _ (chdir "src") #t)))))
1755 ("freeglut" ,freeglut)))
1756 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1758 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1759 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1760 For example, two shapes can be combined by uniting them, by intersecting them,
1761 or by subtracting one shape from the other.")
1762 (home-page "http://www.opencsg.org/")
1763 (license license:gpl2))))
1765 (define-public coin3D
1766 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1767 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1769 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1773 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1778 (url "https://bitbucket.org/Coin3D/coin")
1779 (changeset changeset)))
1780 (file-name (git-file-name name version))
1782 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1783 (modules '((guix build utils)))
1786 (for-each delete-file
1788 "cfg/wrapmsvc.exe"))
1790 (build-system cmake-build-system)
1792 `(("doxygen" ,doxygen)
1793 ("graphviz" ,graphviz)))
1796 ("freeglut" ,freeglut)
1801 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1802 (string-append "-DBOOST_ROOT="
1803 (assoc-ref %build-inputs "boost")))))
1804 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1806 "High-level 3D visualization library with Open Inventor 2.1 API")
1808 "Coin is a 3D graphics library with an Application Programming Interface
1809 based on the Open Inventor 2.1 API. For those who are not familiar with
1810 Open Inventor, it is a scene-graph based retain-mode rendering and model
1811 interaction library, written in C++, which has become the de facto
1812 standard graphics library for 3D visualization and visual simulation
1813 software in the scientific and engineering community.")
1814 (license license:bsd-3))))
1816 (define-public coin3D-4
1824 (url "https://github.com/coin3d/coin")
1825 (commit (string-append "Coin-" version))
1827 (file-name (git-file-name name version))
1829 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1830 (modules '((guix build utils)))
1834 (for-each delete-file
1836 "cfg/wrapmsvc.exe"))
1837 ;; Delete references to packaging tool cpack. Otherwise the build
1838 ;; fails with "add_subdirectory given source "cpack.d" which is not
1839 ;; an existing directory."
1840 (substitute* "CMakeLists.txt"
1841 ((".*cpack.d.*") ""))
1843 (build-system cmake-build-system)
1845 `(("doxygen" ,doxygen)
1846 ("graphviz" ,graphviz)))
1849 ("freeglut" ,freeglut)
1854 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1855 (string-append "-DBOOST_ROOT="
1856 (assoc-ref %build-inputs "boost")))))
1857 (home-page "https://github.com/coin3d/coin")
1859 "High-level 3D visualization library with Open Inventor 2.1 API")
1861 "Coin is a 3D graphics library with an Application Programming Interface
1862 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1863 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1864 library, written in C++, which has become the de facto standard graphics
1865 library for 3D visualization and visual simulation software in the scientific
1866 and engineering community.")
1867 (license license:bsd-3)))
1869 (define-public superfamiconv
1871 (name "superfamiconv")
1877 (url "https://github.com/Optiroc/SuperFamiconv")
1878 (commit (string-append "v" version))))
1879 (file-name (git-file-name name version))
1882 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1883 (build-system gnu-build-system)
1885 `(#:tests? #f ; no tests
1887 (modify-phases %standard-phases
1890 (lambda* (#:key outputs #:allow-other-keys)
1891 (let* ((outdir (assoc-ref outputs "out"))
1892 (bindir (string-append outdir "/bin")))
1893 (install-file "bin/superfamiconv" bindir)
1895 (home-page "https://github.com/Optiroc/SuperFamiconv")
1896 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1897 and PC Engine formats")
1898 (description "SuperFamiconv is a converter for tiled graphics, supporting
1899 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1900 Automated palette selection is supported.")
1901 (license license:expat)))
1903 (define-public drawpile
1904 ;; This commit fix building with libmicrohttpd>=0.71.
1905 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1909 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1913 (url "https://github.com/drawpile/Drawpile")
1915 (file-name (git-file-name name version))
1918 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1919 (build-system qt-build-system)
1922 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1924 `(("extra-cmake-modules" ,extra-cmake-modules)
1925 ("pkg-config" ,pkg-config)))
1927 `(("giflib" ,giflib)
1928 ("karchive" ,karchive)
1930 ("libmicrohttpd" ,libmicrohttpd)
1931 ("libsodium" ,libsodium)
1934 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1936 ("qtkeychain" ,qtkeychain)
1937 ("qtmultimedia" ,qtmultimedia)
1939 ("qtx11extras" ,qtx11extras)))
1940 (home-page "https://drawpile.net")
1941 (synopsis "Collaborative drawing program")
1942 (description "Drawpile is a drawing program that allows share the canvas
1943 with other users in real time.
1945 Some feature highlights:
1947 @item Shared canvas using the built-in server or a dedicated server
1948 @item Record, play back and export drawing sessions
1949 @item Simple animation support
1950 @item Layers and blending modes
1952 @item Supports pressure sensitive Wacom tablets
1954 @item Supports OpenRaster file format
1955 @item Encrypted connections using SSL
1956 @item Automatic port forwarding with UPnP
1958 (license license:gpl3+))))
1960 (define-public monado
1966 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1967 name "/-/archive/v" version "/"
1968 name "-v" version ".tar.bz2"))
1971 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1972 (build-system meson-build-system)
1974 `(("ffmpeg" ,ffmpeg)
1975 ("glslang" ,glslang)
1979 ("libxrandr" ,libxrandr)
1982 ("vulkan-loader" ,vulkan-loader)))
1985 ("pkg-config" ,pkg-config)
1986 ("vulkan-headers" ,vulkan-headers)))
1989 (list "-Dinstall-active-runtime=false")))
1990 (home-page "https://monado.freedesktop.org/")
1991 (synopsis "OpenXR runtime")
1992 (description "Monado is an OpenXR runtime delivering immersive experiences
1993 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
1994 a complete and conforming implementation of the OpenXR API made by Khronos.")
1995 (license license:boost1.0)))