1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019, 2020 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; Copyright © 2020 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>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages graphics)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages algebra)
46 #:use-module (gnu packages audio)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages bison)
51 #:use-module (gnu packages boost)
52 #:use-module (gnu packages cdrom)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages crypto)
56 #:use-module (gnu packages datastructures)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages flex)
59 #:use-module (gnu packages fonts)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages freedesktop)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages ghostscript)
64 #:use-module (gnu packages gl)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gnome)
67 #:use-module (gnu packages gnunet)
68 #:use-module (gnu packages graphviz)
69 #:use-module (gnu packages gstreamer)
70 #:use-module (gnu packages gtk)
71 #:use-module (gnu packages haskell-xyz)
72 #:use-module (gnu packages image)
73 #:use-module (gnu packages image-processing)
74 #:use-module (gnu packages imagemagick)
75 #:use-module (gnu packages jemalloc)
76 #:use-module (gnu packages kde-frameworks)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages lua)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages mp3)
81 #:use-module (gnu packages multiprecision)
82 #:use-module (gnu packages pdf)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages photo)
85 #:use-module (gnu packages pkg-config)
86 #:use-module (gnu packages plotutils)
87 #:use-module (gnu packages pth)
88 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages python-xyz)
91 #:use-module (gnu packages qt)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages sdl)
94 #:use-module (gnu packages stb)
95 #:use-module (gnu packages swig)
96 #:use-module (gnu packages tbb)
97 #:use-module (gnu packages upnp)
98 #:use-module (gnu packages video)
99 #:use-module (gnu packages xiph)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages xdisorg)
103 #:use-module (guix build-system copy)
104 #:use-module (guix build-system cmake)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system meson)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system qt)
109 #:use-module (guix download)
110 #:use-module (guix git-download)
111 #:use-module (guix hg-download)
112 #:use-module ((guix licenses) #:prefix license:)
113 #:use-module (guix packages)
114 #:use-module (guix utils))
116 (define-public eglexternalplatform
118 (name "eglexternalplatform")
125 (url "https://github.com/NVIDIA/eglexternalplatform")
128 (git-file-name name version))
130 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
131 (build-system copy-build-system)
134 (modify-phases %standard-phases
135 (add-after 'unpack 'patch-pkgconfig
136 (lambda* (#:key outputs #:allow-other-keys)
137 (substitute* "eglexternalplatform.pc"
139 (assoc-ref outputs "out")))
141 (add-after 'install 'revise
142 (lambda* (#:key outputs #:allow-other-keys)
143 (let* ((out (assoc-ref outputs "out")))
144 (mkdir-p (string-append out "/include/EGL"))
146 (string-append out "/interface")
147 (string-append out "/include/EGL"))
148 (mkdir-p (string-append out "/share/pkgconfig"))
150 (string-append out "/eglexternalplatform.pc")
151 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
152 (for-each delete-file-recursively
154 (string-append out "/samples")
155 (string-append out "/COPYING")
156 (string-append out "/README.md"))))
158 (synopsis "EGL External Platform interface")
159 (description "EGLExternalPlatform is an specification of the EGL External
160 Platform interface for writing EGL platforms and their interactions with modern
161 window systems on top of existing low-level EGL platform implementations. This
162 keeps window system implementation specifics out of EGL drivers by using
163 application-facing EGL functions.")
164 (home-page "https://github.com/NVIDIA/eglexternalplatform")
165 (license license:expat)))
167 (define-public egl-wayland
176 (url "https://github.com/NVIDIA/egl-wayland")
179 (git-file-name name version))
181 (base32 "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk"))))
182 (build-system meson-build-system)
184 `(("pkg-config" ,pkg-config)))
187 ("wayland" ,wayland)))
189 `(("eglexternalplatform" ,eglexternalplatform)))
190 (synopsis "EGLStream-based Wayland external platform")
191 (description "EGL-Wayland is an implementation of a EGL External Platform
192 library to add client-side Wayland support to EGL on top of EGLDevice and
193 EGLStream families of extensions.")
194 (home-page "https://github.com/NVIDIA/egl-wayland")
195 (license license:expat)))
206 (url "https://github.com/hodefoting/mmm")
209 (git-file-name name version))
211 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
212 (build-system meson-build-system)
215 ("pkg-config" ,pkg-config)))
220 (synopsis "Memory Mapped Machine")
221 (description "MMM is a shared memory protocol for virtualising access to
222 framebuffer graphics, audio output and input event.")
223 (home-page "https://github.com/hodefoting/mrg")
224 (license license:isc)))
226 (define-public directfb
235 (url "https://github.com/deniskropp/DirectFB")
236 (commit "DIRECTFB_1_7_7")))
237 (file-name (git-file-name name version))
239 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
240 (build-system gnu-build-system)
243 (modify-phases %standard-phases
244 (add-after 'unpack 'disable-configure-during-bootstrap
246 (substitute* "autogen.sh"
247 (("^.*\\$srcdir/configure.*") ""))
250 `(("autoconf" ,autoconf)
251 ("automake" ,automake)
254 ("pkg-config" ,pkg-config)))
258 ("freetype" ,freetype)
260 ("gstreamer" ,gstreamer)
263 ("jpeg" ,libjpeg-turbo)
266 ("libtimidity" ,libtimidity)
267 ("linux-headers" ,linux-libre-headers)
279 ("vorbisfile" ,libvorbis)
283 ("xcomposite" ,libxcomposite)
285 ("xproto" ,xorgproto)
289 (synopsis "DFB Graphics Library")
290 (description "DirectFB is a graphics library which was designed with embedded
291 systems in mind. It offers maximum hardware accelerated performance at a
292 minimum of resource usage and overhead.")
293 (home-page "https://github.com/deniskropp/DirectFB")
294 (license license:lgpl2.1+)))
305 (url "https://github.com/deniskropp/flux")
307 (file-name (git-file-name name version))
309 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
310 (build-system gnu-build-system)
312 `(("autoconf" ,autoconf)
313 ("automake" ,automake)
315 ("pkg-config" ,pkg-config)))
316 (synopsis "Interface description language")
317 (description "Flux is an interface description language used by DirectFB.
318 Fluxcomp compiles .flux files to .cpp or .c files.")
319 (home-page "http://www.directfb.org/")
320 (license license:lgpl2.1+))) ; Same as DirectFB
330 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
332 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
333 (build-system gnu-build-system)
336 (modify-phases %standard-phases
337 (add-after 'unpack 'patch
339 (substitute* "configure"
340 (("-I/usr/include/freetype2")
343 (assoc-ref %build-inputs "freetype")
344 "/include/freetype2"))))
347 `(("doxygen" ,doxygen)))
350 ("freetype" ,freetype)
353 ("jpeg" ,libjpeg-turbo)
357 ("xcursor" ,libxcursor)
359 ("xfixes" ,libxfixes)
362 ("xrandr" ,libxrandr)
363 ("xrender" ,libxrender)
364 ("xshm" ,libxshmfence)
366 (synopsis "Widget Toolkit for building GUI")
367 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
368 Graphical User Interfaces easily and effectively. It offers a wide, and
369 growing, collection of Controls, and provides state of the art facilities such
370 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
371 manipulation. FOX also implements icons, images, and user-convenience features
372 such as status line help, and tooltips. Tooltips may even be used for 3D
374 (home-page "http://www.fox-toolkit.org")
375 (license license:lgpl2.1+)))
377 (define-public autotrace
378 (let ((commit "travis-20190624.59")
379 (version-base "0.40.0"))
382 (version (string-append version-base "-"
383 (if (string-prefix? "travis-" commit)
384 (string-drop commit 7)
389 (url "https://github.com/autotrace/autotrace")
391 (file-name (git-file-name name version))
394 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
395 (build-system gnu-build-system)
397 `(#:phases (modify-phases %standard-phases
398 ;; See: https://github.com/autotrace/autotrace/issues/27.
399 (add-after 'unpack 'include-spline.h-header
401 (substitute* "Makefile.am"
402 ((".*src/types.h.*" all)
403 (string-append all "\t\tsrc/spline.h \\\n")))
405 ;; See: https://github.com/autotrace/autotrace/issues/26.
408 (invoke "sh" "tests/runtests.sh"))))))
411 ("pkg-config" ,pkg-config)
412 ("autoconf" ,autoconf)
413 ("automake" ,automake)
414 ("intltool" ,intltool)
416 ("gettext" ,gettext-minimal)))
419 ("libjpeg" ,libjpeg-turbo)
421 ("imagemagick" ,imagemagick)
422 ("pstoedit" ,pstoedit)))
423 (home-page "https://github.com/autotrace/autotrace")
424 (synopsis "Bitmap to vector graphics converter")
425 (description "AutoTrace is a utility for converting bitmap into vector
426 graphics. It can trace outlines and midlines, effect color reduction or
427 despeckling and has support for many input and output formats. It can be used
428 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
429 (license (list license:gpl2+ ;for the utility itself
430 license:lgpl2.1+))))) ;for use as a library
432 (define-public embree
439 (url "https://github.com/embree/embree")
440 (commit (string-append "v" version))))
441 (file-name (git-file-name name version))
444 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
445 (build-system cmake-build-system)
447 `(#:tests? #f ; no tests (apparently)
450 "-DEMBREE_ISPC_SUPPORT=OFF")))
454 (home-page "https://www.embree.org/")
455 (synopsis "High performance ray tracing kernels")
457 "Embree is a collection of high-performance ray tracing kernels.
458 Embree is meant to increase performance of photo-realistic rendering
460 (license license:asl2.0)))
462 (define-public blender
468 (uri (string-append "https://download.blender.org/source/"
469 "blender-" version ".tar.xz"))
472 "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm"))))
473 (build-system cmake-build-system)
475 (let ((python-version (version-major+minor (package-version python))))
476 `(;; Test files are very large and not included in the release tarball.
479 (list "-DWITH_CODEC_FFMPEG=ON"
480 "-DWITH_CODEC_SNDFILE=ON"
482 "-DWITH_DOC_MANPAGE=ON"
484 "-DWITH_IMAGE_OPENJPEG=ON"
485 "-DWITH_INPUT_NDOF=ON"
486 "-DWITH_INSTALL_PORTABLE=OFF"
488 "-DWITH_MOD_OCEANSIM=ON"
489 "-DWITH_OPENSUBDIV=ON"
490 "-DWITH_PYTHON_INSTALL=OFF"
491 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
492 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
494 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
495 "/include/python" ,python-version)
496 (string-append "-DPYTHON_VERSION=" ,python-version)
497 (string-append "-DPYTHON_NUMPY_PATH="
498 (assoc-ref %build-inputs "python-numpy")
499 "/lib/python" ,python-version "/site-packages/"))
501 (modify-phases %standard-phases
502 ;; XXX This file doesn't exist in the Git sources but will probably
503 ;; exist in the eventual 2.80 source tarball.
504 (add-after 'unpack 'fix-broken-import
506 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
507 (("import encode_bin") "from . import encode_bin"))
509 (add-after 'set-paths 'add-ilmbase-include-path
510 (lambda* (#:key inputs #:allow-other-keys)
511 ;; OpenEXR propagates ilmbase, but its include files do not appear
512 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
513 ;; the CPATH to satisfy the dependency on "half.h".
515 (string-append (assoc-ref inputs "ilmbase")
517 ":" (or (getenv "CPATH") "")))
521 ("jemalloc" ,jemalloc)
524 ("libxrender" ,libxrender)
525 ("opencolorio" ,opencolorio)
526 ("openimageio" ,openimageio)
528 ("opensubdiv" ,opensubdiv)
530 ("openjpeg" ,openjpeg)
531 ("libjpeg" ,libjpeg-turbo)
537 ("libsndfile" ,libsndfile)
538 ("freetype" ,freetype)
542 ("python-numpy" ,python-numpy)
546 (home-page "https://blender.org/")
547 (synopsis "3D graphics creation suite")
549 "Blender is a 3D graphics creation suite. It supports the entirety of
550 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
551 compositing and motion tracking, even video editing and game creation. The
552 application can be customized via its API for Python scripting.")
553 (license license:gpl2+)))
555 (define-public blender-2.79
561 (uri (string-append "https://download.blender.org/source/"
562 "blender-" version ".tar.gz"))
565 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
566 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
567 "blender-2.79-oiio2.patch"
568 ;; The following patches may be
569 ;; needed when the default GCC is
571 ;; "blender-2.79-gcc8.patch"
572 ;; "blender-2.79-gcc9.patch"
573 "blender-2.79-python-3.7-fix.patch"
574 "blender-2.79-python-3.8-fix.patch"))))
575 (build-system cmake-build-system)
577 (let ((python-version (version-major+minor (package-version python))))
578 `(;; Test files are very large and not included in the release tarball.
581 (list "-DWITH_CODEC_FFMPEG=ON"
582 "-DWITH_CODEC_SNDFILE=ON"
584 "-DWITH_DOC_MANPAGE=ON"
586 "-DWITH_GAMEENGINE=ON"
587 "-DWITH_IMAGE_OPENJPEG=ON"
588 "-DWITH_INPUT_NDOF=ON"
589 "-DWITH_INSTALL_PORTABLE=OFF"
591 "-DWITH_MOD_OCEANSIM=ON"
593 "-DWITH_PYTHON_INSTALL=OFF"
594 "-DWITH_PYTHON_INSTALL=OFF"
595 "-DWITH_SYSTEM_OPENJPEG=ON"
596 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
597 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
599 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
600 "/include/python" ,python-version)
601 (string-append "-DPYTHON_VERSION=" ,python-version))
603 (modify-phases %standard-phases
604 (add-after 'unpack 'fix-broken-import
606 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
607 (("import encode_bin") "from . import encode_bin"))
609 (add-after 'set-paths 'add-ilmbase-include-path
610 (lambda* (#:key inputs #:allow-other-keys)
611 ;; OpenEXR propagates ilmbase, but its include files do not appear
612 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
613 ;; the CPATH to satisfy the dependency on "half.h".
615 (string-append (assoc-ref inputs "ilmbase")
617 ":" (or (getenv "CPATH") "")))
621 ("jemalloc" ,jemalloc)
623 ("opencolorio" ,opencolorio)
624 ("openimageio" ,openimageio)
627 ("openjpeg" ,openjpeg)
628 ("libjpeg" ,libjpeg-turbo)
634 ("libsndfile" ,libsndfile)
635 ("freetype" ,freetype)
640 (home-page "https://blender.org/")
641 (synopsis "3D graphics creation suite")
643 "Blender is a 3D graphics creation suite. It supports the entirety of
644 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
645 compositing and motion tracking, even video editing and game creation. The
646 application can be customized via its API for Python scripting.
648 NOTE: This older version of Blender is the last release that does not require
649 OpenGL 3. It is retained for use with older computers.")
650 (license license:gpl2+)))
659 (url "https://github.com/guillaumechereau/goxel")
660 (commit (string-append "v" version))))
661 (file-name (git-file-name name version))
664 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
665 (build-system gnu-build-system)
668 #:phases (modify-phases %standard-phases (delete 'configure))
669 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
672 `(("pkg-config" ,pkg-config)))
677 (home-page "https://goxel.xyz/")
678 (synopsis "Voxel editor")
680 "Goxel is a voxel editor that features unlimited scene size, unlimited
681 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
682 and export to various formats including the format used by Magicavoxel.")
683 (license license:gpl3+)))
685 (define-public assimp
692 (url "https://github.com/assimp/assimp")
693 (commit (string-append "v" version))))
694 (file-name (git-file-name name version))
697 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
698 (build-system cmake-build-system)
701 (home-page "http://www.assimp.org/")
702 (synopsis "Asset import library")
704 "The Open Asset Import Library loads more than 40 3D file formats into
705 one unified data structure. Additionally, assimp features various mesh post
706 processing tools: normals and tangent space generation, triangulation, vertex
707 cache locality optimization, removal of degenerate primitives and duplicate
708 vertices, sorting by primitive type, merging of redundant materials and many
710 (license license:bsd-3)))
719 "https://github.com/CGAL/cgal/releases/download/releases/"
720 "CGAL-" version "/CGAL-" version ".tar.xz"))
723 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
724 (build-system cmake-build-system)
726 '(#:tests? #f)) ; no test target
731 (home-page "https://www.cgal.org/")
732 (synopsis "Computational geometry algorithms library")
734 "CGAL provides easy access to efficient and reliable geometric algorithms
735 in the form of a C++ library. CGAL is used in various areas needing geometric
736 computation, such as: computer graphics, scientific visualization, computer
737 aided design and modeling, geographic information systems, molecular biology,
738 medical imaging, robotics and motion planning, mesh generation, numerical
739 methods, etc. It provides data structures and algorithms such as
740 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
743 ;; The 'LICENSE' file explains that a subset is available under more
744 ;; permissive licenses.
745 (license license:gpl3+)))
747 (define-public ilmbase
754 (url "https://github.com/openexr/openexr")
755 (commit (string-append "v" version))))
756 (file-name (git-file-name "ilmbase" version))
759 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
760 (patches (search-patches "ilmbase-fix-tests.patch"))))
761 (build-system cmake-build-system)
763 `(#:phases (modify-phases %standard-phases
764 (add-after 'unpack 'change-directory
768 (home-page "https://www.openexr.com/")
769 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
771 "IlmBase provides several utility libraries for C++. Half is a class
772 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
773 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
774 quaternions and other useful 2D and 3D math functions. Iex is an
775 exception-handling library.")
776 (license license:bsd-3)))
778 (define-public lib2geom
779 ;; Use the latest master commit, as the 1.0 release suffer build problems.
781 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
784 (version (git-version "1.0" revision commit))
788 (url "https://gitlab.com/inkscape/lib2geom.git")
790 (file-name (git-file-name name version))
793 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
795 ;; Patch submitted to upstream (see:
796 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
797 (search-patches "lib2geom-fix-tests.patch"))
798 (modules '((guix build utils)))
801 ;; Fix py2geom module initialization (see:
802 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
803 (substitute* "src/py2geom/__init__.py"
804 (("_py2geom") "py2geom._py2geom"))
806 (build-system cmake-build-system)
808 `(#:imported-modules ((guix build python-build-system)
809 ,@%cmake-build-system-modules)
810 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
811 "-D2GEOM_BOOST_PYTHON=ON"
812 ;; Compiling the Cython bindings fail (see:
813 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
814 "-D2GEOM_CYTHON_BINDINGS=OFF")
816 (modify-phases %standard-phases
817 (add-after 'unpack 'patch-python-lib-install-path
818 (lambda* (#:key inputs outputs #:allow-other-keys)
819 (let* ((python-version (@ (guix build python-build-system)
821 (python-maj-min-version (python-version
822 (assoc-ref inputs "python")))
823 (site-package (string-append
824 (assoc-ref outputs "out")
825 "/lib/python" python-maj-min-version
827 (substitute* '("src/cython/CMakeLists.txt"
828 "src/py2geom/CMakeLists.txt")
829 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
830 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
832 (native-inputs `(("python" ,python-wrapper)
833 ("googletest" ,googletest)
834 ("pkg-config" ,pkg-config)))
835 (inputs `(("cairo" ,cairo)
836 ("pycairo" ,python-pycairo)
837 ("double-conversion" ,double-conversion)
841 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
842 (home-page "https://gitlab.com/inkscape/lib2geom/")
843 (synopsis "C++ 2D graphics library")
844 (description "2geom is a C++ library of mathematics for paths, curves,
845 and other geometric calculations. Designed for vector graphics, it tackles
846 Bézier curves, conic sections, paths, intersections, transformations, and
848 ;; Because the library is linked with the GNU Scientific Library
849 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
850 ;; https://gitlab.com/inkscape/inkscape/issues/784).
851 (license license:gpl3+))))
853 (define-public pstoedit
859 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
860 version "/pstoedit-" version ".tar.gz"))
863 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
864 (build-system gnu-build-system)
866 `(("pkg-config" ,pkg-config)))
868 `(("ghostscript" ,ghostscript)
869 ("imagemagick" ,imagemagick)
870 ("libplot" ,plotutils)
871 ("libjpeg" ,libjpeg-turbo)
872 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
873 (home-page "http://www.pstoedit.net/")
874 (synopsis "Converter for PostScript and PDF graphics")
875 (description "The @code{pstoedit} utility allows translating graphics
876 in the PostScript or PDF (Portable Document Format) formats to various
877 other vector formats such as:
882 @item Flattened PostScript
883 @item DXF, a CAD (Computed-Aided Design) exchange format
884 @item PIC (for troff/groff)
885 @item MetaPost (for usage with TeX/LaTeX)
886 @item LaTeX2e picture
887 @item GNU Metafile (for use with plotutils/libplot)
888 @item Any format supported by ImageMagick
890 (license license:gpl2+)))
892 (define-public dear-imgui
900 (url "https://github.com/ocornut/imgui")
901 (commit (string-append "v" version))))
902 (file-name (git-file-name name version))
904 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
905 (build-system gnu-build-system)
908 (list (string-append "CC=" ,(cc-for-target))
909 (string-append "PREFIX=" (assoc-ref %outputs "out"))
910 (string-append "VERSION=" ,version))
911 #:tests? #f ; no test suite
913 (modify-phases %standard-phases
914 (add-after 'unpack 'unpack-debian-files
915 (lambda* (#:key inputs #:allow-other-keys)
916 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
917 (apply invoke "patch" "-Np1" "-i"
918 (find-files "debian/patches" "\\.patch$"))
919 (substitute* "Makefile"
920 (("<stb/") "<") ; Guix doesn't use this subdirectory
921 ;; Don't build or install the static library.
922 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
923 (substitute* (list "imgui.pc.in"
925 ;; Don't link against a non-existent library.
928 (delete 'configure) ; no configure script
930 ;; The default ‘install’ target installs the static library. Don't.
931 (lambda* (#:key make-flags #:allow-other-keys)
932 (apply invoke "make" "install-shared" "install-header"
936 ;; Upstream doesn't provide a build system. Use Debian's.
939 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
940 version "+ds-1.debian.tar.xz"))
942 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
943 ("pkg-config" ,pkg-config)))
945 `(("freetype" ,freetype)
946 ("stb-rect-pack" ,stb-rect-pack)
947 ("stb-truetype" ,stb-truetype)))
948 (home-page "https://github.com/ocornut/imgui")
949 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
951 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
952 It creates optimized vertex buffers that you can render anytime in your
953 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
954 self-contained, without external dependencies.
956 Dear ImGui is aimed at content creation, visualization, and debugging tools as
957 opposed to average end-user interfaces. Hence it favors simplicity and
958 productivity but lacks certain features often found in higher-level libraries.
959 It is particularly suited to integration in game engine tooling, real-time 3D
960 applications, full-screen applications, and embedded platforms without standard
961 operating system features.")
962 (license license:expat))) ; some examples/ use the zlib licence
972 (url "https://github.com/OGRECave/ogre")
973 (commit (string-append "v" version))))
974 (file-name (git-file-name name version))
976 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
977 (build-system cmake-build-system)
980 (modify-phases %standard-phases
981 (add-before 'configure 'unpack-dear-imgui
982 (lambda* (#:key inputs #:allow-other-keys)
983 (copy-recursively (assoc-ref inputs "dear-imgui-source")
984 "../dear-imgui-source")
986 (add-before 'configure 'pre-configure
987 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
988 ;; a consequence, we cannot suggest ours in configure flags. Fix
990 (lambda* (#:key inputs outputs #:allow-other-keys)
991 (substitute* "CMakeLists.txt"
992 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
995 (let* ((out (assoc-ref %outputs "out"))
997 (string-join (list (string-append out "/lib")
998 (string-append out "/lib/OGRE"))
1000 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1001 "-DIMGUI_DIR=../dear-imgui-source"
1002 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1003 "-DOGRE_BUILD_TESTS=TRUE"
1004 "-DOGRE_INSTALL_DOCS=TRUE"
1005 "-DOGRE_INSTALL_SAMPLES=TRUE"
1006 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1009 ("dear-imgui-source" ,(package-source dear-imgui))
1010 ("doxygen" ,doxygen)
1011 ("googletest" ,googletest-1.8)
1012 ("pkg-config" ,pkg-config)))
1014 `(("font-dejavu" ,font-dejavu)
1015 ("freeimage" ,freeimage)
1016 ("freetype" ,freetype)
1019 ("libxrandr" ,libxrandr)
1020 ("pugixml" ,pugixml)
1022 ("tinyxml" ,tinyxml)
1023 ("zziplib" ,zziplib)))
1024 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1026 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1027 flexible 3D engine written in C++ designed to make it easier and more intuitive
1028 for developers to produce applications utilising hardware-accelerated 3D
1030 (home-page "https://www.ogre3d.org/")
1031 (license license:expat)))
1033 (define-public openexr
1036 (version (package-version ilmbase))
1038 (inherit (package-source ilmbase))
1039 (file-name (git-file-name "openexr" version))
1040 (modules '((guix build utils)))
1043 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1047 (build-system cmake-build-system)
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'change-directory
1055 (add-after 'change-directory 'increase-test-timeout
1057 ;; On armhf-linux, we need to override the CTest default
1058 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1059 (substitute* "IlmImfTest/CMakeLists.txt"
1060 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1063 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1065 ,@(if (not (target-64bit?))
1066 `((add-after 'change-directory 'disable-broken-test
1067 ;; This test fails on i686. Upstream developers suggest that
1068 ;; this test is broken on i686 and can be safely disabled:
1069 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1071 (substitute* "IlmImfTest/main.cpp"
1072 ((".*testOptimizedInterleavePatterns.*") ""))
1076 `(("pkg-config" ,pkg-config)))
1078 `(("ilmbase" ,ilmbase) ;used in public headers
1079 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1080 (home-page "https://www.openexr.com/")
1081 (synopsis "High-dynamic range file format library")
1083 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1084 use in computer imaging applications. The IlmImf C++ libraries support
1085 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1086 (license license:bsd-3)))
1088 (define-public openimageio
1090 (name "openimageio")
1095 (url "https://github.com/OpenImageIO/oiio")
1096 (commit (string-append "Release-" version))))
1097 (file-name (git-file-name name version))
1100 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
1101 (build-system cmake-build-system)
1102 ;; FIXME: To run all tests successfully, test image sets from multiple
1103 ;; third party sources have to be present. For details see
1104 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
1108 `(("pkg-config" ,pkg-config)))
1112 ("libjpeg" ,libjpeg-turbo)
1113 ("libtiff" ,libtiff)
1115 ("openexr" ,openexr)
1116 ("ilmbase" ,ilmbase)
1117 ("python" ,python-wrapper)
1118 ("pybind11" ,pybind11)
1119 ("robin-map" ,robin-map)
1121 (synopsis "C++ library for reading and writing images")
1123 "OpenImageIO is a library for reading and writing images, and a bunch of
1124 related classes, utilities, and applications. There is a particular emphasis
1125 on formats and functionality used in professional, large-scale animation and
1126 visual effects work for film.")
1127 (home-page "https://www.openimageio.org")
1128 (license license:bsd-3)))
1130 (define-public openscenegraph
1132 (name "openscenegraph")
1138 (url "https://github.com/openscenegraph/OpenSceneGraph")
1139 (commit (string-append "OpenSceneGraph-" version))))
1141 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1142 (file-name (git-file-name name version))))
1144 `((upstream-name . "OpenSceneGraph")))
1145 (build-system cmake-build-system)
1147 `(#:tests? #f ; no test target available
1148 ;; Without this flag, 'rd' will be added to the name of the
1149 ;; library binaries and break linking with other programs.
1150 #:build-type "Release"
1152 (list (string-append "-DCMAKE_INSTALL_RPATH="
1153 (assoc-ref %outputs "out") "/lib:"
1154 (assoc-ref %outputs "out") "/lib64"))))
1156 `(("pkg-config" ,pkg-config)
1159 `(("giflib" ,giflib)
1160 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1162 ("librsvg" ,librsvg)
1163 ("libxrandr" ,libxrandr)
1166 (synopsis "High-performance real-time graphics toolkit")
1168 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1169 used by application developers in fields such as visual simulation, games,
1170 virtual reality, scientific visualization and modeling.")
1171 (home-page "http://www.openscenegraph.org")
1172 ;; The 'LICENSE' file explains that the source is licensed under
1173 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1174 (license license:lgpl2.1)))
1176 ;; We need this for simgear
1177 (define-public openscenegraph-3.4
1178 (package (inherit openscenegraph)
1179 (name "openscenegraph")
1185 (url "https://github.com/openscenegraph/OpenSceneGraph")
1186 (commit (string-append "OpenSceneGraph-" version))))
1187 (file-name (git-file-name name version))
1190 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1192 (substitute-keyword-arguments (package-arguments openscenegraph)
1193 ((#:configure-flags flags)
1195 ;; The jpeg plugin requires conversion between integers and booleans
1196 "-DCMAKE_CXX_FLAGS=-fpermissive"
1199 `(("libjpeg" ,libjpeg-turbo)
1200 ,@(package-inputs openscenegraph)))))
1203 (define-public openmw-openscenegraph
1204 ;; OpenMW prefers its own fork of openscenegraph:
1205 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1206 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1209 (inherit openscenegraph)
1210 (version (git-version "3.6" "1" commit))
1215 (url "https://github.com/OpenMW/osg/")
1217 (file-name (git-file-name (package-name openscenegraph) version))
1220 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1222 (substitute-keyword-arguments (package-arguments openscenegraph)
1223 ((#:configure-flags flags)
1224 ;; As per the above wiki link, the following plugins are enough:
1226 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1227 "-DBUILD_OSG_PLUGIN_OSG=1"
1228 "-DBUILD_OSG_PLUGIN_DDS=1"
1229 "-DBUILD_OSG_PLUGIN_TGA=1"
1230 "-DBUILD_OSG_PLUGIN_BMP=1"
1231 "-DBUILD_OSG_PLUGIN_JPEG=1"
1232 "-DBUILD_OSG_PLUGIN_PNG=1"
1233 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1234 ;; The jpeg plugin requires conversion between integers and booleans
1235 "-DCMAKE_CXX_FLAGS=-fpermissive")
1238 (define-public povray
1245 (url "https://github.com/POV-Ray/povray")
1246 (commit (string-append "v" version))))
1247 (file-name (git-file-name name version))
1250 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1251 (modules '((guix build utils)))
1254 ;; Delete bundled libraries.
1255 (delete-file-recursively "libraries")
1257 (build-system gnu-build-system)
1259 `(("autoconf" ,autoconf)
1260 ("automake" ,automake)
1261 ("pkg-config" ,pkg-config)))
1264 ("libjpeg" ,libjpeg-turbo)
1266 ("libtiff" ,libtiff)
1267 ("openexr" ,openexr)
1272 (list "COMPILED_BY=Guix"
1273 (string-append "--with-boost-libdir="
1274 (assoc-ref %build-inputs "boost") "/lib")
1275 "--disable-optimiz-arch")
1277 (modify-phases %standard-phases
1278 (add-after 'unpack 'run-prebuild
1280 (setenv "HOME" (getcwd))
1281 (with-directory-excursion "unix"
1282 (substitute* "prebuild.sh"
1283 (("/bin/sh") (which "sh")))
1284 (invoke "sh" "prebuild.sh"))
1286 ;; The bootstrap script is run by the prebuild script in the
1287 ;; "run-prebuild" phase.
1288 (delete 'bootstrap))))
1289 (synopsis "Tool for creating three-dimensional graphics")
1291 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1292 for producing high-quality computer graphics. @code{POV-Ray} creates
1293 three-dimensional, photo-realistic images using a rendering technique called
1294 ray-tracing. It reads in a text file containing information describing the
1295 objects and lighting in a scene and generates an image of that scene from the
1296 view point of a camera also described in the text file. Ray-tracing is not a
1297 fast process by any means, but it produces very high quality images with
1298 realistic reflections, shading, perspective and other effects.")
1299 (home-page "http://www.povray.org/")
1300 (license license:agpl3+)))
1302 (define-public rapicorn
1308 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1309 "rapicorn-" version ".tar.xz"))
1312 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1313 (patches (search-patches "rapicorn-isnan.patch"))))
1314 (build-system gnu-build-system)
1317 (modify-phases %standard-phases
1318 (add-after 'unpack 'fix-tests
1320 ;; Our grep does not support perl regular expressions.
1321 (substitute* "taptool.sh"
1322 (("grep -P") "grep -E"))
1323 ;; Disable path tests because we cannot access /bin or /sbin.
1324 (substitute* "rcore/tests/multitest.cc"
1325 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1327 (add-before 'check 'pre-check
1329 ;; The test suite requires a running X server (with DISPLAY
1330 ;; number 99 or higher).
1331 (system "Xvfb :99 &")
1332 (setenv "DISPLAY" ":99")
1334 (add-after 'unpack 'replace-fhs-paths
1336 (substitute* (cons "Makefile.decl"
1337 (find-files "." "^Makefile\\.in$"))
1338 (("/bin/ls") (which "ls"))
1339 (("/usr/bin/env") (which "env")))
1341 ;; These libraries are listed in the "Required" section of the pkg-config
1344 `(("librsvg" ,librsvg)
1347 ("libxml2" ,libxml2)
1348 ("python2-enum34" ,python2-enum34)))
1350 `(("gdk-pixbuf" ,gdk-pixbuf)
1351 ("libpng" ,libpng-1.2)
1352 ("readline" ,readline)
1353 ("libcroco" ,libcroco)
1354 ("python" ,python-2)
1355 ("cython" ,python2-cython)))
1357 `(("pandoc" ,pandoc)
1360 ("doxygen" ,doxygen)
1361 ("graphviz" ,graphviz)
1362 ("intltool" ,intltool)
1363 ("pkg-config" ,pkg-config)
1364 ("xvfb" ,xorg-server-for-tests)))
1365 (home-page "https://rapicorn.testbit.org/")
1366 (synopsis "Toolkit for rapid development of user interfaces")
1368 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1369 and Python. The user interface is designed in a declarative markup language
1370 and is connected to the programming logic using data bindings and commands.")
1371 (license license:mpl2.0)))
1379 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1383 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1384 (build-system cmake-build-system)
1385 (arguments '(#:tests? #f)) ;no 'test' target
1387 ;; Headers include OpenEXR and IlmBase headers.
1388 (propagated-inputs `(("openexr" ,openexr)))
1390 (home-page "http://ampasctl.sourceforge.net")
1391 (synopsis "Color Transformation Language")
1393 "The Color Transformation Language, or CTL, is a small programming
1394 language that was designed to serve as a building block for digital color
1395 management systems. CTL allows users to describe color transforms in a
1396 concise and unambiguous way by expressing them as programs. In order to apply
1397 a given transform to an image, the color management system instructs a CTL
1398 interpreter to load and run the CTL program that describes the transform. The
1399 original and the transformed image constitute the CTL program's input and
1402 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1403 ;; and headers use different wording.
1404 (license (license:non-copyleft "file://LICENSE"))))
1406 (define-public brdf-explorer
1407 ;; There are no release tarballs, and not even tags in the repo,
1408 ;; so use the latest revision.
1409 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1412 (name "brdf-explorer")
1413 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1417 (url "https://github.com/wdas/brdf")
1421 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1422 (file-name (string-append name "-" version "-checkout"))))
1423 (build-system gnu-build-system)
1425 `(#:phases (modify-phases %standard-phases
1427 (lambda* (#:key outputs #:allow-other-keys)
1428 (let ((out (assoc-ref outputs "out")))
1430 (string-append "prefix=" out)))))
1431 (add-after 'install 'wrap-program
1432 (lambda* (#:key outputs #:allow-other-keys)
1433 (let* ((out (assoc-ref outputs "out"))
1434 (bin (string-append out "/bin"))
1435 (data (string-append
1436 out "/share/brdf")))
1437 (with-directory-excursion bin
1438 (rename-file "brdf" ".brdf-real")
1439 (call-with-output-file "brdf"
1441 (format port "#!/bin/sh
1442 # Run the thing from its home, otherwise it just bails out.
1444 exec -a \"$0\" ~a/.brdf-real~%"
1446 (chmod "brdf" #o555)))
1449 `(("qttools" ,qttools))) ;for 'qmake'
1451 `(("qtbase" ,qtbase)
1454 ("freeglut" ,freeglut)
1456 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1458 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1460 "BRDF Explorer is an application that allows the development and analysis
1461 of bidirectional reflectance distribution functions (BRDFs). It can load and
1462 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1463 language), measured material data from the MERL database, and anisotropic
1464 measured material data from MIT CSAIL. Graphs and visualizations update in
1465 real time as parameters are changed, making it a useful tool for evaluating
1466 and understanding different BRDFs (and other component functions).")
1467 (license license:ms-pl))))
1475 (uri (list (string-append
1476 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1479 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1482 ;; Site was discontinued.
1483 (string-append "http://www.antigrain.com/agg-"
1484 version ".tar.gz")))
1486 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1487 (patches (search-patches "agg-am_c_prototype.patch"))))
1488 (build-system gnu-build-system)
1491 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1493 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1495 "--disable-examples")
1497 (modify-phases %standard-phases
1500 ;; let's call configure from configure phase and not now
1501 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1502 (invoke "sh" "autogen.sh"))))))
1504 `(("pkg-config" ,pkg-config)
1505 ("libtool" ,libtool)
1506 ("autoconf" ,autoconf)
1507 ("automake" ,automake)))
1509 `(("libx11" ,libx11)
1510 ("freetype" ,freetype)
1513 ;; Antigrain.com was discontinued.
1514 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1515 (synopsis "High-quality 2D graphics rendering engine for C++")
1517 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1518 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1519 rendering SVG graphics.")
1520 (license license:gpl2+)))
1522 (define-public python-pastel
1524 (name "python-pastel")
1529 (uri (pypi-uri "pastel" version))
1532 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1533 (build-system python-build-system)
1535 `(#:phases (modify-phases %standard-phases
1537 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1539 `(("python-pytest" ,python-pytest)))
1540 (home-page "https://github.com/sdispater/pastel")
1541 (synopsis "Library to colorize strings in your terminal")
1542 (description "Pastel is a simple library to help you colorize strings in
1544 (license license:expat)))
1546 (define-public python2-pastel
1547 (package-with-python2 python-pastel))
1549 (define-public fgallery
1557 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1558 "fgallery-" version ".zip"))
1561 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1562 (build-system gnu-build-system)
1564 `(#:tests? #f ; no tests
1566 (modify-phases %standard-phases
1570 (lambda* (#:key inputs outputs #:allow-other-keys)
1571 (let* ((out (assoc-ref outputs "out"))
1572 (bin (string-append out "/bin/"))
1573 (share (string-append out "/share/fgallery"))
1574 (man (string-append out "/share/man/man1"))
1575 (perl5lib (getenv "PERL5LIB"))
1576 (script (string-append share "/fgallery")))
1577 (define (bin-directory input-name)
1578 (string-append (assoc-ref inputs input-name) "/bin"))
1581 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1584 (copy-recursively "." share)
1586 ;; fgallery copies files from store when it is run. The
1587 ;; read-only permissions from the store directories will cause
1588 ;; fgallery to fail. Do not preserve file attributes when
1589 ;; copying files to prevent it.
1592 "'cp', '--no-preserve=all'"))
1595 (symlink script (string-append out "/bin/fgallery"))
1597 (wrap-program script
1599 ,(map bin-directory '("imagemagick"
1607 `("PERL5LIB" ":" prefix (,perl5lib)))
1610 `(("unzip" ,unzip)))
1611 ;; TODO: Add missing optional dependency: facedetect.
1613 `(("imagemagick" ,imagemagick)
1616 ("libjpeg" ,libjpeg-turbo)
1619 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1620 ("perl-image-exiftool" ,perl-image-exiftool)
1621 ("jpegoptim" ,jpegoptim)
1622 ("pngcrush" ,pngcrush)
1624 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1625 (synopsis "Static photo gallery generator")
1627 "FGallery is a static, JavaScript photo gallery generator with minimalist
1628 look. The result can be uploaded on any web server without additional
1630 (license license:gpl2+)))
1632 (define-public opensubdiv
1639 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1640 (commit (string-append "v" (string-join (string-split version #\.)
1642 (file-name (git-file-name name version))
1645 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1646 (build-system cmake-build-system)
1648 `(#:phases (modify-phases %standard-phases
1649 (add-before 'configure 'set-glew-location
1650 (lambda* (#:key inputs #:allow-other-keys)
1651 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1653 (add-before 'check 'start-xorg-server
1654 (lambda* (#:key inputs #:allow-other-keys)
1655 ;; The test suite requires a running X server.
1656 (system (string-append (assoc-ref inputs "xorg-server")
1658 (setenv "DISPLAY" ":1")
1661 `(("xorg-server" ,xorg-server-for-tests)))
1664 ("libxrandr" ,libxrandr)
1665 ("libxcursor" ,libxcursor)
1666 ("libxinerama" ,libxinerama)
1670 (home-page "https://graphics.pixar.com/opensubdiv/")
1671 (synopsis "High performance subdivision surface evaluation")
1672 (description "OpenSubdiv is a set of libraries that implement high
1673 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1674 and GPU architectures.")
1675 (license license:asl2.0)))
1677 (define-public opencsg
1678 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1686 (url "https://github.com/floriankirsch/OpenCSG")
1687 (commit (string-append "opencsg-"
1688 (string-map dot-to-dash version)
1690 (file-name (git-file-name name version))
1693 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1694 (build-system gnu-build-system)
1697 (modify-phases %standard-phases
1699 (lambda* (#:key outputs #:allow-other-keys)
1700 (substitute* "src/Makefile"
1701 (("/usr/local") (assoc-ref outputs "out")))
1703 (add-before 'build 'skip-example
1704 (lambda _ (chdir "src") #t)))))
1707 ("freeglut" ,freeglut)))
1708 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1710 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1711 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1712 For example, two shapes can be combined by uniting them, by intersecting them,
1713 or by subtracting one shape from the other.")
1714 (home-page "http://www.opencsg.org/")
1715 (license license:gpl2))))
1717 (define-public coin3D
1718 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1719 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1721 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1725 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1730 (url "https://bitbucket.org/Coin3D/coin")
1731 (changeset changeset)))
1732 (file-name (git-file-name name version))
1734 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1735 (modules '((guix build utils)))
1738 (for-each delete-file
1740 "cfg/wrapmsvc.exe"))
1742 (build-system cmake-build-system)
1744 `(("doxygen" ,doxygen)
1745 ("graphviz" ,graphviz)))
1748 ("freeglut" ,freeglut)
1753 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1754 (string-append "-DBOOST_ROOT="
1755 (assoc-ref %build-inputs "boost")))))
1756 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1758 "High-level 3D visualization library with Open Inventor 2.1 API")
1760 "Coin is a 3D graphics library with an Application Programming Interface
1761 based on the Open Inventor 2.1 API. For those who are not familiar with
1762 Open Inventor, it is a scene-graph based retain-mode rendering and model
1763 interaction library, written in C++, which has become the de facto
1764 standard graphics library for 3D visualization and visual simulation
1765 software in the scientific and engineering community.")
1766 (license license:bsd-3))))
1768 (define-public coin3D-4
1776 (url "https://github.com/coin3d/coin")
1777 (commit (string-append "Coin-" version))
1779 (file-name (git-file-name name version))
1781 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1782 (modules '((guix build utils)))
1786 (for-each delete-file
1788 "cfg/wrapmsvc.exe"))
1789 ;; Delete references to packaging tool cpack. Otherwise the build
1790 ;; fails with "add_subdirectory given source "cpack.d" which is not
1791 ;; an existing directory."
1792 (substitute* "CMakeLists.txt"
1793 ((".*cpack.d.*") ""))
1795 (build-system cmake-build-system)
1797 `(("doxygen" ,doxygen)
1798 ("graphviz" ,graphviz)))
1801 ("freeglut" ,freeglut)
1806 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1807 (string-append "-DBOOST_ROOT="
1808 (assoc-ref %build-inputs "boost")))))
1809 (home-page "https://github.com/coin3d/coin")
1811 "High-level 3D visualization library with Open Inventor 2.1 API")
1813 "Coin is a 3D graphics library with an Application Programming Interface
1814 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1815 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1816 library, written in C++, which has become the de facto standard graphics
1817 library for 3D visualization and visual simulation software in the scientific
1818 and engineering community.")
1819 (license license:bsd-3)))
1821 (define-public superfamiconv
1823 (name "superfamiconv")
1829 (url "https://github.com/Optiroc/SuperFamiconv")
1830 (commit (string-append "v" version))))
1831 (file-name (git-file-name name version))
1834 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1835 (build-system gnu-build-system)
1837 `(#:tests? #f ; no tests
1839 (modify-phases %standard-phases
1842 (lambda* (#:key outputs #:allow-other-keys)
1843 (let* ((outdir (assoc-ref outputs "out"))
1844 (bindir (string-append outdir "/bin")))
1845 (install-file "bin/superfamiconv" bindir)
1847 (home-page "https://github.com/Optiroc/SuperFamiconv")
1848 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1849 and PC Engine formats")
1850 (description "SuperFamiconv is a converter for tiled graphics, supporting
1851 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1852 Automated palette selection is supported.")
1853 (license license:expat)))
1855 (define-public drawpile
1856 ;; This commit fix building with libmicrohttpd>=0.71.
1857 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1861 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1865 (url "https://github.com/drawpile/Drawpile")
1867 (file-name (git-file-name name version))
1870 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1871 (build-system qt-build-system)
1874 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1876 `(("extra-cmake-modules" ,extra-cmake-modules)
1877 ("pkg-config" ,pkg-config)))
1879 `(("giflib" ,giflib)
1880 ("karchive" ,karchive)
1882 ("libmicrohttpd" ,libmicrohttpd)
1883 ("libsodium" ,libsodium)
1886 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1888 ("qtkeychain" ,qtkeychain)
1889 ("qtmultimedia" ,qtmultimedia)
1891 ("qtx11extras" ,qtx11extras)))
1892 (home-page "https://drawpile.net")
1893 (synopsis "Collaborative drawing program")
1894 (description "Drawpile is a drawing program that allows share the canvas
1895 with other users in real time.
1897 Some feature highlights:
1899 @item Shared canvas using the built-in server or a dedicated server
1900 @item Record, play back and export drawing sessions
1901 @item Simple animation support
1902 @item Layers and blending modes
1904 @item Supports pressure sensitive Wacom tablets
1906 @item Supports OpenRaster file format
1907 @item Encrypted connections using SSL
1908 @item Automatic port forwarding with UPnP
1910 (license license:gpl3+))))