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 "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm"))))
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)
545 (home-page "https://blender.org/")
546 (synopsis "3D graphics creation suite")
548 "Blender is a 3D graphics creation suite. It supports the entirety of
549 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
550 compositing and motion tracking, even video editing and game creation. The
551 application can be customized via its API for Python scripting.")
552 (license license:gpl2+)))
554 (define-public blender-2.79
560 (uri (string-append "https://download.blender.org/source/"
561 "blender-" version ".tar.gz"))
564 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
565 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
566 "blender-2.79-oiio2.patch"
567 ;; The following patches may be
568 ;; needed when the default GCC is
570 ;; "blender-2.79-gcc8.patch"
571 ;; "blender-2.79-gcc9.patch"
572 "blender-2.79-python-3.7-fix.patch"
573 "blender-2.79-python-3.8-fix.patch"))))
574 (build-system cmake-build-system)
576 (let ((python-version (version-major+minor (package-version python))))
577 `(;; Test files are very large and not included in the release tarball.
580 (list "-DWITH_CODEC_FFMPEG=ON"
581 "-DWITH_CODEC_SNDFILE=ON"
583 "-DWITH_DOC_MANPAGE=ON"
585 "-DWITH_GAMEENGINE=ON"
586 "-DWITH_IMAGE_OPENJPEG=ON"
587 "-DWITH_INPUT_NDOF=ON"
588 "-DWITH_INSTALL_PORTABLE=OFF"
590 "-DWITH_MOD_OCEANSIM=ON"
592 "-DWITH_PYTHON_INSTALL=OFF"
593 "-DWITH_PYTHON_INSTALL=OFF"
594 "-DWITH_SYSTEM_OPENJPEG=ON"
595 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
596 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
598 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
599 "/include/python" ,python-version)
600 (string-append "-DPYTHON_VERSION=" ,python-version))
602 (modify-phases %standard-phases
603 (add-after 'unpack 'fix-broken-import
605 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
606 (("import encode_bin") "from . import encode_bin"))
608 (add-after 'set-paths 'add-ilmbase-include-path
609 (lambda* (#:key inputs #:allow-other-keys)
610 ;; OpenEXR propagates ilmbase, but its include files do not appear
611 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
612 ;; the CPATH to satisfy the dependency on "half.h".
614 (string-append (assoc-ref inputs "ilmbase")
616 ":" (or (getenv "CPATH") "")))
620 ("jemalloc" ,jemalloc)
622 ("openimageio" ,openimageio)
625 ("openjpeg" ,openjpeg)
626 ("libjpeg" ,libjpeg-turbo)
632 ("libsndfile" ,libsndfile)
633 ("freetype" ,freetype)
638 (home-page "https://blender.org/")
639 (synopsis "3D graphics creation suite")
641 "Blender is a 3D graphics creation suite. It supports the entirety of
642 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
643 compositing and motion tracking, even video editing and game creation. The
644 application can be customized via its API for Python scripting.
646 NOTE: This older version of Blender is the last release that does not require
647 OpenGL 3. It is retained for use with older computers.")
648 (license license:gpl2+)))
657 (url "https://github.com/guillaumechereau/goxel")
658 (commit (string-append "v" version))))
659 (file-name (git-file-name name version))
662 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
663 (build-system gnu-build-system)
666 #:phases (modify-phases %standard-phases (delete 'configure))
667 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
670 `(("pkg-config" ,pkg-config)))
675 (home-page "https://goxel.xyz/")
676 (synopsis "Voxel editor")
678 "Goxel is a voxel editor that features unlimited scene size, unlimited
679 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
680 and export to various formats including the format used by Magicavoxel.")
681 (license license:gpl3+)))
683 (define-public assimp
690 (url "https://github.com/assimp/assimp")
691 (commit (string-append "v" version))))
692 (file-name (git-file-name name version))
695 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
696 (build-system cmake-build-system)
699 (home-page "http://www.assimp.org/")
700 (synopsis "Asset import library")
702 "The Open Asset Import Library loads more than 40 3D file formats into
703 one unified data structure. Additionally, assimp features various mesh post
704 processing tools: normals and tangent space generation, triangulation, vertex
705 cache locality optimization, removal of degenerate primitives and duplicate
706 vertices, sorting by primitive type, merging of redundant materials and many
708 (license license:bsd-3)))
717 "https://github.com/CGAL/cgal/releases/download/releases/"
718 "CGAL-" version "/CGAL-" version ".tar.xz"))
721 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
722 (build-system cmake-build-system)
724 '(#:tests? #f)) ; no test target
729 (home-page "https://www.cgal.org/")
730 (synopsis "Computational geometry algorithms library")
732 "CGAL provides easy access to efficient and reliable geometric algorithms
733 in the form of a C++ library. CGAL is used in various areas needing geometric
734 computation, such as: computer graphics, scientific visualization, computer
735 aided design and modeling, geographic information systems, molecular biology,
736 medical imaging, robotics and motion planning, mesh generation, numerical
737 methods, etc. It provides data structures and algorithms such as
738 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
741 ;; The 'LICENSE' file explains that a subset is available under more
742 ;; permissive licenses.
743 (license license:gpl3+)))
745 (define-public ilmbase
752 (url "https://github.com/openexr/openexr")
753 (commit (string-append "v" version))))
754 (file-name (git-file-name "ilmbase" version))
757 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
758 (patches (search-patches "ilmbase-fix-tests.patch"))))
759 (build-system cmake-build-system)
761 `(#:phases (modify-phases %standard-phases
762 (add-after 'unpack 'change-directory
766 (home-page "https://www.openexr.com/")
767 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
769 "IlmBase provides several utility libraries for C++. Half is a class
770 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
771 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
772 quaternions and other useful 2D and 3D math functions. Iex is an
773 exception-handling library.")
774 (license license:bsd-3)))
776 (define-public lib2geom
777 ;; Use the latest master commit, as the 1.0 release suffer build problems.
779 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
782 (version (git-version "1.0" revision commit))
786 (url "https://gitlab.com/inkscape/lib2geom.git")
788 (file-name (git-file-name name version))
791 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
793 ;; Patch submitted to upstream (see:
794 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
795 (search-patches "lib2geom-fix-tests.patch"))
796 (modules '((guix build utils)))
799 ;; Fix py2geom module initialization (see:
800 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
801 (substitute* "src/py2geom/__init__.py"
802 (("_py2geom") "py2geom._py2geom"))
804 (build-system cmake-build-system)
806 `(#:imported-modules ((guix build python-build-system)
807 ,@%cmake-build-system-modules)
808 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
809 "-D2GEOM_BOOST_PYTHON=ON"
810 ;; Compiling the Cython bindings fail (see:
811 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
812 "-D2GEOM_CYTHON_BINDINGS=OFF")
814 (modify-phases %standard-phases
815 (add-after 'unpack 'patch-python-lib-install-path
816 (lambda* (#:key inputs outputs #:allow-other-keys)
817 (let* ((python-version (@ (guix build python-build-system)
819 (python-maj-min-version (python-version
820 (assoc-ref inputs "python")))
821 (site-package (string-append
822 (assoc-ref outputs "out")
823 "/lib/python" python-maj-min-version
825 (substitute* '("src/cython/CMakeLists.txt"
826 "src/py2geom/CMakeLists.txt")
827 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
828 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
830 (native-inputs `(("python" ,python-wrapper)
831 ("googletest" ,googletest)
832 ("pkg-config" ,pkg-config)))
833 (inputs `(("cairo" ,cairo)
834 ("pycairo" ,python-pycairo)
835 ("double-conversion" ,double-conversion)
839 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
840 (home-page "https://gitlab.com/inkscape/lib2geom/")
841 (synopsis "C++ 2D graphics library")
842 (description "2geom is a C++ library of mathematics for paths, curves,
843 and other geometric calculations. Designed for vector graphics, it tackles
844 Bézier curves, conic sections, paths, intersections, transformations, and
846 ;; Because the library is linked with the GNU Scientific Library
847 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
848 ;; https://gitlab.com/inkscape/inkscape/issues/784).
849 (license license:gpl3+))))
851 (define-public pstoedit
857 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
858 version "/pstoedit-" version ".tar.gz"))
861 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
862 (build-system gnu-build-system)
864 `(("pkg-config" ,pkg-config)))
866 `(("ghostscript" ,ghostscript)
867 ("imagemagick" ,imagemagick)
868 ("libplot" ,plotutils)
869 ("libjpeg" ,libjpeg-turbo)
870 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
871 (home-page "http://www.pstoedit.net/")
872 (synopsis "Converter for PostScript and PDF graphics")
873 (description "The @code{pstoedit} utility allows translating graphics
874 in the PostScript or PDF (Portable Document Format) formats to various
875 other vector formats such as:
880 @item Flattened PostScript
881 @item DXF, a CAD (Computed-Aided Design) exchange format
882 @item PIC (for troff/groff)
883 @item MetaPost (for usage with TeX/LaTeX)
884 @item LaTeX2e picture
885 @item GNU Metafile (for use with plotutils/libplot)
886 @item Any format supported by ImageMagick
888 (license license:gpl2+)))
890 (define-public dear-imgui
898 (url "https://github.com/ocornut/imgui")
899 (commit (string-append "v" version))))
900 (file-name (git-file-name name version))
902 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
903 (build-system gnu-build-system)
906 (list (string-append "CC=" ,(cc-for-target))
907 (string-append "PREFIX=" (assoc-ref %outputs "out"))
908 (string-append "VERSION=" ,version))
909 #:tests? #f ; no test suite
911 (modify-phases %standard-phases
912 (add-after 'unpack 'unpack-debian-files
913 (lambda* (#:key inputs #:allow-other-keys)
914 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
915 (apply invoke "patch" "-Np1" "-i"
916 (find-files "debian/patches" "\\.patch$"))
917 (substitute* "Makefile"
918 (("<stb/") "<") ; Guix doesn't use this subdirectory
919 ;; Don't build or install the static library.
920 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
921 (substitute* (list "imgui.pc.in"
923 ;; Don't link against a non-existent library.
926 (delete 'configure) ; no configure script
928 ;; The default ‘install’ target installs the static library. Don't.
929 (lambda* (#:key make-flags #:allow-other-keys)
930 (apply invoke "make" "install-shared" "install-header"
934 ;; Upstream doesn't provide a build system. Use Debian's.
937 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
938 version "+ds-1.debian.tar.xz"))
940 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
941 ("pkg-config" ,pkg-config)))
943 `(("freetype" ,freetype)
944 ("stb-rect-pack" ,stb-rect-pack)
945 ("stb-truetype" ,stb-truetype)))
946 (home-page "https://github.com/ocornut/imgui")
947 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
949 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
950 It creates optimized vertex buffers that you can render anytime in your
951 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
952 self-contained, without external dependencies.
954 Dear ImGui is aimed at content creation, visualization, and debugging tools as
955 opposed to average end-user interfaces. Hence it favors simplicity and
956 productivity but lacks certain features often found in higher-level libraries.
957 It is particularly suited to integration in game engine tooling, real-time 3D
958 applications, full-screen applications, and embedded platforms without standard
959 operating system features.")
960 (license license:expat))) ; some examples/ use the zlib licence
970 (url "https://github.com/OGRECave/ogre")
971 (commit (string-append "v" version))))
972 (file-name (git-file-name name version))
974 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
975 (build-system cmake-build-system)
978 (modify-phases %standard-phases
979 (add-before 'configure 'unpack-dear-imgui
980 (lambda* (#:key inputs #:allow-other-keys)
981 (copy-recursively (assoc-ref inputs "dear-imgui-source")
982 "../dear-imgui-source")
984 (add-before 'configure 'pre-configure
985 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
986 ;; a consequence, we cannot suggest ours in configure flags. Fix
988 (lambda* (#:key inputs outputs #:allow-other-keys)
989 (substitute* "CMakeLists.txt"
990 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
993 (let* ((out (assoc-ref %outputs "out"))
995 (string-join (list (string-append out "/lib")
996 (string-append out "/lib/OGRE"))
998 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
999 "-DIMGUI_DIR=../dear-imgui-source"
1000 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1001 "-DOGRE_BUILD_TESTS=TRUE"
1002 "-DOGRE_INSTALL_DOCS=TRUE"
1003 "-DOGRE_INSTALL_SAMPLES=TRUE"
1004 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1007 ("dear-imgui-source" ,(package-source dear-imgui))
1008 ("doxygen" ,doxygen)
1009 ("googletest" ,googletest-1.8)
1010 ("pkg-config" ,pkg-config)))
1012 `(("font-dejavu" ,font-dejavu)
1013 ("freeimage" ,freeimage)
1014 ("freetype" ,freetype)
1017 ("libxrandr" ,libxrandr)
1018 ("pugixml" ,pugixml)
1020 ("tinyxml" ,tinyxml)
1021 ("zziplib" ,zziplib)))
1022 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1024 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1025 flexible 3D engine written in C++ designed to make it easier and more intuitive
1026 for developers to produce applications utilising hardware-accelerated 3D
1028 (home-page "https://www.ogre3d.org/")
1029 (license license:expat)))
1031 (define-public openexr
1034 (version (package-version ilmbase))
1036 (inherit (package-source ilmbase))
1037 (file-name (git-file-name "openexr" version))
1038 (modules '((guix build utils)))
1041 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1045 (build-system cmake-build-system)
1048 (modify-phases %standard-phases
1049 (add-after 'unpack 'change-directory
1053 (add-after 'change-directory 'increase-test-timeout
1055 ;; On armhf-linux, we need to override the CTest default
1056 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1057 (substitute* "IlmImfTest/CMakeLists.txt"
1058 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1061 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1063 ,@(if (not (target-64bit?))
1064 `((add-after 'change-directory 'disable-broken-test
1065 ;; This test fails on i686. Upstream developers suggest that
1066 ;; this test is broken on i686 and can be safely disabled:
1067 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1069 (substitute* "IlmImfTest/main.cpp"
1070 ((".*testOptimizedInterleavePatterns.*") ""))
1074 `(("pkg-config" ,pkg-config)))
1076 `(("ilmbase" ,ilmbase) ;used in public headers
1077 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1078 (home-page "https://www.openexr.com/")
1079 (synopsis "High-dynamic range file format library")
1081 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1082 use in computer imaging applications. The IlmImf C++ libraries support
1083 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1084 (license license:bsd-3)))
1086 (define-public openimageio
1088 (name "openimageio")
1093 (url "https://github.com/OpenImageIO/oiio")
1094 (commit (string-append "Release-" version))))
1095 (file-name (git-file-name name version))
1098 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
1099 (build-system cmake-build-system)
1100 ;; FIXME: To run all tests successfully, test image sets from multiple
1101 ;; third party sources have to be present. For details see
1102 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
1106 `(("pkg-config" ,pkg-config)))
1110 ("libjpeg" ,libjpeg-turbo)
1111 ("libtiff" ,libtiff)
1113 ("openexr" ,openexr)
1114 ("ilmbase" ,ilmbase)
1115 ("python" ,python-wrapper)
1116 ("pybind11" ,pybind11)
1117 ("robin-map" ,robin-map)
1119 (synopsis "C++ library for reading and writing images")
1121 "OpenImageIO is a library for reading and writing images, and a bunch of
1122 related classes, utilities, and applications. There is a particular emphasis
1123 on formats and functionality used in professional, large-scale animation and
1124 visual effects work for film.")
1125 (home-page "https://www.openimageio.org")
1126 (license license:bsd-3)))
1128 (define-public openscenegraph
1130 (name "openscenegraph")
1136 (url "https://github.com/openscenegraph/OpenSceneGraph")
1137 (commit (string-append "OpenSceneGraph-" version))))
1139 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1140 (file-name (git-file-name name version))))
1142 `((upstream-name . "OpenSceneGraph")))
1143 (build-system cmake-build-system)
1145 `(#:tests? #f ; no test target available
1146 ;; Without this flag, 'rd' will be added to the name of the
1147 ;; library binaries and break linking with other programs.
1148 #:build-type "Release"
1150 (list (string-append "-DCMAKE_INSTALL_RPATH="
1151 (assoc-ref %outputs "out") "/lib:"
1152 (assoc-ref %outputs "out") "/lib64"))))
1154 `(("pkg-config" ,pkg-config)
1157 `(("giflib" ,giflib)
1158 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1160 ("librsvg" ,librsvg)
1161 ("libxrandr" ,libxrandr)
1164 (synopsis "High-performance real-time graphics toolkit")
1166 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1167 used by application developers in fields such as visual simulation, games,
1168 virtual reality, scientific visualization and modeling.")
1169 (home-page "http://www.openscenegraph.org")
1170 ;; The 'LICENSE' file explains that the source is licensed under
1171 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1172 (license license:lgpl2.1)))
1174 ;; We need this for simgear
1175 (define-public openscenegraph-3.4
1176 (package (inherit openscenegraph)
1177 (name "openscenegraph")
1183 (url "https://github.com/openscenegraph/OpenSceneGraph")
1184 (commit (string-append "OpenSceneGraph-" version))))
1185 (file-name (git-file-name name version))
1188 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1190 (substitute-keyword-arguments (package-arguments openscenegraph)
1191 ((#:configure-flags flags)
1193 ;; The jpeg plugin requires conversion between integers and booleans
1194 "-DCMAKE_CXX_FLAGS=-fpermissive"
1197 `(("libjpeg" ,libjpeg-turbo)
1198 ,@(package-inputs openscenegraph)))))
1201 (define-public openmw-openscenegraph
1202 ;; OpenMW prefers its own fork of openscenegraph:
1203 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1204 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1207 (inherit openscenegraph)
1208 (version (git-version "3.6" "1" commit))
1213 (url "https://github.com/OpenMW/osg/")
1215 (file-name (git-file-name (package-name openscenegraph) version))
1218 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1220 (substitute-keyword-arguments (package-arguments openscenegraph)
1221 ((#:configure-flags flags)
1222 ;; As per the above wiki link, the following plugins are enough:
1224 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1225 "-DBUILD_OSG_PLUGIN_OSG=1"
1226 "-DBUILD_OSG_PLUGIN_DDS=1"
1227 "-DBUILD_OSG_PLUGIN_TGA=1"
1228 "-DBUILD_OSG_PLUGIN_BMP=1"
1229 "-DBUILD_OSG_PLUGIN_JPEG=1"
1230 "-DBUILD_OSG_PLUGIN_PNG=1"
1231 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1232 ;; The jpeg plugin requires conversion between integers and booleans
1233 "-DCMAKE_CXX_FLAGS=-fpermissive")
1236 (define-public povray
1243 (url "https://github.com/POV-Ray/povray")
1244 (commit (string-append "v" version))))
1245 (file-name (git-file-name name version))
1248 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1249 (modules '((guix build utils)))
1252 ;; Delete bundled libraries.
1253 (delete-file-recursively "libraries")
1255 (build-system gnu-build-system)
1257 `(("autoconf" ,autoconf)
1258 ("automake" ,automake)
1259 ("pkg-config" ,pkg-config)))
1262 ("libjpeg" ,libjpeg-turbo)
1264 ("libtiff" ,libtiff)
1265 ("openexr" ,openexr)
1270 (list "COMPILED_BY=Guix"
1271 (string-append "--with-boost-libdir="
1272 (assoc-ref %build-inputs "boost") "/lib")
1273 "--disable-optimiz-arch")
1275 (modify-phases %standard-phases
1276 (add-after 'unpack 'run-prebuild
1278 (setenv "HOME" (getcwd))
1279 (with-directory-excursion "unix"
1280 (substitute* "prebuild.sh"
1281 (("/bin/sh") (which "sh")))
1282 (invoke "sh" "prebuild.sh"))
1284 ;; The bootstrap script is run by the prebuild script in the
1285 ;; "run-prebuild" phase.
1286 (delete 'bootstrap))))
1287 (synopsis "Tool for creating three-dimensional graphics")
1289 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1290 for producing high-quality computer graphics. @code{POV-Ray} creates
1291 three-dimensional, photo-realistic images using a rendering technique called
1292 ray-tracing. It reads in a text file containing information describing the
1293 objects and lighting in a scene and generates an image of that scene from the
1294 view point of a camera also described in the text file. Ray-tracing is not a
1295 fast process by any means, but it produces very high quality images with
1296 realistic reflections, shading, perspective and other effects.")
1297 (home-page "http://www.povray.org/")
1298 (license license:agpl3+)))
1300 (define-public rapicorn
1306 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1307 "rapicorn-" version ".tar.xz"))
1310 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1311 (patches (search-patches "rapicorn-isnan.patch"))))
1312 (build-system gnu-build-system)
1315 (modify-phases %standard-phases
1316 (add-after 'unpack 'fix-tests
1318 ;; Our grep does not support perl regular expressions.
1319 (substitute* "taptool.sh"
1320 (("grep -P") "grep -E"))
1321 ;; Disable path tests because we cannot access /bin or /sbin.
1322 (substitute* "rcore/tests/multitest.cc"
1323 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1325 (add-before 'check 'pre-check
1327 ;; The test suite requires a running X server (with DISPLAY
1328 ;; number 99 or higher).
1329 (system "Xvfb :99 &")
1330 (setenv "DISPLAY" ":99")
1332 (add-after 'unpack 'replace-fhs-paths
1334 (substitute* (cons "Makefile.decl"
1335 (find-files "." "^Makefile\\.in$"))
1336 (("/bin/ls") (which "ls"))
1337 (("/usr/bin/env") (which "env")))
1339 ;; These libraries are listed in the "Required" section of the pkg-config
1342 `(("librsvg" ,librsvg)
1345 ("libxml2" ,libxml2)
1346 ("python2-enum34" ,python2-enum34)))
1348 `(("gdk-pixbuf" ,gdk-pixbuf)
1349 ("libpng" ,libpng-1.2)
1350 ("readline" ,readline)
1351 ("libcroco" ,libcroco)
1352 ("python" ,python-2)
1353 ("cython" ,python2-cython)))
1355 `(("pandoc" ,pandoc)
1358 ("doxygen" ,doxygen)
1359 ("graphviz" ,graphviz)
1360 ("intltool" ,intltool)
1361 ("pkg-config" ,pkg-config)
1362 ("xvfb" ,xorg-server-for-tests)))
1363 (home-page "https://rapicorn.testbit.org/")
1364 (synopsis "Toolkit for rapid development of user interfaces")
1366 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1367 and Python. The user interface is designed in a declarative markup language
1368 and is connected to the programming logic using data bindings and commands.")
1369 (license license:mpl2.0)))
1377 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1381 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1382 (build-system cmake-build-system)
1383 (arguments '(#:tests? #f)) ;no 'test' target
1385 ;; Headers include OpenEXR and IlmBase headers.
1386 (propagated-inputs `(("openexr" ,openexr)))
1388 (home-page "http://ampasctl.sourceforge.net")
1389 (synopsis "Color Transformation Language")
1391 "The Color Transformation Language, or CTL, is a small programming
1392 language that was designed to serve as a building block for digital color
1393 management systems. CTL allows users to describe color transforms in a
1394 concise and unambiguous way by expressing them as programs. In order to apply
1395 a given transform to an image, the color management system instructs a CTL
1396 interpreter to load and run the CTL program that describes the transform. The
1397 original and the transformed image constitute the CTL program's input and
1400 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1401 ;; and headers use different wording.
1402 (license (license:non-copyleft "file://LICENSE"))))
1404 (define-public brdf-explorer
1405 ;; There are no release tarballs, and not even tags in the repo,
1406 ;; so use the latest revision.
1407 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1410 (name "brdf-explorer")
1411 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1415 (url "https://github.com/wdas/brdf")
1419 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1420 (file-name (string-append name "-" version "-checkout"))))
1421 (build-system gnu-build-system)
1423 `(#:phases (modify-phases %standard-phases
1425 (lambda* (#:key outputs #:allow-other-keys)
1426 (let ((out (assoc-ref outputs "out")))
1428 (string-append "prefix=" out)))))
1429 (add-after 'install 'wrap-program
1430 (lambda* (#:key outputs #:allow-other-keys)
1431 (let* ((out (assoc-ref outputs "out"))
1432 (bin (string-append out "/bin"))
1433 (data (string-append
1434 out "/share/brdf")))
1435 (with-directory-excursion bin
1436 (rename-file "brdf" ".brdf-real")
1437 (call-with-output-file "brdf"
1439 (format port "#!/bin/sh
1440 # Run the thing from its home, otherwise it just bails out.
1442 exec -a \"$0\" ~a/.brdf-real~%"
1444 (chmod "brdf" #o555)))
1447 `(("qttools" ,qttools))) ;for 'qmake'
1449 `(("qtbase" ,qtbase)
1452 ("freeglut" ,freeglut)
1454 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1456 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1458 "BRDF Explorer is an application that allows the development and analysis
1459 of bidirectional reflectance distribution functions (BRDFs). It can load and
1460 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1461 language), measured material data from the MERL database, and anisotropic
1462 measured material data from MIT CSAIL. Graphs and visualizations update in
1463 real time as parameters are changed, making it a useful tool for evaluating
1464 and understanding different BRDFs (and other component functions).")
1465 (license license:ms-pl))))
1473 (uri (list (string-append
1474 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1477 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1480 ;; Site was discontinued.
1481 (string-append "http://www.antigrain.com/agg-"
1482 version ".tar.gz")))
1484 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1485 (patches (search-patches "agg-am_c_prototype.patch"))))
1486 (build-system gnu-build-system)
1489 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1491 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1493 "--disable-examples")
1495 (modify-phases %standard-phases
1498 ;; let's call configure from configure phase and not now
1499 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1500 (invoke "sh" "autogen.sh"))))))
1502 `(("pkg-config" ,pkg-config)
1503 ("libtool" ,libtool)
1504 ("autoconf" ,autoconf)
1505 ("automake" ,automake)))
1507 `(("libx11" ,libx11)
1508 ("freetype" ,freetype)
1511 ;; Antigrain.com was discontinued.
1512 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1513 (synopsis "High-quality 2D graphics rendering engine for C++")
1515 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1516 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1517 rendering SVG graphics.")
1518 (license license:gpl2+)))
1520 (define-public python-pastel
1522 (name "python-pastel")
1527 (uri (pypi-uri "pastel" version))
1530 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1531 (build-system python-build-system)
1533 `(#:phases (modify-phases %standard-phases
1535 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1537 `(("python-pytest" ,python-pytest)))
1538 (home-page "https://github.com/sdispater/pastel")
1539 (synopsis "Library to colorize strings in your terminal")
1540 (description "Pastel is a simple library to help you colorize strings in
1542 (license license:expat)))
1544 (define-public python2-pastel
1545 (package-with-python2 python-pastel))
1547 (define-public fgallery
1555 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1556 "fgallery-" version ".zip"))
1559 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1560 (build-system gnu-build-system)
1562 `(#:tests? #f ; no tests
1564 (modify-phases %standard-phases
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((out (assoc-ref outputs "out"))
1570 (bin (string-append out "/bin/"))
1571 (share (string-append out "/share/fgallery"))
1572 (man (string-append out "/share/man/man1"))
1573 (perl5lib (getenv "PERL5LIB"))
1574 (script (string-append share "/fgallery")))
1575 (define (bin-directory input-name)
1576 (string-append (assoc-ref inputs input-name) "/bin"))
1579 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1582 (copy-recursively "." share)
1584 ;; fgallery copies files from store when it is run. The
1585 ;; read-only permissions from the store directories will cause
1586 ;; fgallery to fail. Do not preserve file attributes when
1587 ;; copying files to prevent it.
1590 "'cp', '--no-preserve=all'"))
1593 (symlink script (string-append out "/bin/fgallery"))
1595 (wrap-program script
1597 ,(map bin-directory '("imagemagick"
1605 `("PERL5LIB" ":" prefix (,perl5lib)))
1608 `(("unzip" ,unzip)))
1609 ;; TODO: Add missing optional dependency: facedetect.
1611 `(("imagemagick" ,imagemagick)
1614 ("libjpeg" ,libjpeg-turbo)
1617 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1618 ("perl-image-exiftool" ,perl-image-exiftool)
1619 ("jpegoptim" ,jpegoptim)
1620 ("pngcrush" ,pngcrush)
1622 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1623 (synopsis "Static photo gallery generator")
1625 "FGallery is a static, JavaScript photo gallery generator with minimalist
1626 look. The result can be uploaded on any web server without additional
1628 (license license:gpl2+)))
1630 (define-public opensubdiv
1637 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1638 (commit (string-append "v" (string-join (string-split version #\.)
1640 (file-name (git-file-name name version))
1643 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1644 (build-system cmake-build-system)
1646 `(#:phases (modify-phases %standard-phases
1647 (add-before 'configure 'set-glew-location
1648 (lambda* (#:key inputs #:allow-other-keys)
1649 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1651 (add-before 'check 'start-xorg-server
1652 (lambda* (#:key inputs #:allow-other-keys)
1653 ;; The test suite requires a running X server.
1654 (system (string-append (assoc-ref inputs "xorg-server")
1656 (setenv "DISPLAY" ":1")
1659 `(("xorg-server" ,xorg-server-for-tests)))
1662 ("libxrandr" ,libxrandr)
1663 ("libxcursor" ,libxcursor)
1664 ("libxinerama" ,libxinerama)
1668 (home-page "https://graphics.pixar.com/opensubdiv/")
1669 (synopsis "High performance subdivision surface evaluation")
1670 (description "OpenSubdiv is a set of libraries that implement high
1671 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1672 and GPU architectures.")
1673 (license license:asl2.0)))
1675 (define-public opencsg
1676 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1684 (url "https://github.com/floriankirsch/OpenCSG")
1685 (commit (string-append "opencsg-"
1686 (string-map dot-to-dash version)
1688 (file-name (git-file-name name version))
1691 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1692 (build-system gnu-build-system)
1695 (modify-phases %standard-phases
1697 (lambda* (#:key outputs #:allow-other-keys)
1698 (substitute* "src/Makefile"
1699 (("/usr/local") (assoc-ref outputs "out")))
1701 (add-before 'build 'skip-example
1702 (lambda _ (chdir "src") #t)))))
1705 ("freeglut" ,freeglut)))
1706 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1708 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1709 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1710 For example, two shapes can be combined by uniting them, by intersecting them,
1711 or by subtracting one shape from the other.")
1712 (home-page "http://www.opencsg.org/")
1713 (license license:gpl2))))
1715 (define-public coin3D
1716 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1717 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1719 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1723 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1728 (url "https://bitbucket.org/Coin3D/coin")
1729 (changeset changeset)))
1730 (file-name (git-file-name name version))
1732 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1733 (modules '((guix build utils)))
1736 (for-each delete-file
1738 "cfg/wrapmsvc.exe"))
1740 (build-system cmake-build-system)
1742 `(("doxygen" ,doxygen)
1743 ("graphviz" ,graphviz)))
1746 ("freeglut" ,freeglut)
1751 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1752 (string-append "-DBOOST_ROOT="
1753 (assoc-ref %build-inputs "boost")))))
1754 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1756 "High-level 3D visualization library with Open Inventor 2.1 API")
1758 "Coin is a 3D graphics library with an Application Programming Interface
1759 based on the Open Inventor 2.1 API. For those who are not familiar with
1760 Open Inventor, it is a scene-graph based retain-mode rendering and model
1761 interaction library, written in C++, which has become the de facto
1762 standard graphics library for 3D visualization and visual simulation
1763 software in the scientific and engineering community.")
1764 (license license:bsd-3))))
1766 (define-public coin3D-4
1774 (url "https://github.com/coin3d/coin")
1775 (commit (string-append "Coin-" version))
1777 (file-name (git-file-name name version))
1779 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1780 (modules '((guix build utils)))
1784 (for-each delete-file
1786 "cfg/wrapmsvc.exe"))
1787 ;; Delete references to packaging tool cpack. Otherwise the build
1788 ;; fails with "add_subdirectory given source "cpack.d" which is not
1789 ;; an existing directory."
1790 (substitute* "CMakeLists.txt"
1791 ((".*cpack.d.*") ""))
1793 (build-system cmake-build-system)
1795 `(("doxygen" ,doxygen)
1796 ("graphviz" ,graphviz)))
1799 ("freeglut" ,freeglut)
1804 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1805 (string-append "-DBOOST_ROOT="
1806 (assoc-ref %build-inputs "boost")))))
1807 (home-page "https://github.com/coin3d/coin")
1809 "High-level 3D visualization library with Open Inventor 2.1 API")
1811 "Coin is a 3D graphics library with an Application Programming Interface
1812 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1813 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1814 library, written in C++, which has become the de facto standard graphics
1815 library for 3D visualization and visual simulation software in the scientific
1816 and engineering community.")
1817 (license license:bsd-3)))
1819 (define-public superfamiconv
1821 (name "superfamiconv")
1827 (url "https://github.com/Optiroc/SuperFamiconv")
1828 (commit (string-append "v" version))))
1829 (file-name (git-file-name name version))
1832 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1833 (build-system gnu-build-system)
1835 `(#:tests? #f ; no tests
1837 (modify-phases %standard-phases
1840 (lambda* (#:key outputs #:allow-other-keys)
1841 (let* ((outdir (assoc-ref outputs "out"))
1842 (bindir (string-append outdir "/bin")))
1843 (install-file "bin/superfamiconv" bindir)
1845 (home-page "https://github.com/Optiroc/SuperFamiconv")
1846 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1847 and PC Engine formats")
1848 (description "SuperFamiconv is a converter for tiled graphics, supporting
1849 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1850 Automated palette selection is supported.")
1851 (license license:expat)))
1853 (define-public drawpile
1854 ;; This commit fix building with libmicrohttpd>=0.71.
1855 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1859 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1863 (url "https://github.com/drawpile/Drawpile")
1865 (file-name (git-file-name name version))
1868 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1869 (build-system qt-build-system)
1872 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1874 `(("extra-cmake-modules" ,extra-cmake-modules)
1875 ("pkg-config" ,pkg-config)))
1877 `(("giflib" ,giflib)
1878 ("karchive" ,karchive)
1880 ("libmicrohttpd" ,libmicrohttpd)
1881 ("libsodium" ,libsodium)
1884 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1886 ("qtkeychain" ,qtkeychain)
1887 ("qtmultimedia" ,qtmultimedia)
1889 ("qtx11extras" ,qtx11extras)))
1890 (home-page "https://drawpile.net")
1891 (synopsis "Collaborative drawing program")
1892 (description "Drawpile is a drawing program that allows share the canvas
1893 with other users in real time.
1895 Some feature highlights:
1897 @item Shared canvas using the built-in server or a dedicated server
1898 @item Record, play back and export drawing sessions
1899 @item Simple animation support
1900 @item Layers and blending modes
1902 @item Supports pressure sensitive Wacom tablets
1904 @item Supports OpenRaster file format
1905 @item Encrypted connections using SSL
1906 @item Automatic port forwarding with UPnP
1908 (license license:gpl3+))))