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>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages graphics)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages algebra)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages cdrom)
52 #:use-module (gnu packages check)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages datastructures)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages fonts)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gnome)
66 #:use-module (gnu packages gnunet)
67 #:use-module (gnu packages graphviz)
68 #:use-module (gnu packages gstreamer)
69 #:use-module (gnu packages gtk)
70 #:use-module (gnu packages haskell-xyz)
71 #:use-module (gnu packages image)
72 #:use-module (gnu packages image-processing)
73 #:use-module (gnu packages imagemagick)
74 #:use-module (gnu packages jemalloc)
75 #:use-module (gnu packages kde-frameworks)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages lua)
78 #:use-module (gnu packages maths)
79 #:use-module (gnu packages mp3)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages pdf)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages photo)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages plotutils)
86 #:use-module (gnu packages pth)
87 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-xyz)
90 #:use-module (gnu packages qt)
91 #:use-module (gnu packages readline)
92 #:use-module (gnu packages sdl)
93 #:use-module (gnu packages stb)
94 #:use-module (gnu packages swig)
95 #:use-module (gnu packages tbb)
96 #:use-module (gnu packages upnp)
97 #:use-module (gnu packages video)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xorg)
101 #:use-module (gnu packages xdisorg)
102 #:use-module (guix build-system copy)
103 #:use-module (guix build-system cmake)
104 #:use-module (guix build-system gnu)
105 #:use-module (guix build-system meson)
106 #:use-module (guix build-system python)
107 #:use-module (guix build-system qt)
108 #:use-module (guix download)
109 #:use-module (guix git-download)
110 #:use-module (guix hg-download)
111 #:use-module ((guix licenses) #:prefix license:)
112 #:use-module (guix packages)
113 #:use-module (guix utils))
115 (define-public eglexternalplatform
117 (name "eglexternalplatform")
124 (url "https://github.com/NVIDIA/eglexternalplatform")
127 (git-file-name name version))
129 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
130 (build-system copy-build-system)
133 (modify-phases %standard-phases
134 (add-after 'unpack 'patch-pkgconfig
135 (lambda* (#:key outputs #:allow-other-keys)
136 (substitute* "eglexternalplatform.pc"
138 (assoc-ref outputs "out")))
140 (add-after 'install 'revise
141 (lambda* (#:key outputs #:allow-other-keys)
142 (let* ((out (assoc-ref outputs "out")))
143 (mkdir-p (string-append out "/include/EGL"))
145 (string-append out "/interface")
146 (string-append out "/include/EGL"))
147 (mkdir-p (string-append out "/share/pkgconfig"))
149 (string-append out "/eglexternalplatform.pc")
150 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
151 (for-each delete-file-recursively
153 (string-append out "/samples")
154 (string-append out "/COPYING")
155 (string-append out "/README.md"))))
157 (synopsis "EGL External Platform interface")
158 (description "EGLExternalPlatform is an specification of the EGL External
159 Platform interface for writing EGL platforms and their interactions with modern
160 window systems on top of existing low-level EGL platform implementations. This
161 keeps window system implementation specifics out of EGL drivers by using
162 application-facing EGL functions.")
163 (home-page "https://github.com/NVIDIA/eglexternalplatform")
164 (license license:expat)))
166 (define-public egl-wayland
175 (url "https://github.com/NVIDIA/egl-wayland")
178 (git-file-name name version))
180 (base32 "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk"))))
181 (build-system meson-build-system)
183 `(("pkg-config" ,pkg-config)))
186 ("wayland" ,wayland)))
188 `(("eglexternalplatform" ,eglexternalplatform)))
189 (synopsis "EGLStream-based Wayland external platform")
190 (description "EGL-Wayland is an implementation of a EGL External Platform
191 library to add client-side Wayland support to EGL on top of EGLDevice and
192 EGLStream families of extensions.")
193 (home-page "https://github.com/NVIDIA/egl-wayland")
194 (license license:expat)))
205 (url "https://github.com/hodefoting/mmm")
208 (git-file-name name version))
210 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
211 (build-system meson-build-system)
214 ("pkg-config" ,pkg-config)))
219 (synopsis "Memory Mapped Machine")
220 (description "MMM is a shared memory protocol for virtualising access to
221 framebuffer graphics, audio output and input event.")
222 (home-page "https://github.com/hodefoting/mrg")
223 (license license:isc)))
225 (define-public directfb
234 (url "https://github.com/deniskropp/DirectFB")
235 (commit "DIRECTFB_1_7_7")))
236 (file-name (git-file-name name version))
238 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
239 (build-system gnu-build-system)
242 (modify-phases %standard-phases
243 (add-after 'unpack 'disable-configure-during-bootstrap
245 (substitute* "autogen.sh"
246 (("^.*\\$srcdir/configure.*") ""))
249 `(("autoconf" ,autoconf)
250 ("automake" ,automake)
253 ("pkg-config" ,pkg-config)))
257 ("freetype" ,freetype)
259 ("gstreamer" ,gstreamer)
262 ("jpeg" ,libjpeg-turbo)
265 ("libtimidity" ,libtimidity)
266 ("linux-headers" ,linux-libre-headers)
278 ("vorbisfile" ,libvorbis)
282 ("xcomposite" ,libxcomposite)
284 ("xproto" ,xorgproto)
288 (synopsis "DFB Graphics Library")
289 (description "DirectFB is a graphics library which was designed with embedded
290 systems in mind. It offers maximum hardware accelerated performance at a
291 minimum of resource usage and overhead.")
292 (home-page "https://github.com/deniskropp/DirectFB")
293 (license license:lgpl2.1+)))
304 (url "https://github.com/deniskropp/flux")
306 (file-name (git-file-name name version))
308 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
309 (build-system gnu-build-system)
311 `(("autoconf" ,autoconf)
312 ("automake" ,automake)
314 ("pkg-config" ,pkg-config)))
315 (synopsis "Interface description language")
316 (description "Flux is an interface description language used by DirectFB.
317 Fluxcomp compiles .flux files to .cpp or .c files.")
318 (home-page "http://www.directfb.org/")
319 (license license:lgpl2.1+))) ; Same as DirectFB
329 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
331 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
332 (build-system gnu-build-system)
335 (modify-phases %standard-phases
336 (add-after 'unpack 'patch
338 (substitute* "configure"
339 (("-I/usr/include/freetype2")
342 (assoc-ref %build-inputs "freetype")
343 "/include/freetype2"))))
346 `(("doxygen" ,doxygen)))
349 ("freetype" ,freetype)
352 ("jpeg" ,libjpeg-turbo)
356 ("xcursor" ,libxcursor)
358 ("xfixes" ,libxfixes)
361 ("xrandr" ,libxrandr)
362 ("xrender" ,libxrender)
363 ("xshm" ,libxshmfence)
365 (synopsis "Widget Toolkit for building GUI")
366 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
367 Graphical User Interfaces easily and effectively. It offers a wide, and
368 growing, collection of Controls, and provides state of the art facilities such
369 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
370 manipulation. FOX also implements icons, images, and user-convenience features
371 such as status line help, and tooltips. Tooltips may even be used for 3D
373 (home-page "http://www.fox-toolkit.org")
374 (license license:lgpl2.1+)))
376 (define-public autotrace
377 (let ((commit "travis-20190624.59")
378 (version-base "0.40.0"))
381 (version (string-append version-base "-"
382 (if (string-prefix? "travis-" commit)
383 (string-drop commit 7)
388 (url "https://github.com/autotrace/autotrace")
390 (file-name (git-file-name name version))
393 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
394 (build-system gnu-build-system)
396 `(#:phases (modify-phases %standard-phases
397 ;; See: https://github.com/autotrace/autotrace/issues/27.
398 (add-after 'unpack 'include-spline.h-header
400 (substitute* "Makefile.am"
401 ((".*src/types.h.*" all)
402 (string-append all "\t\tsrc/spline.h \\\n")))
404 ;; See: https://github.com/autotrace/autotrace/issues/26.
407 (invoke "sh" "tests/runtests.sh"))))))
410 ("pkg-config" ,pkg-config)
411 ("autoconf" ,autoconf)
412 ("automake" ,automake)
413 ("intltool" ,intltool)
415 ("gettext" ,gettext-minimal)))
418 ("libjpeg" ,libjpeg-turbo)
420 ("imagemagick" ,imagemagick)
421 ("pstoedit" ,pstoedit)))
422 (home-page "https://github.com/autotrace/autotrace")
423 (synopsis "Bitmap to vector graphics converter")
424 (description "AutoTrace is a utility for converting bitmap into vector
425 graphics. It can trace outlines and midlines, effect color reduction or
426 despeckling and has support for many input and output formats. It can be used
427 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
428 (license (list license:gpl2+ ;for the utility itself
429 license:lgpl2.1+))))) ;for use as a library
431 (define-public embree
438 (url "https://github.com/embree/embree")
439 (commit (string-append "v" version))))
440 (file-name (git-file-name name version))
443 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
444 (build-system cmake-build-system)
446 `(#:tests? #f ; no tests (apparently)
449 "-DEMBREE_ISPC_SUPPORT=OFF")))
453 (home-page "https://www.embree.org/")
454 (synopsis "High performance ray tracing kernels")
456 "Embree is a collection of high-performance ray tracing kernels.
457 Embree is meant to increase performance of photo-realistic rendering
459 (license license:asl2.0)))
461 (define-public blender
467 (uri (string-append "https://download.blender.org/source/"
468 "blender-" version ".tar.xz"))
471 "106w9vi6z0gi2nbr73g8pm40w3wn7dkjcibzvvzbc786yrnzvkhb"))))
472 (build-system cmake-build-system)
474 (let ((python-version (version-major+minor (package-version python))))
475 `(;; Test files are very large and not included in the release tarball.
478 (list "-DWITH_CODEC_FFMPEG=ON"
479 "-DWITH_CODEC_SNDFILE=ON"
481 "-DWITH_DOC_MANPAGE=ON"
483 "-DWITH_IMAGE_OPENJPEG=ON"
484 "-DWITH_INPUT_NDOF=ON"
485 "-DWITH_INSTALL_PORTABLE=OFF"
487 "-DWITH_MOD_OCEANSIM=ON"
488 "-DWITH_OPENSUBDIV=ON"
489 "-DWITH_PYTHON_INSTALL=OFF"
490 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
491 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
493 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
494 "/include/python" ,python-version)
495 (string-append "-DPYTHON_VERSION=" ,python-version)
496 (string-append "-DPYTHON_NUMPY_PATH="
497 (assoc-ref %build-inputs "python-numpy")
498 "/lib/python" ,python-version "/site-packages/"))
500 (modify-phases %standard-phases
501 ;; XXX This file doesn't exist in the Git sources but will probably
502 ;; exist in the eventual 2.80 source tarball.
503 (add-after 'unpack 'fix-broken-import
505 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
506 (("import encode_bin") "from . import encode_bin"))
508 (add-after 'set-paths 'add-ilmbase-include-path
509 (lambda* (#:key inputs #:allow-other-keys)
510 ;; OpenEXR propagates ilmbase, but its include files do not appear
511 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
512 ;; the CPATH to satisfy the dependency on "half.h".
514 (string-append (assoc-ref inputs "ilmbase")
516 ":" (or (getenv "CPATH") "")))
520 ("jemalloc" ,jemalloc)
523 ("libxrender" ,libxrender)
524 ("opencolorio" ,opencolorio)
525 ("openimageio" ,openimageio)
527 ("opensubdiv" ,opensubdiv)
529 ("openjpeg" ,openjpeg)
530 ("libjpeg" ,libjpeg-turbo)
536 ("libsndfile" ,libsndfile)
537 ("freetype" ,freetype)
541 ("python-numpy" ,python-numpy)
544 (home-page "https://blender.org/")
545 (synopsis "3D graphics creation suite")
547 "Blender is a 3D graphics creation suite. It supports the entirety of
548 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
549 compositing and motion tracking, even video editing and game creation. The
550 application can be customized via its API for Python scripting.")
551 (license license:gpl2+)))
553 (define-public blender-2.79
559 (uri (string-append "https://download.blender.org/source/"
560 "blender-" version ".tar.gz"))
563 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
564 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
565 "blender-2.79-oiio2.patch"
566 ;; The following patches may be
567 ;; needed when the default GCC is
569 ;; "blender-2.79-gcc8.patch"
570 ;; "blender-2.79-gcc9.patch"
571 "blender-2.79-python-3.7-fix.patch"
572 "blender-2.79-python-3.8-fix.patch"))))
573 (build-system cmake-build-system)
575 (let ((python-version (version-major+minor (package-version python))))
576 `(;; Test files are very large and not included in the release tarball.
579 (list "-DWITH_CODEC_FFMPEG=ON"
580 "-DWITH_CODEC_SNDFILE=ON"
582 "-DWITH_DOC_MANPAGE=ON"
584 "-DWITH_GAMEENGINE=ON"
585 "-DWITH_IMAGE_OPENJPEG=ON"
586 "-DWITH_INPUT_NDOF=ON"
587 "-DWITH_INSTALL_PORTABLE=OFF"
589 "-DWITH_MOD_OCEANSIM=ON"
591 "-DWITH_PYTHON_INSTALL=OFF"
592 "-DWITH_PYTHON_INSTALL=OFF"
593 "-DWITH_SYSTEM_OPENJPEG=ON"
594 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
595 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
597 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
598 "/include/python" ,python-version)
599 (string-append "-DPYTHON_VERSION=" ,python-version))
601 (modify-phases %standard-phases
602 (add-after 'unpack 'fix-broken-import
604 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
605 (("import encode_bin") "from . import encode_bin"))
607 (add-after 'set-paths 'add-ilmbase-include-path
608 (lambda* (#:key inputs #:allow-other-keys)
609 ;; OpenEXR propagates ilmbase, but its include files do not appear
610 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
611 ;; the CPATH to satisfy the dependency on "half.h".
613 (string-append (assoc-ref inputs "ilmbase")
615 ":" (or (getenv "CPATH") "")))
619 ("jemalloc" ,jemalloc)
621 ("openimageio" ,openimageio)
624 ("openjpeg" ,openjpeg)
625 ("libjpeg" ,libjpeg-turbo)
631 ("libsndfile" ,libsndfile)
632 ("freetype" ,freetype)
637 (home-page "https://blender.org/")
638 (synopsis "3D graphics creation suite")
640 "Blender is a 3D graphics creation suite. It supports the entirety of
641 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
642 compositing and motion tracking, even video editing and game creation. The
643 application can be customized via its API for Python scripting.
645 NOTE: This older version of Blender is the last release that does not require
646 OpenGL 3. It is retained for use with older computers.")
647 (license license:gpl2+)))
656 (url "https://github.com/guillaumechereau/goxel")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
661 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
662 (build-system gnu-build-system)
665 #:phases (modify-phases %standard-phases (delete 'configure))
666 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
669 `(("pkg-config" ,pkg-config)))
674 (home-page "https://goxel.xyz/")
675 (synopsis "Voxel editor")
677 "Goxel is a voxel editor that features unlimited scene size, unlimited
678 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
679 and export to various formats including the format used by Magicavoxel.")
680 (license license:gpl3+)))
682 (define-public assimp
689 (url "https://github.com/assimp/assimp")
690 (commit (string-append "v" version))))
691 (file-name (git-file-name name version))
694 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
695 (build-system cmake-build-system)
698 (home-page "http://www.assimp.org/")
699 (synopsis "Asset import library")
701 "The Open Asset Import Library loads more than 40 3D file formats into
702 one unified data structure. Additionally, assimp features various mesh post
703 processing tools: normals and tangent space generation, triangulation, vertex
704 cache locality optimization, removal of degenerate primitives and duplicate
705 vertices, sorting by primitive type, merging of redundant materials and many
707 (license license:bsd-3)))
716 "https://github.com/CGAL/cgal/releases/download/releases/"
717 "CGAL-" version "/CGAL-" version ".tar.xz"))
720 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
721 (build-system cmake-build-system)
723 '(#:tests? #f)) ; no test target
728 (home-page "https://www.cgal.org/")
729 (synopsis "Computational geometry algorithms library")
731 "CGAL provides easy access to efficient and reliable geometric algorithms
732 in the form of a C++ library. CGAL is used in various areas needing geometric
733 computation, such as: computer graphics, scientific visualization, computer
734 aided design and modeling, geographic information systems, molecular biology,
735 medical imaging, robotics and motion planning, mesh generation, numerical
736 methods, etc. It provides data structures and algorithms such as
737 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
740 ;; The 'LICENSE' file explains that a subset is available under more
741 ;; permissive licenses.
742 (license license:gpl3+)))
744 (define-public ilmbase
751 (url "https://github.com/openexr/openexr")
752 (commit (string-append "v" version))))
753 (file-name (git-file-name "ilmbase" version))
756 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
757 (patches (search-patches "ilmbase-fix-tests.patch"))))
758 (build-system cmake-build-system)
760 `(#:phases (modify-phases %standard-phases
761 (add-after 'unpack 'change-directory
765 (home-page "https://www.openexr.com/")
766 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
768 "IlmBase provides several utility libraries for C++. Half is a class
769 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
770 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
771 quaternions and other useful 2D and 3D math functions. Iex is an
772 exception-handling library.")
773 (license license:bsd-3)))
775 (define-public lib2geom
776 ;; Use the latest master commit, as the 1.0 release suffer build problems.
778 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
781 (version (git-version "1.0" revision commit))
785 (url "https://gitlab.com/inkscape/lib2geom.git")
787 (file-name (git-file-name name version))
790 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
792 ;; Patch submitted to upstream (see:
793 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
794 (search-patches "lib2geom-fix-tests.patch"))
795 (modules '((guix build utils)))
798 ;; Fix py2geom module initialization (see:
799 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
800 (substitute* "src/py2geom/__init__.py"
801 (("_py2geom") "py2geom._py2geom"))
803 (build-system cmake-build-system)
805 `(#:imported-modules ((guix build python-build-system)
806 ,@%cmake-build-system-modules)
807 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
808 "-D2GEOM_BOOST_PYTHON=ON"
809 ;; Compiling the Cython bindings fail (see:
810 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
811 "-D2GEOM_CYTHON_BINDINGS=OFF")
813 (modify-phases %standard-phases
814 (add-after 'unpack 'patch-python-lib-install-path
815 (lambda* (#:key inputs outputs #:allow-other-keys)
816 (let* ((python-version (@ (guix build python-build-system)
818 (python-maj-min-version (python-version
819 (assoc-ref inputs "python")))
820 (site-package (string-append
821 (assoc-ref outputs "out")
822 "/lib/python" python-maj-min-version
824 (substitute* '("src/cython/CMakeLists.txt"
825 "src/py2geom/CMakeLists.txt")
826 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
827 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
829 (native-inputs `(("python" ,python-wrapper)
830 ("googletest" ,googletest)
831 ("pkg-config" ,pkg-config)))
832 (inputs `(("cairo" ,cairo)
833 ("pycairo" ,python-pycairo)
834 ("double-conversion" ,double-conversion)
838 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
839 (home-page "https://gitlab.com/inkscape/lib2geom/")
840 (synopsis "C++ 2D graphics library")
841 (description "2geom is a C++ library of mathematics for paths, curves,
842 and other geometric calculations. Designed for vector graphics, it tackles
843 Bézier curves, conic sections, paths, intersections, transformations, and
845 ;; Because the library is linked with the GNU Scientific Library
846 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
847 ;; https://gitlab.com/inkscape/inkscape/issues/784).
848 (license license:gpl3+))))
850 (define-public pstoedit
856 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
857 version "/pstoedit-" version ".tar.gz"))
860 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
861 (build-system gnu-build-system)
863 `(("pkg-config" ,pkg-config)))
865 `(("ghostscript" ,ghostscript)
866 ("imagemagick" ,imagemagick)
867 ("libplot" ,plotutils)
868 ("libjpeg" ,libjpeg-turbo)
869 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
870 (home-page "http://www.pstoedit.net/")
871 (synopsis "Converter for PostScript and PDF graphics")
872 (description "The @code{pstoedit} utility allows translating graphics
873 in the PostScript or PDF (Portable Document Format) formats to various
874 other vector formats such as:
879 @item Flattened PostScript
880 @item DXF, a CAD (Computed-Aided Design) exchange format
881 @item PIC (for troff/groff)
882 @item MetaPost (for usage with TeX/LaTeX)
883 @item LaTeX2e picture
884 @item GNU Metafile (for use with plotutils/libplot)
885 @item Any format supported by ImageMagick
887 (license license:gpl2+)))
889 (define-public dear-imgui
897 (url "https://github.com/ocornut/imgui")
898 (commit (string-append "v" version))))
899 (file-name (git-file-name name version))
901 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
902 (build-system gnu-build-system)
905 (list (string-append "CC=" ,(cc-for-target))
906 (string-append "PREFIX=" (assoc-ref %outputs "out"))
907 (string-append "VERSION=" ,version))
908 #:tests? #f ; no test suite
910 (modify-phases %standard-phases
911 (add-after 'unpack 'unpack-debian-files
912 (lambda* (#:key inputs #:allow-other-keys)
913 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
914 (apply invoke "patch" "-Np1" "-i"
915 (find-files "debian/patches" "\\.patch$"))
916 (substitute* "Makefile"
917 (("<stb/") "<") ; Guix doesn't use this subdirectory
918 ;; Don't build or install the static library.
919 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
920 (substitute* (list "imgui.pc.in"
922 ;; Don't link against a non-existent library.
925 (delete 'configure) ; no configure script
927 ;; The default ‘install’ target installs the static library. Don't.
928 (lambda* (#:key make-flags #:allow-other-keys)
929 (apply invoke "make" "install-shared" "install-header"
933 ;; Upstream doesn't provide a build system. Use Debian's.
936 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
937 version "+ds-1.debian.tar.xz"))
939 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
940 ("pkg-config" ,pkg-config)))
942 `(("freetype" ,freetype)
943 ("stb-rect-pack" ,stb-rect-pack)
944 ("stb-truetype" ,stb-truetype)))
945 (home-page "https://github.com/ocornut/imgui")
946 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
948 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
949 It creates optimized vertex buffers that you can render anytime in your
950 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
951 self-contained, without external dependencies.
953 Dear ImGui is aimed at content creation, visualization, and debugging tools as
954 opposed to average end-user interfaces. Hence it favors simplicity and
955 productivity but lacks certain features often found in higher-level libraries.
956 It is particularly suited to integration in game engine tooling, real-time 3D
957 applications, full-screen applications, and embedded platforms without standard
958 operating system features.")
959 (license license:expat))) ; some examples/ use the zlib licence
969 (url "https://github.com/OGRECave/ogre")
970 (commit (string-append "v" version))))
971 (file-name (git-file-name name version))
973 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
974 (build-system cmake-build-system)
977 (modify-phases %standard-phases
978 (add-before 'configure 'unpack-dear-imgui
979 (lambda* (#:key inputs #:allow-other-keys)
980 (copy-recursively (assoc-ref inputs "dear-imgui-source")
981 "../dear-imgui-source")
983 (add-before 'configure 'pre-configure
984 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
985 ;; a consequence, we cannot suggest ours in configure flags. Fix
987 (lambda* (#:key inputs outputs #:allow-other-keys)
988 (substitute* "CMakeLists.txt"
989 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
992 (let* ((out (assoc-ref %outputs "out"))
994 (string-join (list (string-append out "/lib")
995 (string-append out "/lib/OGRE"))
997 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
998 "-DIMGUI_DIR=../dear-imgui-source"
999 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1000 "-DOGRE_BUILD_TESTS=TRUE"
1001 "-DOGRE_INSTALL_DOCS=TRUE"
1002 "-DOGRE_INSTALL_SAMPLES=TRUE"
1003 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1006 ("dear-imgui-source" ,(package-source dear-imgui))
1007 ("doxygen" ,doxygen)
1008 ("googletest" ,googletest-1.8)
1009 ("pkg-config" ,pkg-config)))
1011 `(("font-dejavu" ,font-dejavu)
1012 ("freeimage" ,freeimage)
1013 ("freetype" ,freetype)
1016 ("libxrandr" ,libxrandr)
1017 ("pugixml" ,pugixml)
1019 ("tinyxml" ,tinyxml)
1020 ("zziplib" ,zziplib)))
1021 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1023 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1024 flexible 3D engine written in C++ designed to make it easier and more intuitive
1025 for developers to produce applications utilising hardware-accelerated 3D
1027 (home-page "https://www.ogre3d.org/")
1028 (license license:expat)))
1030 (define-public openexr
1033 (version (package-version ilmbase))
1035 (inherit (package-source ilmbase))
1036 (file-name (git-file-name "openexr" version))
1037 (modules '((guix build utils)))
1040 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1044 (build-system cmake-build-system)
1047 (modify-phases %standard-phases
1048 (add-after 'unpack 'change-directory
1052 (add-after 'change-directory 'increase-test-timeout
1054 ;; On armhf-linux, we need to override the CTest default
1055 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1056 (substitute* "IlmImfTest/CMakeLists.txt"
1057 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1060 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1062 ,@(if (not (target-64bit?))
1063 `((add-after 'change-directory 'disable-broken-test
1064 ;; This test fails on i686. Upstream developers suggest that
1065 ;; this test is broken on i686 and can be safely disabled:
1066 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1068 (substitute* "IlmImfTest/main.cpp"
1069 ((".*testOptimizedInterleavePatterns.*") ""))
1073 `(("pkg-config" ,pkg-config)))
1075 `(("ilmbase" ,ilmbase) ;used in public headers
1076 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1077 (home-page "https://www.openexr.com/")
1078 (synopsis "High-dynamic range file format library")
1080 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1081 use in computer imaging applications. The IlmImf C++ libraries support
1082 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1083 (license license:bsd-3)))
1085 (define-public openimageio
1087 (name "openimageio")
1092 (url "https://github.com/OpenImageIO/oiio")
1093 (commit (string-append "Release-" version))))
1094 (file-name (git-file-name name version))
1097 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
1098 (build-system cmake-build-system)
1099 ;; FIXME: To run all tests successfully, test image sets from multiple
1100 ;; third party sources have to be present. For details see
1101 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
1105 `(("pkg-config" ,pkg-config)))
1109 ("libjpeg" ,libjpeg-turbo)
1110 ("libtiff" ,libtiff)
1112 ("openexr" ,openexr)
1113 ("ilmbase" ,ilmbase)
1114 ("python" ,python-wrapper)
1115 ("pybind11" ,pybind11)
1116 ("robin-map" ,robin-map)
1118 (synopsis "C++ library for reading and writing images")
1120 "OpenImageIO is a library for reading and writing images, and a bunch of
1121 related classes, utilities, and applications. There is a particular emphasis
1122 on formats and functionality used in professional, large-scale animation and
1123 visual effects work for film.")
1124 (home-page "https://www.openimageio.org")
1125 (license license:bsd-3)))
1127 (define-public openscenegraph
1129 (name "openscenegraph")
1135 (url "https://github.com/openscenegraph/OpenSceneGraph")
1136 (commit (string-append "OpenSceneGraph-" version))))
1138 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1139 (file-name (git-file-name name version))))
1141 `((upstream-name . "OpenSceneGraph")))
1142 (build-system cmake-build-system)
1144 `(#:tests? #f ; no test target available
1145 ;; Without this flag, 'rd' will be added to the name of the
1146 ;; library binaries and break linking with other programs.
1147 #:build-type "Release"
1149 (list (string-append "-DCMAKE_INSTALL_RPATH="
1150 (assoc-ref %outputs "out") "/lib:"
1151 (assoc-ref %outputs "out") "/lib64"))))
1153 `(("pkg-config" ,pkg-config)
1156 `(("giflib" ,giflib)
1157 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1159 ("librsvg" ,librsvg)
1160 ("libxrandr" ,libxrandr)
1163 (synopsis "High-performance real-time graphics toolkit")
1165 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1166 used by application developers in fields such as visual simulation, games,
1167 virtual reality, scientific visualization and modeling.")
1168 (home-page "http://www.openscenegraph.org")
1169 ;; The 'LICENSE' file explains that the source is licensed under
1170 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1171 (license license:lgpl2.1)))
1173 ;; We need this for simgear
1174 (define-public openscenegraph-3.4
1175 (package (inherit openscenegraph)
1176 (name "openscenegraph")
1182 (url "https://github.com/openscenegraph/OpenSceneGraph")
1183 (commit (string-append "OpenSceneGraph-" version))))
1184 (file-name (git-file-name name version))
1187 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1189 (substitute-keyword-arguments (package-arguments openscenegraph)
1190 ((#:configure-flags flags)
1192 ;; The jpeg plugin requires conversion between integers and booleans
1193 "-DCMAKE_CXX_FLAGS=-fpermissive"
1196 `(("libjpeg" ,libjpeg-turbo)
1197 ,@(package-inputs openscenegraph)))))
1200 (define-public openmw-openscenegraph
1201 ;; OpenMW prefers its own fork of openscenegraph:
1202 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1203 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1206 (inherit openscenegraph)
1207 (version (git-version "3.6" "1" commit))
1212 (url "https://github.com/OpenMW/osg/")
1214 (file-name (git-file-name (package-name openscenegraph) version))
1217 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1219 (substitute-keyword-arguments (package-arguments openscenegraph)
1220 ((#:configure-flags flags)
1221 ;; As per the above wiki link, the following plugins are enough:
1223 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1224 "-DBUILD_OSG_PLUGIN_OSG=1"
1225 "-DBUILD_OSG_PLUGIN_DDS=1"
1226 "-DBUILD_OSG_PLUGIN_TGA=1"
1227 "-DBUILD_OSG_PLUGIN_BMP=1"
1228 "-DBUILD_OSG_PLUGIN_JPEG=1"
1229 "-DBUILD_OSG_PLUGIN_PNG=1"
1230 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1231 ;; The jpeg plugin requires conversion between integers and booleans
1232 "-DCMAKE_CXX_FLAGS=-fpermissive")
1235 (define-public povray
1242 (url "https://github.com/POV-Ray/povray")
1243 (commit (string-append "v" version))))
1244 (file-name (git-file-name name version))
1247 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1248 (modules '((guix build utils)))
1251 ;; Delete bundled libraries.
1252 (delete-file-recursively "libraries")
1254 (build-system gnu-build-system)
1256 `(("autoconf" ,autoconf)
1257 ("automake" ,automake)
1258 ("pkg-config" ,pkg-config)))
1261 ("libjpeg" ,libjpeg-turbo)
1263 ("libtiff" ,libtiff)
1264 ("openexr" ,openexr)
1269 (list "COMPILED_BY=Guix"
1270 (string-append "--with-boost-libdir="
1271 (assoc-ref %build-inputs "boost") "/lib")
1272 "--disable-optimiz-arch")
1274 (modify-phases %standard-phases
1275 (add-after 'unpack 'run-prebuild
1277 (setenv "HOME" (getcwd))
1278 (with-directory-excursion "unix"
1279 (substitute* "prebuild.sh"
1280 (("/bin/sh") (which "sh")))
1281 (invoke "sh" "prebuild.sh"))
1283 ;; The bootstrap script is run by the prebuild script in the
1284 ;; "run-prebuild" phase.
1285 (delete 'bootstrap))))
1286 (synopsis "Tool for creating three-dimensional graphics")
1288 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1289 for producing high-quality computer graphics. @code{POV-Ray} creates
1290 three-dimensional, photo-realistic images using a rendering technique called
1291 ray-tracing. It reads in a text file containing information describing the
1292 objects and lighting in a scene and generates an image of that scene from the
1293 view point of a camera also described in the text file. Ray-tracing is not a
1294 fast process by any means, but it produces very high quality images with
1295 realistic reflections, shading, perspective and other effects.")
1296 (home-page "http://www.povray.org/")
1297 (license license:agpl3+)))
1299 (define-public rapicorn
1305 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1306 "rapicorn-" version ".tar.xz"))
1309 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1310 (patches (search-patches "rapicorn-isnan.patch"))))
1311 (build-system gnu-build-system)
1314 (modify-phases %standard-phases
1315 (add-after 'unpack 'fix-tests
1317 ;; Our grep does not support perl regular expressions.
1318 (substitute* "taptool.sh"
1319 (("grep -P") "grep -E"))
1320 ;; Disable path tests because we cannot access /bin or /sbin.
1321 (substitute* "rcore/tests/multitest.cc"
1322 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1324 (add-before 'check 'pre-check
1326 ;; The test suite requires a running X server (with DISPLAY
1327 ;; number 99 or higher).
1328 (system "Xvfb :99 &")
1329 (setenv "DISPLAY" ":99")
1331 (add-after 'unpack 'replace-fhs-paths
1333 (substitute* (cons "Makefile.decl"
1334 (find-files "." "^Makefile\\.in$"))
1335 (("/bin/ls") (which "ls"))
1336 (("/usr/bin/env") (which "env")))
1338 ;; These libraries are listed in the "Required" section of the pkg-config
1341 `(("librsvg" ,librsvg)
1344 ("libxml2" ,libxml2)
1345 ("python2-enum34" ,python2-enum34)))
1347 `(("gdk-pixbuf" ,gdk-pixbuf)
1348 ("libpng" ,libpng-1.2)
1349 ("readline" ,readline)
1350 ("libcroco" ,libcroco)
1351 ("python" ,python-2)
1352 ("cython" ,python2-cython)))
1354 `(("pandoc" ,pandoc)
1357 ("doxygen" ,doxygen)
1358 ("graphviz" ,graphviz)
1359 ("intltool" ,intltool)
1360 ("pkg-config" ,pkg-config)
1361 ("xvfb" ,xorg-server-for-tests)))
1362 (home-page "https://rapicorn.testbit.org/")
1363 (synopsis "Toolkit for rapid development of user interfaces")
1365 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1366 and Python. The user interface is designed in a declarative markup language
1367 and is connected to the programming logic using data bindings and commands.")
1368 (license license:mpl2.0)))
1376 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1380 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1381 (build-system cmake-build-system)
1382 (arguments '(#:tests? #f)) ;no 'test' target
1384 ;; Headers include OpenEXR and IlmBase headers.
1385 (propagated-inputs `(("openexr" ,openexr)))
1387 (home-page "http://ampasctl.sourceforge.net")
1388 (synopsis "Color Transformation Language")
1390 "The Color Transformation Language, or CTL, is a small programming
1391 language that was designed to serve as a building block for digital color
1392 management systems. CTL allows users to describe color transforms in a
1393 concise and unambiguous way by expressing them as programs. In order to apply
1394 a given transform to an image, the color management system instructs a CTL
1395 interpreter to load and run the CTL program that describes the transform. The
1396 original and the transformed image constitute the CTL program's input and
1399 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1400 ;; and headers use different wording.
1401 (license (license:non-copyleft "file://LICENSE"))))
1403 (define-public brdf-explorer
1404 ;; There are no release tarballs, and not even tags in the repo,
1405 ;; so use the latest revision.
1406 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1409 (name "brdf-explorer")
1410 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1414 (url "https://github.com/wdas/brdf")
1418 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1419 (file-name (string-append name "-" version "-checkout"))))
1420 (build-system gnu-build-system)
1422 `(#:phases (modify-phases %standard-phases
1424 (lambda* (#:key outputs #:allow-other-keys)
1425 (let ((out (assoc-ref outputs "out")))
1427 (string-append "prefix=" out)))))
1428 (add-after 'install 'wrap-program
1429 (lambda* (#:key outputs #:allow-other-keys)
1430 (let* ((out (assoc-ref outputs "out"))
1431 (bin (string-append out "/bin"))
1432 (data (string-append
1433 out "/share/brdf")))
1434 (with-directory-excursion bin
1435 (rename-file "brdf" ".brdf-real")
1436 (call-with-output-file "brdf"
1438 (format port "#!/bin/sh
1439 # Run the thing from its home, otherwise it just bails out.
1441 exec -a \"$0\" ~a/.brdf-real~%"
1443 (chmod "brdf" #o555)))
1446 `(("qttools" ,qttools))) ;for 'qmake'
1448 `(("qtbase" ,qtbase)
1451 ("freeglut" ,freeglut)
1453 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1455 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1457 "BRDF Explorer is an application that allows the development and analysis
1458 of bidirectional reflectance distribution functions (BRDFs). It can load and
1459 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1460 language), measured material data from the MERL database, and anisotropic
1461 measured material data from MIT CSAIL. Graphs and visualizations update in
1462 real time as parameters are changed, making it a useful tool for evaluating
1463 and understanding different BRDFs (and other component functions).")
1464 (license license:ms-pl))))
1472 (uri (list (string-append
1473 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1476 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1479 ;; Site was discontinued.
1480 (string-append "http://www.antigrain.com/agg-"
1481 version ".tar.gz")))
1483 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1484 (patches (search-patches "agg-am_c_prototype.patch"))))
1485 (build-system gnu-build-system)
1488 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1490 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1492 "--disable-examples")
1494 (modify-phases %standard-phases
1497 ;; let's call configure from configure phase and not now
1498 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1499 (invoke "sh" "autogen.sh"))))))
1501 `(("pkg-config" ,pkg-config)
1502 ("libtool" ,libtool)
1503 ("autoconf" ,autoconf)
1504 ("automake" ,automake)))
1506 `(("libx11" ,libx11)
1507 ("freetype" ,freetype)
1510 ;; Antigrain.com was discontinued.
1511 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1512 (synopsis "High-quality 2D graphics rendering engine for C++")
1514 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1515 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1516 rendering SVG graphics.")
1517 (license license:gpl2+)))
1519 (define-public python-pastel
1521 (name "python-pastel")
1526 (uri (pypi-uri "pastel" version))
1529 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1530 (build-system python-build-system)
1532 `(#:phases (modify-phases %standard-phases
1534 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1536 `(("python-pytest" ,python-pytest)))
1537 (home-page "https://github.com/sdispater/pastel")
1538 (synopsis "Library to colorize strings in your terminal")
1539 (description "Pastel is a simple library to help you colorize strings in
1541 (license license:expat)))
1543 (define-public python2-pastel
1544 (package-with-python2 python-pastel))
1546 (define-public fgallery
1554 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1555 "fgallery-" version ".zip"))
1558 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1559 (build-system gnu-build-system)
1561 `(#:tests? #f ; no tests
1563 (modify-phases %standard-phases
1567 (lambda* (#:key inputs outputs #:allow-other-keys)
1568 (let* ((out (assoc-ref outputs "out"))
1569 (bin (string-append out "/bin/"))
1570 (share (string-append out "/share/fgallery"))
1571 (man (string-append out "/share/man/man1"))
1572 (perl5lib (getenv "PERL5LIB"))
1573 (script (string-append share "/fgallery")))
1574 (define (bin-directory input-name)
1575 (string-append (assoc-ref inputs input-name) "/bin"))
1578 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1581 (copy-recursively "." share)
1583 ;; fgallery copies files from store when it is run. The
1584 ;; read-only permissions from the store directories will cause
1585 ;; fgallery to fail. Do not preserve file attributes when
1586 ;; copying files to prevent it.
1589 "'cp', '--no-preserve=all'"))
1592 (symlink script (string-append out "/bin/fgallery"))
1594 (wrap-program script
1596 ,(map bin-directory '("imagemagick"
1604 `("PERL5LIB" ":" prefix (,perl5lib)))
1607 `(("unzip" ,unzip)))
1608 ;; TODO: Add missing optional dependency: facedetect.
1610 `(("imagemagick" ,imagemagick)
1613 ("libjpeg" ,libjpeg-turbo)
1616 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1617 ("perl-image-exiftool" ,perl-image-exiftool)
1618 ("jpegoptim" ,jpegoptim)
1619 ("pngcrush" ,pngcrush)
1621 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1622 (synopsis "Static photo gallery generator")
1624 "FGallery is a static, JavaScript photo gallery generator with minimalist
1625 look. The result can be uploaded on any web server without additional
1627 (license license:gpl2+)))
1629 (define-public opensubdiv
1636 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1637 (commit (string-append "v" (string-join (string-split version #\.)
1639 (file-name (git-file-name name version))
1642 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1643 (build-system cmake-build-system)
1645 `(#:phases (modify-phases %standard-phases
1646 (add-before 'configure 'set-glew-location
1647 (lambda* (#:key inputs #:allow-other-keys)
1648 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1650 (add-before 'check 'start-xorg-server
1651 (lambda* (#:key inputs #:allow-other-keys)
1652 ;; The test suite requires a running X server.
1653 (system (string-append (assoc-ref inputs "xorg-server")
1655 (setenv "DISPLAY" ":1")
1658 `(("xorg-server" ,xorg-server-for-tests)))
1661 ("libxrandr" ,libxrandr)
1662 ("libxcursor" ,libxcursor)
1663 ("libxinerama" ,libxinerama)
1667 (home-page "https://graphics.pixar.com/opensubdiv/")
1668 (synopsis "High performance subdivision surface evaluation")
1669 (description "OpenSubdiv is a set of libraries that implement high
1670 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1671 and GPU architectures.")
1672 (license license:asl2.0)))
1674 (define-public opencsg
1675 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1683 (url "https://github.com/floriankirsch/OpenCSG")
1684 (commit (string-append "opencsg-"
1685 (string-map dot-to-dash version)
1687 (file-name (git-file-name name version))
1690 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1691 (build-system gnu-build-system)
1694 (modify-phases %standard-phases
1696 (lambda* (#:key outputs #:allow-other-keys)
1697 (substitute* "src/Makefile"
1698 (("/usr/local") (assoc-ref outputs "out")))
1700 (add-before 'build 'skip-example
1701 (lambda _ (chdir "src") #t)))))
1704 ("freeglut" ,freeglut)))
1705 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1707 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1708 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1709 For example, two shapes can be combined by uniting them, by intersecting them,
1710 or by subtracting one shape from the other.")
1711 (home-page "http://www.opencsg.org/")
1712 (license license:gpl2))))
1714 (define-public coin3D
1715 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1716 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1718 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1722 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1727 (url "https://bitbucket.org/Coin3D/coin")
1728 (changeset changeset)))
1729 (file-name (git-file-name name version))
1731 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1732 (modules '((guix build utils)))
1735 (for-each delete-file
1737 "cfg/wrapmsvc.exe"))
1739 (build-system cmake-build-system)
1741 `(("doxygen" ,doxygen)
1742 ("graphviz" ,graphviz)))
1745 ("freeglut" ,freeglut)
1750 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1751 (string-append "-DBOOST_ROOT="
1752 (assoc-ref %build-inputs "boost")))))
1753 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1755 "High-level 3D visualization library with Open Inventor 2.1 API")
1757 "Coin is a 3D graphics library with an Application Programming Interface
1758 based on the Open Inventor 2.1 API. For those who are not familiar with
1759 Open Inventor, it is a scene-graph based retain-mode rendering and model
1760 interaction library, written in C++, which has become the de facto
1761 standard graphics library for 3D visualization and visual simulation
1762 software in the scientific and engineering community.")
1763 (license license:bsd-3))))
1765 (define-public coin3D-4
1773 (url "https://github.com/coin3d/coin")
1774 (commit (string-append "Coin-" version))
1776 (file-name (git-file-name name version))
1778 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1779 (modules '((guix build utils)))
1783 (for-each delete-file
1785 "cfg/wrapmsvc.exe"))
1786 ;; Delete references to packaging tool cpack. Otherwise the build
1787 ;; fails with "add_subdirectory given source "cpack.d" which is not
1788 ;; an existing directory."
1789 (substitute* "CMakeLists.txt"
1790 ((".*cpack.d.*") ""))
1792 (build-system cmake-build-system)
1794 `(("doxygen" ,doxygen)
1795 ("graphviz" ,graphviz)))
1798 ("freeglut" ,freeglut)
1803 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1804 (string-append "-DBOOST_ROOT="
1805 (assoc-ref %build-inputs "boost")))))
1806 (home-page "https://github.com/coin3d/coin")
1808 "High-level 3D visualization library with Open Inventor 2.1 API")
1810 "Coin is a 3D graphics library with an Application Programming Interface
1811 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1812 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1813 library, written in C++, which has become the de facto standard graphics
1814 library for 3D visualization and visual simulation software in the scientific
1815 and engineering community.")
1816 (license license:bsd-3)))
1818 (define-public superfamiconv
1820 (name "superfamiconv")
1826 (url "https://github.com/Optiroc/SuperFamiconv")
1827 (commit (string-append "v" version))))
1828 (file-name (git-file-name name version))
1831 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1832 (build-system gnu-build-system)
1834 `(#:tests? #f ; no tests
1836 (modify-phases %standard-phases
1839 (lambda* (#:key outputs #:allow-other-keys)
1840 (let* ((outdir (assoc-ref outputs "out"))
1841 (bindir (string-append outdir "/bin")))
1842 (install-file "bin/superfamiconv" bindir)
1844 (home-page "https://github.com/Optiroc/SuperFamiconv")
1845 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1846 and PC Engine formats")
1847 (description "SuperFamiconv is a converter for tiled graphics, supporting
1848 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1849 Automated palette selection is supported.")
1850 (license license:expat)))
1852 (define-public drawpile
1853 ;; This commit fix building with libmicrohttpd>=0.71.
1854 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1858 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1862 (url "https://github.com/drawpile/Drawpile")
1864 (file-name (git-file-name name version))
1867 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1868 (build-system qt-build-system)
1871 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1873 `(("extra-cmake-modules" ,extra-cmake-modules)
1874 ("pkg-config" ,pkg-config)))
1876 `(("giflib" ,giflib)
1877 ("karchive" ,karchive)
1879 ("libmicrohttpd" ,libmicrohttpd)
1880 ("libsodium" ,libsodium)
1883 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1885 ("qtkeychain" ,qtkeychain)
1886 ("qtmultimedia" ,qtmultimedia)
1888 ("qtx11extras" ,qtx11extras)))
1889 (home-page "https://drawpile.net")
1890 (synopsis "Collaborative drawing program")
1891 (description "Drawpile is a drawing program that allows share the canvas
1892 with other users in real time.
1894 Some feature highlights:
1896 @item Shared canvas using the built-in server or a dedicated server
1897 @item Record, play back and export drawing sessions
1898 @item Simple animation support
1899 @item Layers and blending modes
1901 @item Supports pressure sensitive Wacom tablets
1903 @item Supports OpenRaster file format
1904 @item Encrypted connections using SSL
1905 @item Automatic port forwarding with UPnP
1907 (license license:gpl3+))))