1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2021, 2022 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, 2021, 2022 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>
29 ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
30 ;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
31 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
32 ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
33 ;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
34 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages graphics)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages audio)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages bison)
59 #:use-module (gnu packages boost)
60 #:use-module (gnu packages build-tools)
61 #:use-module (gnu packages cdrom)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages cpp)
65 #:use-module (gnu packages crypto)
66 #:use-module (gnu packages datastructures)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages flex)
69 #:use-module (gnu packages fonts)
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages freedesktop)
72 #:use-module (gnu packages gettext)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gnunet)
78 #:use-module (gnu packages graphviz)
79 #:use-module (gnu packages gstreamer)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages haskell-xyz)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages image-processing)
84 #:use-module (gnu packages imagemagick)
85 #:use-module (gnu packages jemalloc)
86 #:use-module (gnu packages kde-frameworks)
87 #:use-module (gnu packages libusb)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages logging)
90 #:use-module (gnu packages llvm)
91 #:use-module (gnu packages lua)
92 #:use-module (gnu packages man)
93 #:use-module (gnu packages maths)
94 #:use-module (gnu packages mp3)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages ninja)
97 #:use-module (gnu packages pciutils)
98 #:use-module (gnu packages pdf)
99 #:use-module (gnu packages perl)
100 #:use-module (gnu packages photo)
101 #:use-module (gnu packages pkg-config)
102 #:use-module (gnu packages plotutils)
103 #:use-module (gnu packages pretty-print)
104 #:use-module (gnu packages pth)
105 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-build)
108 #:use-module (gnu packages python-xyz)
109 #:use-module (gnu packages qt)
110 #:use-module (gnu packages readline)
111 #:use-module (gnu packages sdl)
112 #:use-module (gnu packages serialization)
113 #:use-module (gnu packages stb)
114 #:use-module (gnu packages swig)
115 #:use-module (gnu packages tbb)
116 #:use-module (gnu packages toolkits)
117 #:use-module (gnu packages upnp)
118 #:use-module (gnu packages video)
119 #:use-module (gnu packages vulkan)
120 #:use-module (gnu packages xiph)
121 #:use-module (gnu packages xml)
122 #:use-module (gnu packages xorg)
123 #:use-module (gnu packages xdisorg)
124 #:use-module (guix build-system copy)
125 #:use-module (guix build-system cmake)
126 #:use-module (guix build-system gnu)
127 #:use-module (guix build-system meson)
128 #:use-module (guix build-system python)
129 #:use-module (guix build-system qt)
130 #:use-module (guix download)
131 #:use-module (guix gexp)
132 #:use-module (guix git-download)
133 #:use-module (guix hg-download)
134 #:use-module ((guix licenses) #:prefix license:)
135 #:use-module (guix packages)
136 #:use-module (guix utils))
147 (url "https://github.com/hodefoting/mmm")
150 (git-file-name name version))
152 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
153 (build-system meson-build-system)
155 (list luajit pkg-config))
157 (list alsa-lib sdl sdl2))
158 (synopsis "Memory Mapped Machine")
159 (description "MMM is a shared memory protocol for virtualising access to
160 framebuffer graphics, audio output and input event.")
161 (home-page "https://github.com/hodefoting/mrg")
162 (license license:isc)))
164 (define-public directfb
173 (url "https://github.com/deniskropp/DirectFB")
174 (commit "DIRECTFB_1_7_7")))
175 (file-name (git-file-name name version))
177 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
178 (build-system gnu-build-system)
181 (modify-phases %standard-phases
182 (add-after 'unpack 'remove-buildtime
183 ;; Remove embedded build time for reproducible builds
185 (substitute* "src/core/core.c"
186 (("..BUILDTIME..") ""))))
187 (add-after 'unpack 'disable-configure-during-bootstrap
189 (substitute* "autogen.sh"
190 (("^.*\\$srcdir/configure.*") ""))
193 (list autoconf automake libtool perl pkg-config))
227 (synopsis "DFB Graphics Library")
228 (description "DirectFB is a graphics library which was designed with embedded
229 systems in mind. It offers maximum hardware accelerated performance at a
230 minimum of resource usage and overhead.")
231 (home-page "https://github.com/deniskropp/DirectFB")
232 (license license:lgpl2.1+)))
243 (url "https://github.com/deniskropp/flux")
245 (file-name (git-file-name name version))
247 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
248 (build-system gnu-build-system)
250 (list autoconf automake libtool pkg-config))
251 (synopsis "Interface description language")
252 (description "Flux is an interface description language used by DirectFB.
253 Fluxcomp compiles .flux files to .cpp or .c files.")
254 (home-page "https://www.directfb.org/")
255 (license license:lgpl2.1+))) ; Same as DirectFB
265 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
267 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
268 (build-system gnu-build-system)
271 (modify-phases %standard-phases
272 (add-after 'unpack 'patch
274 (substitute* "configure"
275 (("-I/usr/include/freetype2")
278 (assoc-ref %build-inputs "freetype")
279 "/include/freetype2"))))
285 ("freetype" ,freetype)
288 ("jpeg" ,libjpeg-turbo)
292 ("xcursor" ,libxcursor)
294 ("xfixes" ,libxfixes)
297 ("xrandr" ,libxrandr)
298 ("xrender" ,libxrender)
299 ("xshm" ,libxshmfence)
301 (synopsis "Widget Toolkit for building GUI")
302 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
303 Graphical User Interfaces easily and effectively. It offers a wide, and
304 growing, collection of Controls, and provides state of the art facilities such
305 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
306 manipulation. FOX also implements icons, images, and user-convenience features
307 such as status line help, and tooltips. Tooltips may even be used for 3D
309 (home-page "http://www.fox-toolkit.org")
310 (license license:lgpl2.1+)))
312 (define-public autotrace
313 (let ((commit "travis-20190624.59")
314 (version-base "0.40.0"))
317 (version (string-append version-base "-"
318 (if (string-prefix? "travis-" commit)
319 (string-drop commit 7)
324 (url "https://github.com/autotrace/autotrace")
326 (file-name (git-file-name name version))
327 (patches (search-patches "autotrace-glib-compat.patch"))
330 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
331 (build-system gnu-build-system)
333 `(#:phases (modify-phases %standard-phases
334 ;; See: https://github.com/autotrace/autotrace/issues/27.
335 (add-after 'unpack 'include-spline.h-header
337 (substitute* "Makefile.am"
338 ((".*src/types.h.*" all)
339 (string-append all "\t\tsrc/spline.h \\\n")))
341 ;; See: https://github.com/autotrace/autotrace/issues/26.
344 (invoke "sh" "tests/runtests.sh"))))))
347 ("pkg-config" ,pkg-config)
348 ("autoconf" ,autoconf)
349 ("automake" ,automake)
350 ("intltool" ,intltool)
352 ("gettext" ,gettext-minimal)))
355 ("libjpeg" ,libjpeg-turbo)
357 ("imagemagick" ,imagemagick)
358 ("pstoedit" ,pstoedit)))
359 (home-page "https://github.com/autotrace/autotrace")
360 (synopsis "Bitmap to vector graphics converter")
361 (description "AutoTrace is a utility for converting bitmap into vector
362 graphics. It can trace outlines and midlines, effect color reduction or
363 despeckling and has support for many input and output formats. It can be used
364 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
365 (license (list license:gpl2+ ;for the utility itself
366 license:lgpl2.1+))))) ;for use as a library
368 (define-public embree
375 (url "https://github.com/embree/embree")
376 (commit (string-append "v" version))))
377 (file-name (git-file-name name version))
380 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
381 (build-system cmake-build-system)
383 `(#:tests? #f ; no tests (apparently)
386 "-DEMBREE_ISPC_SUPPORT=OFF")))
389 (home-page "https://www.embree.org/")
390 (synopsis "High performance ray tracing kernels")
392 "Embree is a collection of high-performance ray tracing kernels.
393 Embree is meant to increase performance of photo-realistic rendering
395 (license license:asl2.0)))
397 (define-public openvdb
404 (url "https://github.com/AcademySoftwareFoundation/openvdb/")
405 (commit (string-append "v" version))
407 (file-name (git-file-name name version))
410 "0856697hnwk8xsp29kx8y2p1kliy0bdwfsznxm38v4690vna15rk"))))
411 (build-system cmake-build-system)
414 (list (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
415 (assoc-ref %outputs "out") "/lib"))))
417 (list boost c-blosc ilmbase tbb zlib))
420 (home-page "https://www.openvdb.org/")
421 (synopsis "Sparse volume data structure and tools")
422 (description "OpenVDB is a C++ library comprising a hierarchical data
423 structure and a large suite of tools for the efficient storage and
424 manipulation of sparse volumetric data discretized on three-dimensional grids.
425 It was developed by DreamWorks Animation for use in volumetric applications
426 typically encountered in feature film production.")
427 (license license:mpl2.0)))
429 (define-public blender
435 (uri (string-append "https://download.blender.org/source/"
436 "blender-" version ".tar.xz"))
439 "0hblgls5pclqamsxk0vb14f4fm30hdiq7fb2bm5mq2ly4sb0mfqr"))))
440 (build-system cmake-build-system)
442 (let ((python-version (version-major+minor (package-version python))))
443 `(;; Test files are very large and not included in the release tarball.
446 (list "-DWITH_CODEC_FFMPEG=ON"
447 "-DWITH_CODEC_SNDFILE=ON"
449 "-DWITH_DOC_MANPAGE=ON"
451 "-DWITH_IMAGE_OPENJPEG=ON"
452 "-DWITH_INPUT_NDOF=ON"
453 "-DWITH_INSTALL_PORTABLE=OFF"
455 "-DWITH_MOD_OCEANSIM=ON"
457 "-DWITH_OPENSUBDIV=ON"
458 "-DWITH_PYTHON_INSTALL=OFF"
459 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
460 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
462 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
463 "/include/python" ,python-version)
464 (string-append "-DPYTHON_VERSION=" ,python-version)
465 (string-append "-DPYTHON_NUMPY_INCLUDE_DIRS="
466 (assoc-ref %build-inputs "python-numpy")
467 "/lib/python" ,python-version "/site-packages/numpy/core/include/")
468 (string-append "-DPYTHON_NUMPY_PATH="
469 (assoc-ref %build-inputs "python-numpy")
470 "/lib/python" ,python-version "/site-packages/"))
472 (modify-phases %standard-phases
473 ;; XXX This file doesn't exist in the Git sources but will probably
474 ;; exist in the eventual 2.80 source tarball.
475 (add-after 'unpack 'fix-broken-import
477 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
478 (("import encode_bin") "from . import encode_bin"))
480 (add-after 'set-paths 'add-ilmbase-include-path
481 (lambda* (#:key inputs #:allow-other-keys)
482 ;; OpenEXR propagates ilmbase, but its include files do not
483 ;; appear in the C_INCLUDE_PATH, so we need to add
484 ;; "$ilmbase/include/OpenEXR/" to the C_INCLUDE_PATH to satisfy
485 ;; the dependency on "half.h" and "Iex.h".
486 (let ((headers (string-append
487 (assoc-ref inputs "ilmbase")
488 "/include/OpenEXR")))
489 (setenv "C_INCLUDE_PATH"
490 (string-append headers ":"
491 (or (getenv "C_INCLUDE_PATH") "")))
492 (setenv "CPLUS_INCLUDE_PATH"
493 (string-append headers ":"
494 (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))))
497 ("jemalloc" ,jemalloc)
500 ("libxrender" ,libxrender)
501 ("opencolorio" ,opencolorio)
502 ("openimageio" ,openimageio)
503 ("openexr" ,openexr-2)
504 ("opensubdiv" ,opensubdiv)
506 ("openjpeg" ,openjpeg)
507 ("libjpeg" ,libjpeg-turbo)
512 ("gmp" ,gmp) ;; needed for boolean operations on meshes
514 ("libsndfile" ,libsndfile)
515 ("freetype" ,freetype)
520 ("python-numpy" ,python-numpy)
526 (home-page "https://blender.org/")
527 (synopsis "3D graphics creation suite")
529 "Blender is a 3D graphics creation suite. It supports the entirety of
530 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
531 compositing and motion tracking, even video editing and game creation. The
532 application can be customized via its API for Python scripting.")
533 (license license:gpl2+)))
542 (url "https://github.com/guillaumechereau/goxel")
543 (commit (string-append "v" version))))
544 (file-name (git-file-name name version))
547 "0qvz566awhp03yp696fn3c80hnky41fpbi4sqg4lx69ibx4zvl9k"))))
548 (build-system gnu-build-system)
551 #:phases (modify-phases %standard-phases (delete 'configure))
552 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
560 (home-page "https://goxel.xyz/")
561 (synopsis "Voxel editor")
563 "Goxel is a voxel editor that features unlimited scene size, unlimited
564 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
565 and export to various formats including the format used by Magicavoxel.")
566 (license license:gpl3+)))
568 (define-public assimp
575 (url "https://github.com/assimp/assimp")
576 (commit (string-append "v" version))))
577 (file-name (git-file-name name version))
580 "1kjifakjnpm89410pw27wq21fn975gfq46kn9zs3h8bryldvvlgk"))))
581 (build-system cmake-build-system)
584 (home-page "http://www.assimp.org/")
585 (synopsis "Asset import library")
587 "The Open Asset Import Library loads more than 40 3D file formats into
588 one unified data structure. Additionally, assimp features various mesh post
589 processing tools: normals and tangent space generation, triangulation, vertex
590 cache locality optimization, removal of degenerate primitives and duplicate
591 vertices, sorting by primitive type, merging of redundant materials and many
593 (license license:bsd-3)))
595 (define-public mikktspace
596 ;; The latest commit is used as there is no release.
597 (let ((commit "3e895b49d05ea07e4c2133156cfa94369e19e409")
601 (version (git-version "0.0.0" revision commit))
605 (url "https://github.com/mmikk/MikkTSpace")
607 (file-name (git-file-name name version))
610 "1rjh9zflx51hdhnfadal87v4hhkrbprkv692hjkg9wkxx0ch39zi"))))
611 (build-system gnu-build-system)
615 #~(modify-phases %standard-phases
618 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
619 (invoke #$(cc-for-target) "mikktspace.c" "-O2" "-g" "-fPIC"
620 "-shared" "-o" "libmikktspace.so")))
623 (install-file "mikktspace.h"
624 (string-append #$output "/include"))
625 (install-file "libmikktspace.so"
626 (string-append #$output "/lib")))))))
627 (home-page "http://www.mikktspace.com/")
628 (synopsis "Library for a common standard for tangent spaces")
630 "This package provides a common standard tangent space library used in
631 baking tools to produce normal maps.")
632 (license license:zlib))))
634 (define-public openshadinglanguage
636 (name "openshadinglanguage")
637 (version "1.11.16.0")
642 (url "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage")
643 (commit (string-append "v" version))))
644 (file-name (git-file-name name version))
646 (base32 "0x0lc163vl2b57l75bf5zxlr6vm2y1f1izlxdnrw3vsapv3r9k9g"))))
647 (build-system cmake-build-system)
649 `(#:configure-flags (list "-DUSE_PARTIO=OFF") ; TODO: not packaged
651 (modify-phases %standard-phases
652 (add-after 'set-paths 'add-ilmbase-include-path
653 (lambda* (#:key inputs #:allow-other-keys)
654 ;; OpenEXR 2 propagates ilmbase, but its include files do not
655 ;; appear in the C_INCLUDE_PATH.
656 (let ((headers (string-append
657 (assoc-ref inputs "ilmbase")
658 "/include/OpenEXR")))
659 (setenv "C_INCLUDE_PATH"
660 (string-append headers ":"
661 (or (getenv "C_INCLUDE_PATH") "")))
662 (setenv "CPLUS_INCLUDE_PATH"
663 (string-append headers ":"
664 (or (getenv "CPLUS_INCLUDE_PATH") ""))))))
666 (lambda* (#:key tests? #:allow-other-keys)
668 (invoke "ctest" "--exclude-regex"
671 "osl-imageio" ; OIIO not compiled with freetype
672 "osl-imageio.opt" ; OIIO not compiled with freetype
673 "texture-udim" ; file does not exist
674 "texture-udim.opt" ; file does not exist
675 "example-deformer" ; could not find OSLConfig
676 "python-oslquery") ; no module oslquery
693 (home-page "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage")
694 (synopsis "Shading language for production GI renderers")
695 (description "Open Shading Language (OSL) is a language for programmable
696 shading in advanced renderers and other applications, ideal for describing
697 materials, lights, displacement, and pattern generation.")
698 (license license:bsd-3)))
707 "https://github.com/CGAL/cgal/releases/download/v" version
708 "/CGAL-" version ".tar.xz"))
711 "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
712 (build-system cmake-build-system)
715 ;; Prevent two mostly-duplicate directories. Use Guix's versioned
716 ;; default for licences instead of CGAL's unversioned one.
717 (list (string-append "-DCGAL_INSTALL_DOC_DIR=share/doc/"
719 #:tests? #f)) ; no test target
721 (list mpfr gmp boost))
722 (home-page "https://www.cgal.org/")
723 (synopsis "Computational geometry algorithms library")
725 "CGAL provides easy access to efficient and reliable geometric algorithms
726 in the form of a C++ library. CGAL is used in various areas needing geometric
727 computation, such as: computer graphics, scientific visualization, computer
728 aided design and modeling, geographic information systems, molecular biology,
729 medical imaging, robotics and motion planning, mesh generation, numerical
730 methods, etc. It provides data structures and algorithms such as
731 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
734 ;; The 'LICENSE' file explains that a subset is available under more
735 ;; permissive licenses.
736 (license license:gpl3+)))
746 (url "https://github.com/AcademySoftwareFoundation/Imath")
747 (commit (string-append "v" version))))
748 (file-name (git-file-name name version))
750 (base32 "1nyld18mf220ghm1vidnfnn0rdns9z5i4l9s66xgd0kfdgarb31f"))))
751 (build-system cmake-build-system)
753 ;; XXX: On i686-linux, tests fail due to rounding issues (excess
754 ;; precision), as was discussed and patched long ago:
755 ;; <https://issues.guix.gnu.org/22049>. It seems the relevant fixes
756 ;; didn't make it upstream, so skip tests.
757 (list #:tests? (not (target-x86-32?))))
758 (home-page "https://github.com/AcademySoftwareFoundation/Imath")
759 (synopsis "Library of math operations for computer graphics")
761 "Imath is a C++ representation of 2D and 3D vectors and matrices and other
762 mathematical objects, functions, and data types common in computer graphics
763 applications, including the \"half\" 16-bit floating-point type.")
764 (license license:bsd-3)))
766 (define-public ilmbase
773 (url "https://github.com/openexr/openexr")
774 (commit (string-append "v" version))))
775 (file-name (git-file-name "ilmbase" version))
778 "1vja0rbilcd1wn184w8nbcmck00n7bfwlddwiaxw8dhj64nx4468"))
779 (patches (search-patches "ilmbase-fix-tests.patch"))))
780 (build-system cmake-build-system)
782 (list #:phases #~(modify-phases %standard-phases
783 (add-after 'unpack 'change-directory
787 #$@(if (target-x86-32?)
788 #~((add-after 'change-directory 'skip-test
790 ;; XXX: This test fails on i686,
791 ;; possibly due to excess precision when
792 ;; comparing floats. Skip it.
793 (substitute* "ImathTest/testFun.cpp"
794 (("assert \\(bit_cast<unsigned>.*" all)
795 (string-append "// " all "\n"))))))
797 (home-page "https://www.openexr.com/")
798 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
800 "IlmBase provides several utility libraries for C++. Half is a class
801 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
802 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
803 quaternions and other useful 2D and 3D math functions. Iex is an
804 exception-handling library.")
805 (license license:bsd-3)))
807 (define-public lib2geom
814 (url "https://gitlab.com/inkscape/lib2geom.git")
816 (file-name (git-file-name name version))
819 "03bx9k1m4bfhmx0ldsg0bks6i8h7fmvl5vbg6gmpq0bk0nkmpnmv"))))
820 (build-system cmake-build-system)
822 `(#:imported-modules ((guix build python-build-system)
823 ,@%cmake-build-system-modules)
824 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
825 "-D2GEOM_BOOST_PYTHON=ON"
826 ;; Compiling the Cython bindings fail (see:
827 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
828 "-D2GEOM_CYTHON_BINDINGS=OFF")
830 (modify-phases %standard-phases
831 (add-after 'unpack 'patch-python-lib-install-path
832 (lambda* (#:key inputs outputs #:allow-other-keys)
833 (let* ((python-version (@ (guix build python-build-system)
835 (python-maj-min-version (python-version
836 (assoc-ref inputs "python")))
837 (site-package (string-append
838 (assoc-ref outputs "out")
839 "/lib/python" python-maj-min-version
841 (substitute* '("src/cython/CMakeLists.txt"
842 "src/py2geom/CMakeLists.txt")
843 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
844 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))))
845 ,@(if (target-x86-32?)
846 `((add-after 'unpack 'skip-faulty-test
848 ;; This test fails on i686 when comparing floating point
849 ;; values, probably due to excess precision. However,
850 ;; '-fexcess-precision' is not implemented for C++ in
851 ;; GCC 10 so just skip it.
852 (substitute* "tests/CMakeLists.txt"
853 (("bezier-test") "")))))
855 (native-inputs `(("python" ,python-wrapper)
856 ("googletest" ,googletest)
857 ("pkg-config" ,pkg-config)))
858 (inputs `(("cairo" ,cairo)
859 ("pycairo" ,python-pycairo)
860 ("double-conversion" ,double-conversion)
864 (list boost)) ;referred to in 2geom/pathvector.h.
865 (home-page "https://gitlab.com/inkscape/lib2geom/")
866 (synopsis "C++ 2D graphics library")
867 (description "2geom is a C++ library of mathematics for paths, curves,
868 and other geometric calculations. Designed for vector graphics, it tackles
869 Bézier curves, conic sections, paths, intersections, transformations, and
871 ;; Because the library is linked with the GNU Scientific Library
872 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
873 ;; https://gitlab.com/inkscape/inkscape/issues/784).
874 (license license:gpl3+)))
876 (define-public lib2geom-1.2
883 (url "https://gitlab.com/inkscape/lib2geom")
885 (file-name (git-file-name "lib2geom" version))
888 "0dq981g894hmvhd6rmfl1w32mksg9hpvpjs1qvfxrnz87rhkknj8"))))))
890 (define-public python-booleanoperations
892 (name "python-booleanoperations")
897 (uri (pypi-uri "booleanOperations" version ".zip"))
899 (base32 "1f41lb19m8azchl1aqz6j5ycbspb8jsf1cnn42hlydxd68f85ylc"))))
900 (build-system python-build-system)
901 (propagated-inputs (list python-fonttools python-pyclipper))
903 (list python-defcon-bootstrap
904 python-fontpens-bootstrap
905 python-setuptools-scm
909 (home-page "https://github.com/typemytype/booleanOperations")
910 (synopsis "Boolean operations on paths")
911 (description "Boolean operations on paths which uses a super fast
912 @url{http://www.angusj.com/delphi/clipper.php, polygon clipper library by
914 (license license:expat)))
916 (define-public pstoedit
922 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
923 version "/pstoedit-" version ".tar.gz"))
926 "02av76j75g5sq3bg353yl6dlllda9ihmmk4c8hvgiscix816nv4s"))))
927 (build-system gnu-build-system)
931 `(("ghostscript" ,ghostscript)
932 ("imagemagick" ,imagemagick)
933 ("libplot" ,plotutils)
934 ("libjpeg" ,libjpeg-turbo)
935 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
936 (home-page "http://www.pstoedit.net/")
937 (synopsis "Converter for PostScript and PDF graphics")
938 (description "The @code{pstoedit} utility allows translating graphics
939 in the PostScript or PDF (Portable Document Format) formats to various
940 other vector formats such as:
945 @item Flattened PostScript
946 @item DXF, a CAD (Computed-Aided Design) exchange format
947 @item PIC (for troff/groff)
948 @item MetaPost (for usage with TeX/LaTeX)
949 @item LaTeX2e picture
950 @item GNU Metafile (for use with plotutils/libplot)
951 @item Any format supported by ImageMagick
953 (license license:gpl2+)))
955 (define-public alembic
963 (url "https://github.com/alembic/alembic")
965 (file-name (git-file-name name version))
967 (base32 "0glfx3cm7r8zn3cn7j4x4ch1ab6igfis0i2lcy23jc56q87r8yj2"))))
968 (build-system cmake-build-system)
970 `(#:configure-flags (list "-DUSE_HDF5=ON")))
972 (list hdf5 imath zlib))
973 (home-page "http://www.alembic.io/")
974 (synopsis "Framework for storing and sharing scene data")
975 (description "Alembic is a computer graphics interchange framework. It
976 distills complex, animated scenes into a set of baked geometric results.")
977 (license license:bsd-3)))
979 (define-public mangohud
987 (url "https://github.com/flightlessmango/MangoHud/")
988 (commit (string-append "v" version))))
989 (file-name (git-file-name name version))
991 (base32 "0n2x6agv2j8nd6h1998dqsphb7k57zx8vsayv47dqix28kg5kixz"))))
992 (build-system meson-build-system)
995 #:build-type "release"
997 #~(list "-Duse_system_vulkan=enabled"
998 "-Duse_system_spdlog=enabled"
999 "-Dwith_xnvctrl=disabled"
1000 "-Dappend_libdir_mangohud=false"
1001 (string-append "-Dvulkan_datadir="
1002 #$(this-package-input "vulkan-headers") "/share"))
1004 #~(modify-phases %standard-phases
1005 ;; Mangohud tries to build the imgui library as a meson submodule,
1006 ;; so we change the dependency to the imgui input instead.
1007 (add-after 'unpack 'unbundle-imgui
1009 (substitute* "meson.build"
1010 (("dearimgui_sp = .*")
1012 (("dearimgui_sp.get_variable\\('imgui_dep'\\)")
1014 "declare_dependency(dependencies: "
1015 "cpp.find_library('imgui'), include_directories: '"
1016 #$(this-package-input "imgui") "/include/imgui')")))))
1017 (add-after 'unpack 'patch-paths
1018 (lambda* (#:key inputs #:allow-other-keys)
1019 (substitute* "src/meson.build"
1022 (substitute* "src/overlay.cpp"
1024 (search-input-file inputs "bin/glxinfo")))
1025 (substitute* "src/loaders/loader_x11.cpp"
1027 (search-input-file inputs "lib/libX11.so.6")))
1028 (substitute* "src/pci_ids.cpp"
1029 (("/usr/share/hwdata/pci.ids")
1030 (search-input-file inputs "share/hwdata/pci.ids")))
1031 (substitute* "src/dbus.cpp"
1033 (search-input-file inputs "lib/libdbus-1.so.3"))))))))
1046 (native-inputs (list pkg-config python))
1047 (home-page "https://github.com/flightlessmango/MangoHud/")
1048 (synopsis "Vulkan and OpenGL overlay for monitoring performance and hardware")
1049 (description "MangoHud is a Vulkan and OpenGL overlay for monitoring
1050 frames per second (FPS), temperatures, CPU/GPU load and more.")
1051 (license license:expat)))
1061 (url "https://github.com/OGRECave/ogre")
1062 (commit (string-append "v" version))))
1063 (file-name (git-file-name name version))
1065 (base32 "157vpfzivg2wf349glyd0cpbyaw1j3fm4nggban70pghql3x48kb"))))
1066 (build-system cmake-build-system)
1069 (modify-phases %standard-phases
1070 (add-before 'configure 'unpack-imgui
1071 (lambda* (#:key inputs #:allow-other-keys)
1072 (copy-recursively (assoc-ref inputs "imgui-source")
1073 "../imgui-source")))
1074 (add-before 'configure 'pre-configure
1075 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1076 ;; a consequence, we cannot suggest ours in configure flags. Fix
1078 (lambda* (#:key inputs outputs #:allow-other-keys)
1079 (substitute* "CMakeLists.txt"
1080 (("set\\(CMAKE_INSTALL_RPATH .*") "")))))
1082 (let* ((out (assoc-ref %outputs "out"))
1084 (string-join (list (string-append out "/lib")
1085 (string-append out "/lib/OGRE"))
1087 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1088 "-DIMGUI_DIR=../imgui-source"
1089 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1090 "-DOGRE_BUILD_TESTS=TRUE"
1091 "-DOGRE_INSTALL_DOCS=TRUE"
1092 "-DOGRE_INSTALL_SAMPLES=TRUE"
1093 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1094 (native-inputs `(("doxygen" ,doxygen)
1095 ("imgui-source" ,(package-source imgui-1.86))
1096 ("googletest" ,googletest)
1097 ("pkg-config" ,pkg-config)
1098 ("python" ,python)))
1099 (inputs (list freeimage
1108 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1110 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1111 flexible 3D engine written in C++ designed to make it easier and more intuitive
1112 for developers to produce applications utilising hardware-accelerated 3D
1114 (home-page "https://www.ogre3d.org/")
1115 (license license:expat)))
1117 (define-public openexr
1125 "https://github.com/AcademySoftwareFoundation/openexr")
1126 (commit (string-append "v" version))))
1127 (file-name (git-file-name name version))
1130 "0c9vla0kbsbbhkk42jlbf94nzfb1anqh7dy9b0b3nna1qr6v4bh6"))))
1131 (build-system cmake-build-system)
1134 #~(modify-phases %standard-phases
1135 (add-after 'unpack 'patch-test-directory
1138 "src/test/OpenEXRUtilTest/tmpDir.h"
1139 "src/test/OpenEXRFuzzTest/tmpDir.h"
1140 "src/test/OpenEXRTest/tmpDir.h"
1141 "src/test/OpenEXRCoreTest/main.cpp")
1144 #$@(if (target-64bit?)
1146 #~((add-after 'patch-test-directory 'disable-broken-tests
1148 ;; Disable tests that fail at least on i686-linux.
1149 (substitute* '("src/test/OpenEXRCoreTest/main.cpp"
1150 "src/test/OpenEXRTest/main.cpp")
1151 (("TEST \\(testCompression, \"basic\"\\);")
1153 (("TEST\\( testNoCompression, \"core_compression\" \\);")
1155 (("TEST\\( testRLECompression, \"core_compression\" \\);")
1157 (("TEST\\( testZIPCompression, \"core_compression\" \\);")
1159 (("TEST\\( testZIPSCompression, \"core_compression\" \\);")
1161 (("TEST\\( testB44Compression, \"core_compression\" \\);")
1163 (("TEST\\( testB44ACompression, \"core_compression\" \\);")
1165 (("TEST \\(testOptimizedInterleavePatterns, \"basic\"\\);")
1167 (inputs (list imath zlib))
1168 (home-page "https://www.openexr.com/")
1169 (synopsis "High-dynamic-range file format library")
1171 "OpenEXR provides the specification and reference implementation of the
1172 EXR file format. The purpose of EXR format is to accurately and efficiently
1173 represent high-dynamic-range scene-linear image data and associated metadata,
1174 with strong support for multi-part, multi-channel use cases.")
1175 (license license:bsd-3)))
1177 (define-public openexr-2
1180 (version (package-version ilmbase))
1182 (inherit (package-source ilmbase))
1183 (file-name (git-file-name "openexr" version))))
1184 (build-system cmake-build-system)
1187 (modify-phases %standard-phases
1188 (add-after 'unpack 'change-directory
1192 (add-after 'change-directory 'patch-test-directory
1194 (substitute* '("IlmImfFuzzTest/tmpDir.h"
1195 "IlmImfTest/tmpDir.h"
1196 "IlmImfUtilTest/tmpDir.h")
1197 (("/var/tmp") "/tmp"))))
1198 (add-after 'change-directory 'increase-test-timeout
1200 ;; On some architectures, we need to override the CTest default
1201 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1202 (substitute* "IlmImfTest/CMakeLists.txt"
1203 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1206 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 15000)")))
1208 ,@(if (not (target-64bit?))
1209 `((add-after 'change-directory 'disable-broken-test
1211 (substitute* "IlmImfTest/main.cpp"
1212 ;; This test fails on i686. Upstream developers suggest
1213 ;; that this test is broken on i686 and can be safely
1215 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1216 ((".*testOptimizedInterleavePatterns.*") "")
1217 ;; This one fails similarly on i686.
1218 ((".*testCompression.*") "")))))
1223 (list ilmbase ;used in public headers
1224 zlib)) ;OpenEXR.pc reads "-lz"
1225 (home-page (package-home-page openexr))
1226 (synopsis (package-synopsis openexr))
1227 (description (package-description openexr))
1228 (license (package-license openexr))))
1230 (define-public openimageio
1232 (name "openimageio")
1233 (version "2.2.11.1")
1237 (url "https://github.com/OpenImageIO/oiio")
1238 (commit (string-append "Release-" version))))
1239 (file-name (git-file-name name version))
1242 "1i9r6vgz15aj1yzbf5a9lqhlyakjs793yrw5gw720l84lcyigad7"))))
1243 (build-system cmake-build-system)
1244 ;; FIXME: To run all tests successfully, test image sets from multiple
1245 ;; third party sources have to be present. For details see
1246 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1249 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1255 ("libheif" ,libheif)
1257 ("libjpeg" ,libjpeg-turbo)
1258 ("libtiff" ,libtiff)
1260 ("openexr" ,openexr-2)
1261 ("ilmbase" ,ilmbase)
1262 ("pugixml" ,pugixml)
1263 ("python" ,python-wrapper)
1264 ("pybind11" ,pybind11)
1265 ("robin-map" ,robin-map)
1267 (synopsis "C++ library for reading and writing images")
1269 "OpenImageIO is a library for reading and writing images, and a bunch of
1270 related classes, utilities, and applications. There is a particular emphasis
1271 on formats and functionality used in professional, large-scale animation and
1272 visual effects work for film.")
1273 (home-page "https://www.openimageio.org")
1274 (license license:bsd-3)))
1276 (define-public openscenegraph
1278 (name "openscenegraph")
1284 (url "https://github.com/openscenegraph/OpenSceneGraph")
1285 (commit (string-append "OpenSceneGraph-" version))))
1287 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1288 (file-name (git-file-name name version))))
1290 `((upstream-name . "OpenSceneGraph")))
1291 (build-system cmake-build-system)
1293 `(#:tests? #f ; no test target available
1294 ;; Without this flag, 'rd' will be added to the name of the
1295 ;; library binaries and break linking with other programs.
1296 #:build-type "Release"
1298 (list (string-append "-DCMAKE_INSTALL_RPATH="
1299 (assoc-ref %outputs "out") "/lib:"
1300 (assoc-ref %outputs "out") "/lib64"))))
1302 (list pkg-config unzip))
1304 `(("giflib" ,giflib)
1305 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1307 ("librsvg" ,librsvg)
1308 ("libxrandr" ,libxrandr)
1311 (synopsis "High-performance real-time graphics toolkit")
1313 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1314 used by application developers in fields such as visual simulation, games,
1315 virtual reality, scientific visualization and modeling.")
1316 (home-page "http://www.openscenegraph.org")
1317 ;; The 'LICENSE' file explains that the source is licensed under
1318 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1319 (license license:lgpl2.1)))
1321 (define-public gr-framework
1323 (name "gr-framework")
1329 (url "https://github.com/sciapp/gr")
1330 (commit (string-append "v" version))))
1331 (file-name (git-file-name name version))
1333 (base32 "0q1rz4iyxbh0dc22y4w28ry3hr0yypdwdm6pw2zlwgjya7wkbvsw"))
1334 (modules '((guix build utils)))
1337 (delete-file-recursively "3rdparty")
1339 (build-system cmake-build-system)
1341 `(#:tests? #f)) ; no test target
1345 ("fontconfig" ,fontconfig)
1347 ("freetype" ,freetype)
1348 ("ghostscript" ,ghostscript)
1350 ("libjpeg-turbo" ,libjpeg-turbo)
1352 ("libtiff" ,libtiff)
1357 ("qtbase" ,qtbase-5)
1360 (home-page "https://gr-framework.org/")
1361 (synopsis "Graphics library for visualisation applications")
1362 (description "GR is a universal framework for cross-platform visualization
1363 applications. It offers developers a compact, portable and consistent graphics
1364 library for their programs. Applications range from publication quality 2D
1365 graphs to the representation of complex 3D scenes. GR is essentially based on
1366 an implementation of a @acronym{GKS, Graphical Kernel System}. As a
1367 self-contained system it can quickly and easily be integrated into existing
1368 applications (i.e. using the @code{ctypes} mechanism in Python or @code{ccall}
1370 (license license:expat)))
1372 (define-public openmw-openscenegraph
1373 ;; OpenMW prefers its own fork of openscenegraph:
1374 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1375 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1378 (inherit openscenegraph)
1379 (version (git-version "3.6" "1" commit))
1384 (url "https://github.com/OpenMW/osg/")
1386 (file-name (git-file-name (package-name openscenegraph) version))
1389 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1391 (substitute-keyword-arguments (package-arguments openscenegraph)
1392 ((#:configure-flags flags)
1393 ;; As per the above wiki link, the following plugins are enough:
1395 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1396 "-DBUILD_OSG_PLUGIN_OSG=1"
1397 "-DBUILD_OSG_PLUGIN_DDS=1"
1398 "-DBUILD_OSG_PLUGIN_TGA=1"
1399 "-DBUILD_OSG_PLUGIN_BMP=1"
1400 "-DBUILD_OSG_PLUGIN_JPEG=1"
1401 "-DBUILD_OSG_PLUGIN_PNG=1"
1402 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1403 ;; The jpeg plugin requires conversion between integers and booleans
1404 "-DCMAKE_CXX_FLAGS=-fpermissive")
1407 (define-public povray
1414 (url "https://github.com/POV-Ray/povray")
1415 (commit (string-append "v" version))))
1416 (file-name (git-file-name name version))
1419 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1420 (modules '((guix build utils)))
1423 ;; Delete bundled libraries.
1424 (delete-file-recursively "libraries")
1426 (build-system gnu-build-system)
1428 (list autoconf automake pkg-config))
1431 ("libjpeg" ,libjpeg-turbo)
1433 ("libtiff" ,libtiff)
1434 ("openexr" ,openexr-2)
1439 (list "COMPILED_BY=Guix"
1440 (string-append "--with-boost-libdir="
1441 (assoc-ref %build-inputs "boost") "/lib")
1442 "--disable-optimiz-arch")
1444 (modify-phases %standard-phases
1445 (add-after 'unpack 'run-prebuild
1447 (setenv "HOME" (getcwd))
1448 (with-directory-excursion "unix"
1449 (substitute* "prebuild.sh"
1450 (("/bin/sh") (which "sh")))
1451 (invoke "sh" "prebuild.sh"))
1453 ;; The bootstrap script is run by the prebuild script in the
1454 ;; "run-prebuild" phase.
1455 (delete 'bootstrap))))
1456 (synopsis "Tool for creating three-dimensional graphics")
1458 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1459 for producing high-quality computer graphics. @code{POV-Ray} creates
1460 three-dimensional, photo-realistic images using a rendering technique called
1461 ray-tracing. It reads in a text file containing information describing the
1462 objects and lighting in a scene and generates an image of that scene from the
1463 view point of a camera also described in the text file. Ray-tracing is not a
1464 fast process by any means, but it produces very high quality images with
1465 realistic reflections, shading, perspective and other effects.")
1466 (home-page "http://www.povray.org/")
1467 (license license:agpl3+)))
1475 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1479 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1480 (build-system cmake-build-system)
1481 (arguments '(#:tests? #f)) ;no 'test' target
1483 ;; Headers include OpenEXR and IlmBase headers.
1484 (propagated-inputs (list openexr-2))
1486 (home-page "http://ampasctl.sourceforge.net")
1487 (synopsis "Color Transformation Language")
1489 "The Color Transformation Language, or CTL, is a small programming
1490 language that was designed to serve as a building block for digital color
1491 management systems. CTL allows users to describe color transforms in a
1492 concise and unambiguous way by expressing them as programs. In order to apply
1493 a given transform to an image, the color management system instructs a CTL
1494 interpreter to load and run the CTL program that describes the transform. The
1495 original and the transformed image constitute the CTL program's input and
1498 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1499 ;; and headers use different wording.
1500 (license (license:non-copyleft "file://LICENSE"))))
1502 (define-public brdf-explorer
1503 ;; There are no release tarballs, and not even tags in the repo,
1504 ;; so use the latest revision.
1505 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1508 (name "brdf-explorer")
1509 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1513 (url "https://github.com/wdas/brdf")
1517 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1518 (file-name (string-append name "-" version "-checkout"))))
1519 (build-system gnu-build-system)
1521 `(#:phases (modify-phases %standard-phases
1523 (lambda* (#:key outputs #:allow-other-keys)
1524 (let ((out (assoc-ref outputs "out")))
1526 (string-append "prefix=" out)))))
1527 (add-after 'install 'wrap-program
1528 (lambda* (#:key outputs #:allow-other-keys)
1529 (let* ((out (assoc-ref outputs "out"))
1530 (bin (string-append out "/bin"))
1531 (data (string-append
1532 out "/share/brdf")))
1533 (with-directory-excursion bin
1534 (rename-file "brdf" ".brdf-real")
1535 (call-with-output-file "brdf"
1537 (format port "#!/bin/sh
1538 # Run the thing from its home, otherwise it just bails out.
1540 exec -a \"$0\" ~a/.brdf-real~%"
1542 (chmod "brdf" #o555)))
1545 (list qttools-5)) ;for 'qmake'
1547 (list qtbase-5 mesa glew freeglut zlib))
1548 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1550 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1552 "BRDF Explorer is an application that allows the development and analysis
1553 of bidirectional reflectance distribution functions (BRDFs). It can load and
1554 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1555 language), measured material data from the MERL database, and anisotropic
1556 measured material data from MIT CSAIL. Graphs and visualizations update in
1557 real time as parameters are changed, making it a useful tool for evaluating
1558 and understanding different BRDFs (and other component functions).")
1559 (license license:ms-pl))))
1567 (uri (list (string-append
1568 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1571 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1574 ;; Site was discontinued.
1575 (string-append "http://www.antigrain.com/agg-"
1576 version ".tar.gz")))
1578 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1579 (patches (search-patches "agg-am_c_prototype.patch"
1580 "agg-2.5-gcc8.patch"))))
1581 (build-system gnu-build-system)
1584 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1586 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1588 "--disable-examples")
1590 (modify-phases %standard-phases
1593 ;; let's call configure from configure phase and not now
1594 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1595 (invoke "sh" "autogen.sh"))))))
1597 (list pkg-config libtool autoconf automake))
1599 (list libx11 freetype sdl))
1601 ;; Antigrain.com was discontinued.
1602 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1603 (synopsis "High-quality 2D graphics rendering engine for C++")
1605 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1606 It supports sub-pixel resolutions and anti-aliasing. It is also a library for
1607 rendering @acronym{SVG, Scalable Vector Graphics}.")
1608 (license license:gpl2+)))
1610 (define-public python-pastel
1612 (name "python-pastel")
1617 (uri (pypi-uri "pastel" version))
1620 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1621 (build-system python-build-system)
1623 `(#:phases (modify-phases %standard-phases
1625 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1627 (list python-pytest))
1628 (home-page "https://github.com/sdispater/pastel")
1629 (synopsis "Library to colorize strings in your terminal")
1630 (description "Pastel is a simple library to help you colorize strings in
1632 (license license:expat)))
1634 (define-public fgallery
1642 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1643 "fgallery-" version ".zip"))
1646 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1647 (build-system gnu-build-system)
1649 `(#:tests? #f ; no tests
1651 (modify-phases %standard-phases
1655 (lambda* (#:key inputs outputs #:allow-other-keys)
1656 (let* ((out (assoc-ref outputs "out"))
1657 (bin (string-append out "/bin/"))
1658 (share (string-append out "/share/fgallery"))
1659 (man (string-append out "/share/man/man1"))
1660 (perl5lib (getenv "PERL5LIB"))
1661 (script (string-append share "/fgallery")))
1662 (define (bin-directory input-name)
1663 (string-append (assoc-ref inputs input-name) "/bin"))
1666 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1669 (copy-recursively "." share)
1671 ;; fgallery copies files from store when it is run. The
1672 ;; read-only permissions from the store directories will cause
1673 ;; fgallery to fail. Do not preserve file attributes when
1674 ;; copying files to prevent it.
1677 "'cp', '--no-preserve=all'"))
1680 (symlink script (string-append out "/bin/fgallery"))
1682 (wrap-program script
1684 ,(map bin-directory '("imagemagick"
1692 `("PERL5LIB" ":" prefix (,perl5lib)))
1696 ;; TODO: Add missing optional dependency: facedetect.
1698 `(("imagemagick" ,imagemagick)
1701 ("libjpeg" ,libjpeg-turbo)
1704 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1705 ("perl-image-exiftool" ,perl-image-exiftool)
1706 ("jpegoptim" ,jpegoptim)
1707 ("pngcrush" ,pngcrush)
1709 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1710 (synopsis "Static photo gallery generator")
1712 "FGallery is a static, JavaScript photo gallery generator with minimalist
1713 look. The result can be uploaded on any web server without additional
1715 (license license:gpl2+)))
1717 (define-public opensubdiv
1724 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1725 (commit (string-append "v" (string-join (string-split version #\.)
1727 (file-name (git-file-name name version))
1730 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1731 (build-system cmake-build-system)
1733 `(#:phases (modify-phases %standard-phases
1734 (add-before 'configure 'set-glew-location
1735 (lambda* (#:key inputs #:allow-other-keys)
1736 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1738 (add-before 'check 'start-xorg-server
1739 (lambda* (#:key inputs #:allow-other-keys)
1740 ;; The test suite requires a running X server.
1741 (system "Xvfb :1 &")
1742 (setenv "DISPLAY" ":1")
1745 (list xorg-server-for-tests))
1754 (home-page "https://graphics.pixar.com/opensubdiv/")
1755 (synopsis "High performance subdivision surface evaluation")
1756 (description "OpenSubdiv is a set of libraries that implement high
1757 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1758 and GPU architectures.")
1759 (license license:asl2.0)))
1761 (define-public opencsg
1762 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1770 (url "https://github.com/floriankirsch/OpenCSG")
1771 (commit (string-append "opencsg-"
1772 (string-map dot-to-dash version)
1774 (file-name (git-file-name name version))
1777 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1778 (build-system gnu-build-system)
1781 (modify-phases %standard-phases
1783 (lambda* (#:key outputs #:allow-other-keys)
1784 (substitute* "src/Makefile"
1785 (("/usr/local") (assoc-ref outputs "out")))
1787 (add-before 'build 'skip-example
1788 (lambda _ (chdir "src") #t)))))
1790 (list glew freeglut))
1791 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1793 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1794 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1795 For example, two shapes can be combined by uniting them, by intersecting them,
1796 or by subtracting one shape from the other.")
1797 (home-page "http://www.opencsg.org/")
1798 (license license:gpl2))))
1800 (define-public coin3D
1801 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1802 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1804 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1808 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1813 (url "https://bitbucket.org/Coin3D/coin")
1814 (changeset changeset)))
1815 (file-name (git-file-name name version))
1817 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1818 (modules '((guix build utils)))
1821 (for-each delete-file
1823 "cfg/wrapmsvc.exe"))
1825 (build-system cmake-build-system)
1827 (list doxygen graphviz))
1829 (list boost freeglut glew))
1833 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1834 (string-append "-DBOOST_ROOT="
1835 (assoc-ref %build-inputs "boost")))))
1836 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1838 "High-level 3D visualization library with Open Inventor 2.1 API")
1840 "Coin is a 3D graphics library with an Application Programming Interface
1841 based on the Open Inventor 2.1 API. For those who are not familiar with
1842 Open Inventor, it is a scene-graph based retain-mode rendering and model
1843 interaction library, written in C++, which has become the de facto
1844 standard graphics library for 3D visualization and visual simulation
1845 software in the scientific and engineering community.")
1846 (license license:bsd-3))))
1848 (define-public coin3D-4
1856 (url "https://github.com/coin3d/coin")
1857 (commit (string-append "Coin-" version))
1859 (file-name (git-file-name name version))
1861 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1862 (modules '((guix build utils)))
1866 (for-each delete-file
1868 "cfg/wrapmsvc.exe"))
1869 ;; Delete references to packaging tool cpack. Otherwise the build
1870 ;; fails with "add_subdirectory given source "cpack.d" which is not
1871 ;; an existing directory."
1872 (substitute* "CMakeLists.txt"
1873 ((".*cpack.d.*") ""))
1875 (build-system cmake-build-system)
1877 (list doxygen graphviz))
1879 (list boost freeglut glew))
1883 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1884 (string-append "-DBOOST_ROOT="
1885 (assoc-ref %build-inputs "boost")))))
1886 (home-page "https://github.com/coin3d/coin")
1888 "High-level 3D visualization library with Open Inventor 2.1 API")
1890 "Coin is a 3D graphics library with an Application Programming Interface
1891 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1892 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1893 library, written in C++, which has become the de facto standard graphics
1894 library for 3D visualization and visual simulation software in the scientific
1895 and engineering community.")
1896 (license license:bsd-3)))
1899 ;; Releases follow those of Chromium, about every 6 weeks. The release
1900 ;; version can be found on this page:
1901 ;; https://skia.org/docs/user/release/release_notes/. The commit used
1902 ;; should be the last commit, as recommended at
1903 ;; https://skia.org/docs/user/release/.
1904 (let ((version "98")
1906 (commit "55c56abac381e1ae3f0116c410bed81b05e0a38a"))
1909 (version (git-version version revision commit))
1913 (url "https://skia.googlesource.com/skia.git")
1915 (file-name (git-file-name name version))
1918 "1ldns2j1g2wj2phlxr9zqkdgs5g64pisxhwxcrq9ijn8a3jhafr2"))))
1919 (build-system gnu-build-system) ;actually GN + Ninja
1922 ;; Running the test suite would require 'dm'; unfortunately the tool
1923 ;; can only be built for debug builds, which require fetching third
1927 #~(modify-phases %standard-phases
1929 (lambda* (#:key inputs #:allow-other-keys)
1930 (substitute* "BUILD.gn"
1931 ;; Workaround a bug in the zlib third_party definition, that
1932 ;; fails the build even when zlib is found from the system.
1933 (("deps = \\[ \"//third_party/zlib\" ]")
1935 (invoke "gn" "gen" "build"
1939 "cc=\"gcc\" " ;defaults to 'cc'
1940 "is_official_build=true " ;to use system libraries
1941 "is_component_build=true " ;build as a shared library
1942 ;; Specify where locate the harfbuzz and freetype
1944 (format #f "extra_cflags=[\"-I~a\",\"-I~a\"] "
1945 (search-input-directory inputs
1947 (search-input-directory inputs
1948 "include/freetype2"))
1949 ;; Otherwise the validate-runpath phase fails.
1950 "extra_ldflags=[\"-Wl,-rpath=" #$output "/lib\"] "
1951 ;; Disabled, otherwise the build system attempts to
1952 ;; download the SDK at build time.
1953 "skia_use_dng_sdk=false "))))
1955 (lambda* (#:key parallel-build? #:allow-other-keys)
1956 (let ((job-count (if parallel-build?
1957 (number->string (parallel-job-count))
1959 (invoke "ninja" "-j" job-count "-C" "build"))))
1963 (for-each (lambda (h)
1964 (install-file h (string-append
1965 #$output "/include/skia/"
1967 (find-files "." "\\.h$"))
1968 ;; Install libraries.
1969 (for-each (lambda (lib)
1970 (install-file lib (string-append #$output "/lib")))
1971 (find-files "build" "^lib.*\\.(a|so)"))
1972 ;; This pkgconfig file is useful at least to the
1973 ;; python-skia-pathops package.
1974 (define skia.pc (string-append #$output
1975 "/lib/pkgconfig/skia.pc"))
1976 (mkdir-p (dirname skia.pc))
1977 (call-with-output-file skia.pc
1981 exec_prefix=${prefix}
1982 libdir=${prefix}/lib
1983 includedir=${prefix}/include/skia
1986 Description: 2D graphic library for drawing text, geometries and images.
1987 URL: https://skia.org/
1989 Libs: -L${libdir} -lskia
1990 Cflags: -I${includedir}~%" #$output #$version))))))))
1991 (native-inputs (list gn libjpeg-turbo ninja pkg-config python-wrapper))
1992 (inputs (list expat fontconfig freetype harfbuzz mesa libwebp zlib))
1993 (home-page "https://skia.org/")
1994 (synopsis "2D graphics library")
1996 "Skia is a 2D graphics library for drawing text, geometries, and images.
1999 @item 3x3 matrices with perspective
2000 @item antialiasing, transparency, filters
2001 @item shaders, xfermodes, maskfilters, patheffects
2004 (license license:bsd-3))))
2006 (define-public superfamiconv
2008 (name "superfamiconv")
2014 (url "https://github.com/Optiroc/SuperFamiconv")
2015 (commit (string-append "v" version))))
2016 (file-name (git-file-name name version))
2019 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
2020 (build-system gnu-build-system)
2022 `(#:tests? #f ; no tests
2024 (modify-phases %standard-phases
2027 (lambda* (#:key outputs #:allow-other-keys)
2028 (let* ((outdir (assoc-ref outputs "out"))
2029 (bindir (string-append outdir "/bin")))
2030 (install-file "bin/superfamiconv" bindir)
2032 (home-page "https://github.com/Optiroc/SuperFamiconv")
2033 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
2034 and PC Engine formats")
2035 (description "SuperFamiconv is a converter for tiled graphics, supporting
2036 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
2037 Automated palette selection is supported.")
2038 (license license:expat)))
2040 (define-public drawpile
2041 ;; This commit fix building with libmicrohttpd>=0.71.
2042 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
2046 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
2050 (url "https://github.com/drawpile/Drawpile")
2052 (file-name (git-file-name name version))
2055 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
2056 (build-system qt-build-system)
2059 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
2061 (list extra-cmake-modules pkg-config))
2070 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
2076 (home-page "https://drawpile.net")
2077 (synopsis "Collaborative drawing program")
2078 (description "Drawpile is a drawing program that allows share the canvas
2079 with other users in real time.
2081 Some feature highlights:
2083 @item Shared canvas using the built-in server or a dedicated server
2084 @item Record, play back and export drawing sessions
2085 @item Simple animation support
2086 @item Layers and blending modes
2088 @item Supports pressure sensitive Wacom tablets
2090 @item Supports OpenRaster file format
2091 @item Encrypted connections using SSL
2092 @item Automatic port forwarding with UPnP
2094 (license license:gpl3+))))
2096 (define-public openxr
2104 (url "https://github.com/KhronosGroup/OpenXR-SDK")
2105 (commit (string-append "release-" version))))
2106 (file-name (git-file-name name version))
2107 (modules '((guix build utils)))
2110 ;; Delete bundled jsoncpp.
2111 (delete-file-recursively "src/external/jsoncpp")))
2113 (base32 "1p8nfxswgy40zxizh925a477jcsfngbwns65qzaid5rmrvvk8c45"))))
2114 (build-system cmake-build-system)
2116 `(#:tests? #f)) ; there are no tests
2118 (list pkg-config python shaderc vulkan-headers))
2120 (list jsoncpp mesa vulkan-loader wayland))
2121 (home-page "https://www.khronos.org/openxr/")
2122 (synopsis "Generated headers and sources for OpenXR loader")
2123 (description "This package contains OpenXR headers, as well as source code
2124 and build scripts for the OpenXR loader.")
2125 ;; Dual licensed. Either license applies.
2126 (license (list license:asl2.0 license:expat))))
2128 (define-public monado
2134 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
2135 name "/-/archive/v" version "/"
2136 name "-v" version ".tar.bz2"))
2139 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
2140 (build-system meson-build-system)
2153 (list eigen pkg-config vulkan-headers))
2156 (list "-Dinstall-active-runtime=false")))
2157 (home-page "https://monado.freedesktop.org/")
2158 (synopsis "OpenXR runtime")
2159 (description "Monado is an OpenXR runtime delivering immersive experiences
2160 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
2161 a complete and conforming implementation of the OpenXR API made by Khronos.")
2162 (license license:boost1.0)))
2164 (define-public azpainter
2171 (url "https://gitlab.com/azelpg/azpainter")
2172 (commit (string-append "v" version))))
2173 (file-name (git-file-name name version))
2176 "1iplp3p8pw9q44kb43hrk89sv2aff6bdy9fk58j2v6k5lqbk6kvf"))))
2177 (build-system gnu-build-system) ;actually a home grown build system
2181 #~(modify-phases %standard-phases
2184 (invoke "./configure"
2185 (string-append "--prefix="
2188 (lambda* (#:key parallel-build? #:allow-other-keys)
2189 (let ((job-count (if parallel-build?
2190 (number->string (parallel-job-count))
2192 (invoke "ninja" "-j" job-count "-C" "build"))))
2193 (add-before 'install 'disable-cache-generation
2195 (setenv "DESTDIR" "/") #t))
2198 (invoke "ninja" "-C" "build" "install"))))))
2199 (inputs (list fontconfig
2210 (native-inputs (list ninja pkg-config))
2211 (home-page "http://azsky2.html.xdomain.jp/soft/azpainter.html")
2212 (synopsis "Paint software for editing illustrations and images")
2214 "AzPainter is a lightweight full color painting application for editing
2215 illustrations and images.
2220 @item Many artistic filters
2221 @item Good range of selection tools
2222 @item Pen pressure support with automatic brush size adjustment
2223 @item Support for 16-bit color images with transparency (RGBA)
2224 @item Support for image formats like PSD, PNG, JPEG, TIFF, WebP
2227 (license license:gpl3+)))
2229 (define-public discregrid
2230 (let ((commit "4c27e1cc88be828c6ac5b8a05759ac7e01cf79e9")
2234 (version (git-version "0.0.0" revision commit))
2239 (url "https://github.com/InteractiveComputerGraphics/Discregrid")
2241 (file-name (git-file-name name version))
2243 (base32 "01cwfpw19rc9k5glx9dhnqpihd0is28a9b53qvzp5kgjmdq2v1p0"))
2244 (modules '((guix build utils)))
2247 (delete-file-recursively "extern/cxxopts")
2248 (substitute* '("cmd/discrete_field_to_bitmap/main.cpp"
2249 "cmd/generate_density_map/main.cpp"
2250 "cmd/generate_sdf/main.cpp")
2251 (("^#include <cxxopts/cxxopts\\.hpp>")
2252 "#include <cxxopts.hpp>"))))))
2253 (build-system cmake-build-system)
2254 (outputs '("out" "bin"))
2256 (list #:tests? #f ; No tests
2258 #~(list (string-append "-DCMAKE_INSTALL_BINDIR="
2259 #$output:bin "/bin")
2260 ;; Bespoke version of BUILD_SHARED_LIBS.
2261 "-DBUILD_AS_SHARED_LIBS=ON")
2263 #~(modify-phases %standard-phases
2264 (add-after 'unpack 'patch-cmake
2266 (let ((port (open-file "cmd/CMakeLists.txt" "a")))
2267 (display "install(TARGETS
2268 DiscreteFieldToBitmap
2273 (close-port port)))))))
2275 (list cxxopts eigen))
2276 (home-page "https://github.com/InteractiveComputerGraphics/Discregrid")
2277 (synopsis "Discretize functions on regular grids")
2278 (description "Discregrid is a C++ library for the parallel discretization
2279 of (preferably smooth) functions on regular grids. It generates a (cubic)
2280 polynomial discretization given a box-shaped domain, a grid resolution, and a
2281 3D scalar field. The library can also serialize and deserialize the generated
2282 discrete grid, and compute and discretize the signed distance field
2283 corresponding to a triangle mesh. The following programs are included with
2287 @item @code{GenerateSDF}: Computes a discrete (cubic) signed distance field
2288 from a triangle mesh in OBJ format.
2290 @item @code{DiscreteFieldToBitmap}: Generates an image in bitmap format of a
2291 two-dimensional slice of a previously computed discretization.
2293 @item @code{GenerateDensityMap}: Generates a density map from a previously
2294 generated discrete signed distance field using the cubic spline kernel.
2296 (license license:expat))))
2306 (url "https://github.com/MmgTools/mmg")
2307 (commit (string-append "v" version))))
2308 (file-name (git-file-name name version))
2310 (base32 "173biz5skbwg27i5w6layg7mydjzv3rmi1ywhra4rx9rjf5c0cc5"))))
2311 (build-system cmake-build-system)
2312 (outputs '("out" "lib" "doc"))
2314 (list #:configure-flags
2315 #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output:lib)
2316 (string-append "-DCMAKE_INSTALL_RPATH=" #$output:lib "/lib")
2317 ;; The build doesn't honor -DCMAKE_INSTALL_BINDIR, hence
2318 ;; the adjust-bindir phase.
2319 ;;(string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin")
2320 "-DBUILD_SHARED_LIBS=ON"
2321 "-DBUILD_TESTING=ON"
2322 ;; The longer tests are for continuous integration and
2323 ;; depend on input data which must be downloaded.
2324 "-DONLY_VERY_SHORT_TESTS=ON"
2325 ;; TODO: Add Elas (from
2326 ;; https://github.com/ISCDtoolbox/LinearElasticity).
2328 ;; TODO: Figure out how to add VTK to inputs without
2329 ;; causing linking errors in ASLI of the form:
2331 ;; ld: /gnu/store/…-vtk-9.0.1/lib/libvtkWrappingPythonCore-9.0.so.1:
2332 ;; undefined reference to `PyUnicode_InternFromString'
2334 ;; Also, adding VTK to inputs requires adding these as well:
2336 ;; double-conversion eigen expat freetype gl2ps glew hdf5
2337 ;; jsoncpp libjpeg-turbo libpng libtheora libtiff libx11
2338 ;; libxml2 lz4 netcdf proj python sqlite zlib
2341 #~(modify-phases %standard-phases
2342 (add-after 'build 'build-doc
2344 ;; Fontconfig wants to write to a cache directory.
2345 (setenv "HOME" "/tmp")
2346 (invoke "make" "doc")))
2347 (add-after 'install 'install-doc
2350 "../source/doc/man" (string-append #$output
2353 "doc" (string-append #$output:doc "/share/doc/"
2354 #$name "-" #$version))))
2355 (add-after 'install 'adjust-bindir
2357 (let ((src (string-append #$output:lib "/bin"))
2358 (dst (string-append #$output "/bin")))
2359 (copy-recursively src dst)
2360 (delete-file-recursively src))))
2361 ;; Suffixing program names with build information, i.e.,
2362 ;; optimization flags and whether debug symbols were generated,
2363 ;; is unusual and fragilizes scripts calling these programs.
2364 (add-after 'adjust-bindir 'fix-program-names
2366 (with-directory-excursion (string-append #$output "/bin")
2367 (rename-file "mmg2d_O3d" "mmg2d")
2368 (rename-file "mmg3d_O3d" "mmg3d")
2369 (rename-file "mmgs_O3d" "mmgs")))))))
2371 ;; For the documentation
2372 (list doxygen graphviz
2373 ;; TODO: Fix failing LaTeX invocation (which results in equations
2374 ;; being inserted literally into PNGs rather than being typeset).
2377 perl)) ;used to generate Fortran headers
2380 (home-page "http://www.mmgtools.org/")
2381 (synopsis "Surface and volume remeshers")
2382 (description "Mmg is a collection of applications and libraries for
2383 bidimensional and tridimensional surface and volume remeshing. It consists
2387 @item the @code{mmg2d} application and library: mesh generation from a set of
2388 edges, adaptation and optimization of a bidimensional triangulation and
2389 isovalue discretization;
2391 @item the @code{mmgs} application and library: adaptation and optimization of
2392 a surface triangulation and isovalue discretization;
2394 @item the @code{mmg3d} application and library: adaptation and optimization of
2395 a tetrahedral mesh, isovalue discretization and Lagrangian movement;
2397 @item the @code{mmg} library gathering the @code{mmg2d}, @code{mmgs} and
2398 @code{mmg3d} libraries.
2400 (license license:lgpl3+)))
2410 (url "https://github.com/f3d-app/f3d")
2411 (commit (string-append "v" version))))
2412 (file-name (git-file-name name version))
2414 (base32 "0hdfgwf5d24ykab634xg4vv9r09nh96ss7hhnqnh5nmw4abhxzg7"))
2415 (modules '((guix build utils)))
2418 (delete-file "application/cxxopts.hpp")
2419 (delete-file "application/json.hpp")
2420 (substitute* "application/F3DOptionsParser.cxx"
2421 (("^#include \"cxxopts\\.hpp\"")
2422 "#include <cxxopts.hpp>")
2423 (("^#include \"json\\.hpp\"")
2424 "#include <nlohmann/json.hpp>"))))))
2425 (build-system cmake-build-system)
2426 ;; The package cannot easily be split into out and lib outputs because
2427 ;; VTK's vtkModule.cmake complains, and also the CMake files in
2428 ;; /lib/cmake/f3d expect the f3d executable and library to be available,
2429 ;; as they set up targets for both of them.
2432 ;; Many tests require files supplied by git-lfs.
2433 ;; Also, some tests segfault (after an exception?) but the tested
2434 ;; behavior, i.e., when the program is run manually, does not (for
2435 ;; example, TestNonExistentConfigFile and TestInvalidConfigFile).
2436 ;; Upstream is aware of occasionally flaky tests [1], but the tests
2437 ;; run in CI seem to be passing.
2438 ;; Anyway, the program runs and is able to open at least STL files
2441 ;; [1]: https://github.com/f3d-app/f3d/issues/92
2444 #~(list (string-append "-DCMAKE_INSTALL_DOCDIR=" #$output
2445 "/share/doc/" #$name "-" #$version)
2446 "-DBUILD_TESTING=OFF"
2447 "-DF3D_GENERATE_MAN=ON"
2448 "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE=ON"
2449 "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON"
2450 "-DF3D_INSTALL_MIME_TYPES_FILES=ON"
2451 "-DF3D_INSTALL_THUMBNAILER_FILES=ON"
2452 "-DF3D_MODULE_ALEMBIC=ON"
2453 "-DF3D_MODULE_ASSIMP=ON"
2454 "-DF3D_MODULE_EXTERNAL_RENDERING=ON"
2455 "-DF3D_MODULE_OCCT=ON")))
2481 (home-page "https://f3d-app.github.io/f3d/")
2482 (synopsis "VTK-based 3D viewer")
2483 (description "F3D (pronounced @samp{/fɛd/}) is a VTK-based 3D viewer with
2484 simple interaction mechanisms and which is fully controllable using arguments
2485 on the command line. It supports a range of file formats (including animated
2486 glTF, STL, STEP, PLY, OBJ, FBX), and provides numerous rendering and texturing
2488 (license license:bsd-3)))