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"
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_PATH="
539 (assoc-ref %build-inputs "python-numpy")
540 "/lib/python" ,python-version "/site-packages/"))
542 (modify-phases %standard-phases
543 ;; XXX This file doesn't exist in the Git sources but will probably
544 ;; exist in the eventual 2.80 source tarball.
545 (add-after 'unpack 'fix-broken-import
547 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
548 (("import encode_bin") "from . import encode_bin"))
550 (add-after 'set-paths 'add-ilmbase-include-path
551 (lambda* (#:key inputs #:allow-other-keys)
552 ;; OpenEXR propagates ilmbase, but its include files do not appear
553 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
554 ;; the CPATH to satisfy the dependency on "half.h".
556 (string-append (assoc-ref inputs "ilmbase")
558 ":" (or (getenv "CPATH") "")))
562 ("jemalloc" ,jemalloc)
565 ("libxrender" ,libxrender)
566 ("opencolorio" ,opencolorio)
567 ("openimageio" ,openimageio)
569 ("opensubdiv" ,opensubdiv)
571 ("openjpeg" ,openjpeg)
572 ("libjpeg" ,libjpeg-turbo)
578 ("libsndfile" ,libsndfile)
579 ("freetype" ,freetype)
584 ("python-numpy" ,python-numpy)
588 (home-page "https://blender.org/")
589 (synopsis "3D graphics creation suite")
591 "Blender is a 3D graphics creation suite. It supports the entirety of
592 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
593 compositing and motion tracking, even video editing and game creation. The
594 application can be customized via its API for Python scripting.")
595 (license license:gpl2+)))
597 (define-public blender-2.79
603 (uri (string-append "https://download.blender.org/source/"
604 "blender-" version ".tar.gz"))
607 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
608 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
609 "blender-2.79-oiio2.patch"
610 ;; The following patches may be
611 ;; needed when the default GCC is
613 ;; "blender-2.79-gcc8.patch"
614 ;; "blender-2.79-gcc9.patch"
615 "blender-2.79-python-3.7-fix.patch"
616 "blender-2.79-python-3.8-fix.patch"))))
617 (build-system cmake-build-system)
619 (let ((python-version (version-major+minor (package-version python))))
620 `(;; Test files are very large and not included in the release tarball.
623 (list "-DWITH_CODEC_FFMPEG=ON"
624 "-DWITH_CODEC_SNDFILE=ON"
626 "-DWITH_DOC_MANPAGE=ON"
628 "-DWITH_GAMEENGINE=ON"
629 "-DWITH_IMAGE_OPENJPEG=ON"
630 "-DWITH_INPUT_NDOF=ON"
631 "-DWITH_INSTALL_PORTABLE=OFF"
633 "-DWITH_MOD_OCEANSIM=ON"
635 "-DWITH_PYTHON_INSTALL=OFF"
636 "-DWITH_PYTHON_INSTALL=OFF"
637 "-DWITH_SYSTEM_OPENJPEG=ON"
638 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
639 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
641 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
642 "/include/python" ,python-version)
643 (string-append "-DPYTHON_VERSION=" ,python-version))
645 (modify-phases %standard-phases
646 (add-after 'unpack 'fix-broken-import
648 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
649 (("import encode_bin") "from . import encode_bin"))
651 (add-after 'set-paths 'add-ilmbase-include-path
652 (lambda* (#:key inputs #:allow-other-keys)
653 ;; OpenEXR propagates ilmbase, but its include files do not appear
654 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
655 ;; the CPATH to satisfy the dependency on "half.h".
657 (string-append (assoc-ref inputs "ilmbase")
659 ":" (or (getenv "CPATH") "")))
663 ("jemalloc" ,jemalloc)
665 ("opencolorio" ,opencolorio)
666 ("openimageio" ,openimageio)
669 ("openjpeg" ,openjpeg)
670 ("libjpeg" ,libjpeg-turbo)
676 ("libsndfile" ,libsndfile)
677 ("freetype" ,freetype)
683 (home-page "https://blender.org/")
684 (synopsis "3D graphics creation suite")
686 "Blender is a 3D graphics creation suite. It supports the entirety of
687 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
688 compositing and motion tracking, even video editing and game creation. The
689 application can be customized via its API for Python scripting.
691 NOTE: This older version of Blender is the last release that does not require
692 OpenGL 3. It is retained for use with older computers.")
693 (license license:gpl2+)))
702 (url "https://github.com/guillaumechereau/goxel")
703 (commit (string-append "v" version))))
704 (file-name (git-file-name name version))
707 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
708 (build-system gnu-build-system)
711 #:phases (modify-phases %standard-phases (delete 'configure))
712 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
715 `(("pkg-config" ,pkg-config)))
720 (home-page "https://goxel.xyz/")
721 (synopsis "Voxel editor")
723 "Goxel is a voxel editor that features unlimited scene size, unlimited
724 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
725 and export to various formats including the format used by Magicavoxel.")
726 (license license:gpl3+)))
728 (define-public assimp
735 (url "https://github.com/assimp/assimp")
736 (commit (string-append "v" version))))
737 (file-name (git-file-name name version))
740 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
741 (build-system cmake-build-system)
744 (home-page "http://www.assimp.org/")
745 (synopsis "Asset import library")
747 "The Open Asset Import Library loads more than 40 3D file formats into
748 one unified data structure. Additionally, assimp features various mesh post
749 processing tools: normals and tangent space generation, triangulation, vertex
750 cache locality optimization, removal of degenerate primitives and duplicate
751 vertices, sorting by primitive type, merging of redundant materials and many
753 (license license:bsd-3)))
762 "https://github.com/CGAL/cgal/releases/download/v" version
763 "/CGAL-" version ".tar.xz"))
766 "1rhrpjsp4081nn2q215h78kc4msrj0081zg65k1gfp5hl88bg03y"))))
767 (build-system cmake-build-system)
769 '(#:tests? #f)) ; no test target
774 (home-page "https://www.cgal.org/")
775 (synopsis "Computational geometry algorithms library")
777 "CGAL provides easy access to efficient and reliable geometric algorithms
778 in the form of a C++ library. CGAL is used in various areas needing geometric
779 computation, such as: computer graphics, scientific visualization, computer
780 aided design and modeling, geographic information systems, molecular biology,
781 medical imaging, robotics and motion planning, mesh generation, numerical
782 methods, etc. It provides data structures and algorithms such as
783 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
786 ;; The 'LICENSE' file explains that a subset is available under more
787 ;; permissive licenses.
788 (license license:gpl3+)))
790 (define-public ilmbase
797 (url "https://github.com/openexr/openexr")
798 (commit (string-append "v" version))))
799 (file-name (git-file-name "ilmbase" version))
802 "0mjzb3fd8b9pcqmrgy5cdsmvqd70hmlvjnfypi66v59h3fhrmgd8"))
803 (patches (search-patches "ilmbase-fix-tests.patch"))))
804 (build-system cmake-build-system)
806 `(#:phases (modify-phases %standard-phases
807 (add-after 'unpack 'change-directory
811 (home-page "https://www.openexr.com/")
812 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
814 "IlmBase provides several utility libraries for C++. Half is a class
815 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
816 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
817 quaternions and other useful 2D and 3D math functions. Iex is an
818 exception-handling library.")
819 (license license:bsd-3)))
821 (define-public lib2geom
822 ;; Use the latest master commit, as the 1.0 release suffer build problems.
824 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
827 (version (git-version "1.0" revision commit))
831 (url "https://gitlab.com/inkscape/lib2geom.git")
833 (file-name (git-file-name name version))
836 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
838 ;; Patch submitted to upstream (see:
839 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
840 (search-patches "lib2geom-fix-tests.patch"))
841 (modules '((guix build utils)))
844 ;; Fix py2geom module initialization (see:
845 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
846 (substitute* "src/py2geom/__init__.py"
847 (("_py2geom") "py2geom._py2geom"))
849 (build-system cmake-build-system)
851 `(#:imported-modules ((guix build python-build-system)
852 ,@%cmake-build-system-modules)
853 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
854 "-D2GEOM_BOOST_PYTHON=ON"
855 ;; Compiling the Cython bindings fail (see:
856 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
857 "-D2GEOM_CYTHON_BINDINGS=OFF")
859 (modify-phases %standard-phases
860 (add-after 'unpack 'patch-python-lib-install-path
861 (lambda* (#:key inputs outputs #:allow-other-keys)
862 (let* ((python-version (@ (guix build python-build-system)
864 (python-maj-min-version (python-version
865 (assoc-ref inputs "python")))
866 (site-package (string-append
867 (assoc-ref outputs "out")
868 "/lib/python" python-maj-min-version
870 (substitute* '("src/cython/CMakeLists.txt"
871 "src/py2geom/CMakeLists.txt")
872 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
873 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
875 (native-inputs `(("python" ,python-wrapper)
876 ("googletest" ,googletest)
877 ("pkg-config" ,pkg-config)))
878 (inputs `(("cairo" ,cairo)
879 ("pycairo" ,python-pycairo)
880 ("double-conversion" ,double-conversion)
884 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
885 (home-page "https://gitlab.com/inkscape/lib2geom/")
886 (synopsis "C++ 2D graphics library")
887 (description "2geom is a C++ library of mathematics for paths, curves,
888 and other geometric calculations. Designed for vector graphics, it tackles
889 Bézier curves, conic sections, paths, intersections, transformations, and
891 ;; Because the library is linked with the GNU Scientific Library
892 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
893 ;; https://gitlab.com/inkscape/inkscape/issues/784).
894 (license license:gpl3+))))
896 (define-public pstoedit
902 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
903 version "/pstoedit-" version ".tar.gz"))
906 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
907 (build-system gnu-build-system)
909 `(("pkg-config" ,pkg-config)))
911 `(("ghostscript" ,ghostscript)
912 ("imagemagick" ,imagemagick)
913 ("libplot" ,plotutils)
914 ("libjpeg" ,libjpeg-turbo)
915 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
916 (home-page "http://www.pstoedit.net/")
917 (synopsis "Converter for PostScript and PDF graphics")
918 (description "The @code{pstoedit} utility allows translating graphics
919 in the PostScript or PDF (Portable Document Format) formats to various
920 other vector formats such as:
925 @item Flattened PostScript
926 @item DXF, a CAD (Computed-Aided Design) exchange format
927 @item PIC (for troff/groff)
928 @item MetaPost (for usage with TeX/LaTeX)
929 @item LaTeX2e picture
930 @item GNU Metafile (for use with plotutils/libplot)
931 @item Any format supported by ImageMagick
933 (license license:gpl2+)))
935 (define-public dear-imgui
943 (url "https://github.com/ocornut/imgui")
944 (commit (string-append "v" version))))
945 (file-name (git-file-name name version))
947 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
948 (build-system gnu-build-system)
951 (list (string-append "CC=" ,(cc-for-target))
952 (string-append "PREFIX=" (assoc-ref %outputs "out"))
953 (string-append "VERSION=" ,version))
954 #:tests? #f ; no test suite
956 (modify-phases %standard-phases
957 (add-after 'unpack 'unpack-debian-files
958 (lambda* (#:key inputs #:allow-other-keys)
959 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
960 (apply invoke "patch" "-Np1" "-i"
961 (find-files "debian/patches" "\\.patch$"))
962 (substitute* "Makefile"
963 (("<stb/") "<") ; Guix doesn't use this subdirectory
964 ;; Don't build or install the static library.
965 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
966 (substitute* (list "imgui.pc.in"
968 ;; Don't link against a non-existent library.
971 (delete 'configure) ; no configure script
973 ;; The default ‘install’ target installs the static library. Don't.
974 (lambda* (#:key make-flags #:allow-other-keys)
975 (apply invoke "make" "install-shared" "install-header"
979 ;; Upstream doesn't provide a build system. Use Debian's.
982 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
983 version "+ds-1.debian.tar.xz"))
985 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
986 ("pkg-config" ,pkg-config)))
988 `(("freetype" ,freetype)
989 ("stb-rect-pack" ,stb-rect-pack)
990 ("stb-truetype" ,stb-truetype)))
991 (home-page "https://github.com/ocornut/imgui")
992 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
994 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
995 It creates optimized vertex buffers that you can render anytime in your
996 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
997 self-contained, without external dependencies.
999 Dear ImGui is aimed at content creation, visualization, and debugging tools as
1000 opposed to average end-user interfaces. Hence it favors simplicity and
1001 productivity but lacks certain features often found in higher-level libraries.
1002 It is particularly suited to integration in game engine tooling, real-time 3D
1003 applications, full-screen applications, and embedded platforms without standard
1004 operating system features.")
1005 (license license:expat))) ; some examples/ use the zlib licence
1015 (url "https://github.com/OGRECave/ogre")
1016 (commit (string-append "v" version))))
1017 (file-name (git-file-name name version))
1019 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
1020 (build-system cmake-build-system)
1023 (modify-phases %standard-phases
1024 (add-before 'configure 'unpack-dear-imgui
1025 (lambda* (#:key inputs #:allow-other-keys)
1026 (copy-recursively (assoc-ref inputs "dear-imgui-source")
1027 "../dear-imgui-source")
1029 (add-before 'configure 'pre-configure
1030 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1031 ;; a consequence, we cannot suggest ours in configure flags. Fix
1033 (lambda* (#:key inputs outputs #:allow-other-keys)
1034 (substitute* "CMakeLists.txt"
1035 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1038 (let* ((out (assoc-ref %outputs "out"))
1040 (string-join (list (string-append out "/lib")
1041 (string-append out "/lib/OGRE"))
1043 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1044 "-DIMGUI_DIR=../dear-imgui-source"
1045 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1046 "-DOGRE_BUILD_TESTS=TRUE"
1047 "-DOGRE_INSTALL_DOCS=TRUE"
1048 "-DOGRE_INSTALL_SAMPLES=TRUE"
1049 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1052 ("dear-imgui-source" ,(package-source dear-imgui))
1053 ("doxygen" ,doxygen)
1054 ("googletest" ,googletest-1.8)
1055 ("pkg-config" ,pkg-config)))
1057 `(("font-dejavu" ,font-dejavu)
1058 ("freeimage" ,freeimage)
1059 ("freetype" ,freetype)
1062 ("libxrandr" ,libxrandr)
1063 ("pugixml" ,pugixml)
1065 ("tinyxml" ,tinyxml)
1066 ("zziplib" ,zziplib)))
1067 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1069 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1070 flexible 3D engine written in C++ designed to make it easier and more intuitive
1071 for developers to produce applications utilising hardware-accelerated 3D
1073 (home-page "https://www.ogre3d.org/")
1074 (license license:expat)))
1076 (define-public openexr
1079 (version (package-version ilmbase))
1081 (inherit (package-source ilmbase))
1082 (file-name (git-file-name "openexr" version))
1083 (modules '((guix build utils)))
1086 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1090 (build-system cmake-build-system)
1093 (modify-phases %standard-phases
1094 (add-after 'unpack 'change-directory
1098 (add-after 'change-directory 'increase-test-timeout
1100 ;; On armhf-linux, we need to override the CTest default
1101 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1102 (substitute* "IlmImfTest/CMakeLists.txt"
1103 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1106 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1108 ,@(if (not (target-64bit?))
1109 `((add-after 'change-directory 'disable-broken-test
1110 ;; This test fails on i686. Upstream developers suggest that
1111 ;; this test is broken on i686 and can be safely disabled:
1112 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1114 (substitute* "IlmImfTest/main.cpp"
1115 ((".*testOptimizedInterleavePatterns.*") ""))
1119 `(("pkg-config" ,pkg-config)))
1121 `(("ilmbase" ,ilmbase) ;used in public headers
1122 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1123 (home-page "https://www.openexr.com/")
1124 (synopsis "High-dynamic range file format library")
1126 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1127 use in computer imaging applications. The IlmImf C++ libraries support
1128 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1129 (license license:bsd-3)))
1131 (define-public openimageio
1133 (name "openimageio")
1134 (version "2.2.10.1")
1138 (url "https://github.com/OpenImageIO/oiio")
1139 (commit (string-append "Release-" version))))
1140 (file-name (git-file-name name version))
1143 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1144 (build-system cmake-build-system)
1145 ;; FIXME: To run all tests successfully, test image sets from multiple
1146 ;; third party sources have to be present. For details see
1147 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1150 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1152 `(("pkg-config" ,pkg-config)))
1157 ("libjpeg" ,libjpeg-turbo)
1158 ("libtiff" ,libtiff)
1160 ("openexr" ,openexr)
1161 ("ilmbase" ,ilmbase)
1162 ("pugixml" ,pugixml)
1163 ("python" ,python-wrapper)
1164 ("pybind11" ,pybind11)
1165 ("robin-map" ,robin-map)
1167 (synopsis "C++ library for reading and writing images")
1169 "OpenImageIO is a library for reading and writing images, and a bunch of
1170 related classes, utilities, and applications. There is a particular emphasis
1171 on formats and functionality used in professional, large-scale animation and
1172 visual effects work for film.")
1173 (home-page "https://www.openimageio.org")
1174 (license license:bsd-3)))
1176 (define-public openscenegraph
1178 (name "openscenegraph")
1184 (url "https://github.com/openscenegraph/OpenSceneGraph")
1185 (commit (string-append "OpenSceneGraph-" version))))
1187 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1188 (file-name (git-file-name name version))))
1190 `((upstream-name . "OpenSceneGraph")))
1191 (build-system cmake-build-system)
1193 `(#:tests? #f ; no test target available
1194 ;; Without this flag, 'rd' will be added to the name of the
1195 ;; library binaries and break linking with other programs.
1196 #:build-type "Release"
1198 (list (string-append "-DCMAKE_INSTALL_RPATH="
1199 (assoc-ref %outputs "out") "/lib:"
1200 (assoc-ref %outputs "out") "/lib64"))))
1202 `(("pkg-config" ,pkg-config)
1205 `(("giflib" ,giflib)
1206 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1208 ("librsvg" ,librsvg)
1209 ("libxrandr" ,libxrandr)
1212 (synopsis "High-performance real-time graphics toolkit")
1214 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1215 used by application developers in fields such as visual simulation, games,
1216 virtual reality, scientific visualization and modeling.")
1217 (home-page "http://www.openscenegraph.org")
1218 ;; The 'LICENSE' file explains that the source is licensed under
1219 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1220 (license license:lgpl2.1)))
1222 ;; We need this for simgear
1223 (define-public openscenegraph-3.4
1224 (package (inherit openscenegraph)
1225 (name "openscenegraph")
1231 (url "https://github.com/openscenegraph/OpenSceneGraph")
1232 (commit (string-append "OpenSceneGraph-" version))))
1233 (file-name (git-file-name name version))
1236 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1238 (substitute-keyword-arguments (package-arguments openscenegraph)
1239 ((#:configure-flags flags)
1241 ;; The jpeg plugin requires conversion between integers and booleans
1242 "-DCMAKE_CXX_FLAGS=-fpermissive"
1245 `(("libjpeg" ,libjpeg-turbo)
1246 ,@(package-inputs openscenegraph)))))
1249 (define-public openmw-openscenegraph
1250 ;; OpenMW prefers its own fork of openscenegraph:
1251 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1252 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1255 (inherit openscenegraph)
1256 (version (git-version "3.6" "1" commit))
1261 (url "https://github.com/OpenMW/osg/")
1263 (file-name (git-file-name (package-name openscenegraph) version))
1266 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1268 (substitute-keyword-arguments (package-arguments openscenegraph)
1269 ((#:configure-flags flags)
1270 ;; As per the above wiki link, the following plugins are enough:
1272 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1273 "-DBUILD_OSG_PLUGIN_OSG=1"
1274 "-DBUILD_OSG_PLUGIN_DDS=1"
1275 "-DBUILD_OSG_PLUGIN_TGA=1"
1276 "-DBUILD_OSG_PLUGIN_BMP=1"
1277 "-DBUILD_OSG_PLUGIN_JPEG=1"
1278 "-DBUILD_OSG_PLUGIN_PNG=1"
1279 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1280 ;; The jpeg plugin requires conversion between integers and booleans
1281 "-DCMAKE_CXX_FLAGS=-fpermissive")
1284 (define-public povray
1291 (url "https://github.com/POV-Ray/povray")
1292 (commit (string-append "v" version))))
1293 (file-name (git-file-name name version))
1296 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1297 (modules '((guix build utils)))
1300 ;; Delete bundled libraries.
1301 (delete-file-recursively "libraries")
1303 (build-system gnu-build-system)
1305 `(("autoconf" ,autoconf)
1306 ("automake" ,automake)
1307 ("pkg-config" ,pkg-config)))
1310 ("libjpeg" ,libjpeg-turbo)
1312 ("libtiff" ,libtiff)
1313 ("openexr" ,openexr)
1318 (list "COMPILED_BY=Guix"
1319 (string-append "--with-boost-libdir="
1320 (assoc-ref %build-inputs "boost") "/lib")
1321 "--disable-optimiz-arch")
1323 (modify-phases %standard-phases
1324 (add-after 'unpack 'run-prebuild
1326 (setenv "HOME" (getcwd))
1327 (with-directory-excursion "unix"
1328 (substitute* "prebuild.sh"
1329 (("/bin/sh") (which "sh")))
1330 (invoke "sh" "prebuild.sh"))
1332 ;; The bootstrap script is run by the prebuild script in the
1333 ;; "run-prebuild" phase.
1334 (delete 'bootstrap))))
1335 (synopsis "Tool for creating three-dimensional graphics")
1337 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1338 for producing high-quality computer graphics. @code{POV-Ray} creates
1339 three-dimensional, photo-realistic images using a rendering technique called
1340 ray-tracing. It reads in a text file containing information describing the
1341 objects and lighting in a scene and generates an image of that scene from the
1342 view point of a camera also described in the text file. Ray-tracing is not a
1343 fast process by any means, but it produces very high quality images with
1344 realistic reflections, shading, perspective and other effects.")
1345 (home-page "http://www.povray.org/")
1346 (license license:agpl3+)))
1348 (define-public rapicorn
1354 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1355 "rapicorn-" version ".tar.xz"))
1358 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1359 (patches (search-patches "rapicorn-isnan.patch"))))
1360 (build-system gnu-build-system)
1363 (modify-phases %standard-phases
1364 (add-after 'unpack 'fix-tests
1366 ;; Our grep does not support perl regular expressions.
1367 (substitute* "taptool.sh"
1368 (("grep -P") "grep -E"))
1369 ;; Disable path tests because we cannot access /bin or /sbin.
1370 (substitute* "rcore/tests/multitest.cc"
1371 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1373 (add-before 'check 'pre-check
1375 ;; The test suite requires a running X server (with DISPLAY
1376 ;; number 99 or higher).
1377 (system "Xvfb :99 &")
1378 (setenv "DISPLAY" ":99")
1380 (add-after 'unpack 'replace-fhs-paths
1382 (substitute* (cons "Makefile.decl"
1383 (find-files "." "^Makefile\\.in$"))
1384 (("/bin/ls") (which "ls"))
1385 (("/usr/bin/env") (which "env")))
1387 ;; These libraries are listed in the "Required" section of the pkg-config
1390 `(("librsvg" ,librsvg)
1393 ("libxml2" ,libxml2)
1394 ("python2-enum34" ,python2-enum34)))
1396 `(("gdk-pixbuf" ,gdk-pixbuf)
1397 ("libpng" ,libpng-1.2)
1398 ("readline" ,readline)
1399 ("libcroco" ,libcroco)
1400 ("python" ,python-2)
1401 ("cython" ,python2-cython)))
1403 `(("pandoc" ,pandoc)
1406 ("doxygen" ,doxygen)
1407 ("graphviz" ,graphviz)
1408 ("intltool" ,intltool)
1409 ("pkg-config" ,pkg-config)
1410 ("xvfb" ,xorg-server-for-tests)))
1411 (home-page "https://rapicorn.testbit.org/")
1412 (synopsis "Toolkit for rapid development of user interfaces")
1414 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1415 and Python. The user interface is designed in a declarative markup language
1416 and is connected to the programming logic using data bindings and commands.")
1417 (license license:mpl2.0)))
1425 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1429 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1430 (build-system cmake-build-system)
1431 (arguments '(#:tests? #f)) ;no 'test' target
1433 ;; Headers include OpenEXR and IlmBase headers.
1434 (propagated-inputs `(("openexr" ,openexr)))
1436 (home-page "http://ampasctl.sourceforge.net")
1437 (synopsis "Color Transformation Language")
1439 "The Color Transformation Language, or CTL, is a small programming
1440 language that was designed to serve as a building block for digital color
1441 management systems. CTL allows users to describe color transforms in a
1442 concise and unambiguous way by expressing them as programs. In order to apply
1443 a given transform to an image, the color management system instructs a CTL
1444 interpreter to load and run the CTL program that describes the transform. The
1445 original and the transformed image constitute the CTL program's input and
1448 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1449 ;; and headers use different wording.
1450 (license (license:non-copyleft "file://LICENSE"))))
1452 (define-public brdf-explorer
1453 ;; There are no release tarballs, and not even tags in the repo,
1454 ;; so use the latest revision.
1455 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1458 (name "brdf-explorer")
1459 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1463 (url "https://github.com/wdas/brdf")
1467 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1468 (file-name (string-append name "-" version "-checkout"))))
1469 (build-system gnu-build-system)
1471 `(#:phases (modify-phases %standard-phases
1473 (lambda* (#:key outputs #:allow-other-keys)
1474 (let ((out (assoc-ref outputs "out")))
1476 (string-append "prefix=" out)))))
1477 (add-after 'install 'wrap-program
1478 (lambda* (#:key outputs #:allow-other-keys)
1479 (let* ((out (assoc-ref outputs "out"))
1480 (bin (string-append out "/bin"))
1481 (data (string-append
1482 out "/share/brdf")))
1483 (with-directory-excursion bin
1484 (rename-file "brdf" ".brdf-real")
1485 (call-with-output-file "brdf"
1487 (format port "#!/bin/sh
1488 # Run the thing from its home, otherwise it just bails out.
1490 exec -a \"$0\" ~a/.brdf-real~%"
1492 (chmod "brdf" #o555)))
1495 `(("qttools" ,qttools))) ;for 'qmake'
1497 `(("qtbase" ,qtbase)
1500 ("freeglut" ,freeglut)
1502 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1504 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1506 "BRDF Explorer is an application that allows the development and analysis
1507 of bidirectional reflectance distribution functions (BRDFs). It can load and
1508 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1509 language), measured material data from the MERL database, and anisotropic
1510 measured material data from MIT CSAIL. Graphs and visualizations update in
1511 real time as parameters are changed, making it a useful tool for evaluating
1512 and understanding different BRDFs (and other component functions).")
1513 (license license:ms-pl))))
1521 (uri (list (string-append
1522 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1525 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1528 ;; Site was discontinued.
1529 (string-append "http://www.antigrain.com/agg-"
1530 version ".tar.gz")))
1532 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1533 (patches (search-patches "agg-am_c_prototype.patch"))))
1534 (build-system gnu-build-system)
1537 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1539 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1541 "--disable-examples")
1543 (modify-phases %standard-phases
1546 ;; let's call configure from configure phase and not now
1547 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1548 (invoke "sh" "autogen.sh"))))))
1550 `(("pkg-config" ,pkg-config)
1551 ("libtool" ,libtool)
1552 ("autoconf" ,autoconf)
1553 ("automake" ,automake)))
1555 `(("libx11" ,libx11)
1556 ("freetype" ,freetype)
1559 ;; Antigrain.com was discontinued.
1560 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1561 (synopsis "High-quality 2D graphics rendering engine for C++")
1563 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1564 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1565 rendering SVG graphics.")
1566 (license license:gpl2+)))
1568 (define-public python-pastel
1570 (name "python-pastel")
1575 (uri (pypi-uri "pastel" version))
1578 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1579 (build-system python-build-system)
1581 `(#:phases (modify-phases %standard-phases
1583 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1585 `(("python-pytest" ,python-pytest)))
1586 (home-page "https://github.com/sdispater/pastel")
1587 (synopsis "Library to colorize strings in your terminal")
1588 (description "Pastel is a simple library to help you colorize strings in
1590 (license license:expat)))
1592 (define-public python2-pastel
1593 (package-with-python2 python-pastel))
1595 (define-public fgallery
1603 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1604 "fgallery-" version ".zip"))
1607 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1608 (build-system gnu-build-system)
1610 `(#:tests? #f ; no tests
1612 (modify-phases %standard-phases
1616 (lambda* (#:key inputs outputs #:allow-other-keys)
1617 (let* ((out (assoc-ref outputs "out"))
1618 (bin (string-append out "/bin/"))
1619 (share (string-append out "/share/fgallery"))
1620 (man (string-append out "/share/man/man1"))
1621 (perl5lib (getenv "PERL5LIB"))
1622 (script (string-append share "/fgallery")))
1623 (define (bin-directory input-name)
1624 (string-append (assoc-ref inputs input-name) "/bin"))
1627 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1630 (copy-recursively "." share)
1632 ;; fgallery copies files from store when it is run. The
1633 ;; read-only permissions from the store directories will cause
1634 ;; fgallery to fail. Do not preserve file attributes when
1635 ;; copying files to prevent it.
1638 "'cp', '--no-preserve=all'"))
1641 (symlink script (string-append out "/bin/fgallery"))
1643 (wrap-program script
1645 ,(map bin-directory '("imagemagick"
1653 `("PERL5LIB" ":" prefix (,perl5lib)))
1656 `(("unzip" ,unzip)))
1657 ;; TODO: Add missing optional dependency: facedetect.
1659 `(("imagemagick" ,imagemagick)
1662 ("libjpeg" ,libjpeg-turbo)
1665 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1666 ("perl-image-exiftool" ,perl-image-exiftool)
1667 ("jpegoptim" ,jpegoptim)
1668 ("pngcrush" ,pngcrush)
1670 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1671 (synopsis "Static photo gallery generator")
1673 "FGallery is a static, JavaScript photo gallery generator with minimalist
1674 look. The result can be uploaded on any web server without additional
1676 (license license:gpl2+)))
1678 (define-public opensubdiv
1685 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1686 (commit (string-append "v" (string-join (string-split version #\.)
1688 (file-name (git-file-name name version))
1691 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1692 (build-system cmake-build-system)
1694 `(#:phases (modify-phases %standard-phases
1695 (add-before 'configure 'set-glew-location
1696 (lambda* (#:key inputs #:allow-other-keys)
1697 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1699 (add-before 'check 'start-xorg-server
1700 (lambda* (#:key inputs #:allow-other-keys)
1701 ;; The test suite requires a running X server.
1702 (system (string-append (assoc-ref inputs "xorg-server")
1704 (setenv "DISPLAY" ":1")
1707 `(("xorg-server" ,xorg-server-for-tests)))
1710 ("libxrandr" ,libxrandr)
1711 ("libxcursor" ,libxcursor)
1712 ("libxinerama" ,libxinerama)
1716 (home-page "https://graphics.pixar.com/opensubdiv/")
1717 (synopsis "High performance subdivision surface evaluation")
1718 (description "OpenSubdiv is a set of libraries that implement high
1719 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1720 and GPU architectures.")
1721 (license license:asl2.0)))
1723 (define-public opencsg
1724 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1732 (url "https://github.com/floriankirsch/OpenCSG")
1733 (commit (string-append "opencsg-"
1734 (string-map dot-to-dash version)
1736 (file-name (git-file-name name version))
1739 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1740 (build-system gnu-build-system)
1743 (modify-phases %standard-phases
1745 (lambda* (#:key outputs #:allow-other-keys)
1746 (substitute* "src/Makefile"
1747 (("/usr/local") (assoc-ref outputs "out")))
1749 (add-before 'build 'skip-example
1750 (lambda _ (chdir "src") #t)))))
1753 ("freeglut" ,freeglut)))
1754 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1756 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1757 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1758 For example, two shapes can be combined by uniting them, by intersecting them,
1759 or by subtracting one shape from the other.")
1760 (home-page "http://www.opencsg.org/")
1761 (license license:gpl2))))
1763 (define-public coin3D
1764 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1765 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1767 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1771 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1776 (url "https://bitbucket.org/Coin3D/coin")
1777 (changeset changeset)))
1778 (file-name (git-file-name name version))
1780 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1781 (modules '((guix build utils)))
1784 (for-each delete-file
1786 "cfg/wrapmsvc.exe"))
1788 (build-system cmake-build-system)
1790 `(("doxygen" ,doxygen)
1791 ("graphviz" ,graphviz)))
1794 ("freeglut" ,freeglut)
1799 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1800 (string-append "-DBOOST_ROOT="
1801 (assoc-ref %build-inputs "boost")))))
1802 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1804 "High-level 3D visualization library with Open Inventor 2.1 API")
1806 "Coin is a 3D graphics library with an Application Programming Interface
1807 based on the Open Inventor 2.1 API. For those who are not familiar with
1808 Open Inventor, it is a scene-graph based retain-mode rendering and model
1809 interaction library, written in C++, which has become the de facto
1810 standard graphics library for 3D visualization and visual simulation
1811 software in the scientific and engineering community.")
1812 (license license:bsd-3))))
1814 (define-public coin3D-4
1822 (url "https://github.com/coin3d/coin")
1823 (commit (string-append "Coin-" version))
1825 (file-name (git-file-name name version))
1827 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1828 (modules '((guix build utils)))
1832 (for-each delete-file
1834 "cfg/wrapmsvc.exe"))
1835 ;; Delete references to packaging tool cpack. Otherwise the build
1836 ;; fails with "add_subdirectory given source "cpack.d" which is not
1837 ;; an existing directory."
1838 (substitute* "CMakeLists.txt"
1839 ((".*cpack.d.*") ""))
1841 (build-system cmake-build-system)
1843 `(("doxygen" ,doxygen)
1844 ("graphviz" ,graphviz)))
1847 ("freeglut" ,freeglut)
1852 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1853 (string-append "-DBOOST_ROOT="
1854 (assoc-ref %build-inputs "boost")))))
1855 (home-page "https://github.com/coin3d/coin")
1857 "High-level 3D visualization library with Open Inventor 2.1 API")
1859 "Coin is a 3D graphics library with an Application Programming Interface
1860 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1861 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1862 library, written in C++, which has become the de facto standard graphics
1863 library for 3D visualization and visual simulation software in the scientific
1864 and engineering community.")
1865 (license license:bsd-3)))
1867 (define-public superfamiconv
1869 (name "superfamiconv")
1875 (url "https://github.com/Optiroc/SuperFamiconv")
1876 (commit (string-append "v" version))))
1877 (file-name (git-file-name name version))
1880 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1881 (build-system gnu-build-system)
1883 `(#:tests? #f ; no tests
1885 (modify-phases %standard-phases
1888 (lambda* (#:key outputs #:allow-other-keys)
1889 (let* ((outdir (assoc-ref outputs "out"))
1890 (bindir (string-append outdir "/bin")))
1891 (install-file "bin/superfamiconv" bindir)
1893 (home-page "https://github.com/Optiroc/SuperFamiconv")
1894 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1895 and PC Engine formats")
1896 (description "SuperFamiconv is a converter for tiled graphics, supporting
1897 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1898 Automated palette selection is supported.")
1899 (license license:expat)))
1901 (define-public drawpile
1902 ;; This commit fix building with libmicrohttpd>=0.71.
1903 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1907 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1911 (url "https://github.com/drawpile/Drawpile")
1913 (file-name (git-file-name name version))
1916 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1917 (build-system qt-build-system)
1920 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1922 `(("extra-cmake-modules" ,extra-cmake-modules)
1923 ("pkg-config" ,pkg-config)))
1925 `(("giflib" ,giflib)
1926 ("karchive" ,karchive)
1928 ("libmicrohttpd" ,libmicrohttpd)
1929 ("libsodium" ,libsodium)
1932 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1934 ("qtkeychain" ,qtkeychain)
1935 ("qtmultimedia" ,qtmultimedia)
1937 ("qtx11extras" ,qtx11extras)))
1938 (home-page "https://drawpile.net")
1939 (synopsis "Collaborative drawing program")
1940 (description "Drawpile is a drawing program that allows share the canvas
1941 with other users in real time.
1943 Some feature highlights:
1945 @item Shared canvas using the built-in server or a dedicated server
1946 @item Record, play back and export drawing sessions
1947 @item Simple animation support
1948 @item Layers and blending modes
1950 @item Supports pressure sensitive Wacom tablets
1952 @item Supports OpenRaster file format
1953 @item Encrypted connections using SSL
1954 @item Automatic port forwarding with UPnP
1956 (license license:gpl3+))))
1958 (define-public monado
1964 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1965 name "/-/archive/v" version "/"
1966 name "-v" version ".tar.bz2"))
1969 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1970 (build-system meson-build-system)
1972 `(("ffmpeg" ,ffmpeg)
1973 ("glslang" ,glslang)
1977 ("libxrandr" ,libxrandr)
1980 ("vulkan-loader" ,vulkan-loader)))
1983 ("pkg-config" ,pkg-config)
1984 ("vulkan-headers" ,vulkan-headers)))
1987 (list "-Dinstall-active-runtime=false")))
1988 (home-page "https://monado.freedesktop.org/")
1989 (synopsis "OpenXR runtime")
1990 (description "Monado is an OpenXR runtime delivering immersive experiences
1991 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
1992 a complete and conforming implementation of the OpenXR API made by Khronos.")
1993 (license license:boost1.0)))