gnu: emacspeak: Fix Tclx and espeak server loading.
[jackhill/guix/guix.git] / gnu / packages / graphics.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018, 2021 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019, 2020 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
24 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
25 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
26 ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
27 ;;; Copyright © 2021 Andy Tai <atai@atai.org>
28 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
29 ;;;
30 ;;; This file is part of GNU Guix.
31 ;;;
32 ;;; GNU Guix is free software; you can redistribute it and/or modify it
33 ;;; under the terms of the GNU General Public License as published by
34 ;;; the Free Software Foundation; either version 3 of the License, or (at
35 ;;; your option) any later version.
36 ;;;
37 ;;; GNU Guix is distributed in the hope that it will be useful, but
38 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 ;;; GNU General Public License for more details.
41 ;;;
42 ;;; You should have received a copy of the GNU General Public License
43 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45 (define-module (gnu packages graphics)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages algebra)
48 #:use-module (gnu packages audio)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bash)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages boost)
54 #:use-module (gnu packages cdrom)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages crypto)
58 #:use-module (gnu packages datastructures)
59 #:use-module (gnu packages documentation)
60 #:use-module (gnu packages flex)
61 #:use-module (gnu packages fonts)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages freedesktop)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages ghostscript)
66 #:use-module (gnu packages gl)
67 #:use-module (gnu packages glib)
68 #:use-module (gnu packages gnome)
69 #:use-module (gnu packages gnunet)
70 #:use-module (gnu packages graphviz)
71 #:use-module (gnu packages gstreamer)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages haskell-xyz)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages image-processing)
76 #:use-module (gnu packages imagemagick)
77 #:use-module (gnu packages jemalloc)
78 #:use-module (gnu packages kde-frameworks)
79 #:use-module (gnu packages libusb)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages lua)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages mp3)
84 #:use-module (gnu packages multiprecision)
85 #:use-module (gnu packages pdf)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages photo)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages plotutils)
90 #:use-module (gnu packages pretty-print)
91 #:use-module (gnu packages pth)
92 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
93 #:use-module (gnu packages python)
94 #:use-module (gnu packages python-xyz)
95 #:use-module (gnu packages qt)
96 #:use-module (gnu packages readline)
97 #:use-module (gnu packages sdl)
98 #:use-module (gnu packages stb)
99 #:use-module (gnu packages swig)
100 #:use-module (gnu packages tbb)
101 #:use-module (gnu packages upnp)
102 #:use-module (gnu packages video)
103 #:use-module (gnu packages vulkan)
104 #:use-module (gnu packages xiph)
105 #:use-module (gnu packages xml)
106 #:use-module (gnu packages xorg)
107 #:use-module (gnu packages xdisorg)
108 #:use-module (guix build-system copy)
109 #:use-module (guix build-system cmake)
110 #:use-module (guix build-system gnu)
111 #:use-module (guix build-system meson)
112 #:use-module (guix build-system python)
113 #:use-module (guix build-system qt)
114 #:use-module (guix download)
115 #:use-module (guix git-download)
116 #:use-module (guix hg-download)
117 #:use-module ((guix licenses) #:prefix license:)
118 #:use-module (guix packages)
119 #:use-module (guix utils))
120
121 (define-public eglexternalplatform
122 (package
123 (name "eglexternalplatform")
124 (version "1.1")
125 (source
126 (origin
127 (method git-fetch)
128 (uri
129 (git-reference
130 (url "https://github.com/NVIDIA/eglexternalplatform")
131 (commit version)))
132 (file-name
133 (git-file-name name version))
134 (sha256
135 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
136 (build-system copy-build-system)
137 (arguments
138 `(#:phases
139 (modify-phases %standard-phases
140 (add-after 'unpack 'patch-pkgconfig
141 (lambda* (#:key outputs #:allow-other-keys)
142 (substitute* "eglexternalplatform.pc"
143 (("/usr")
144 (assoc-ref outputs "out")))
145 #t))
146 (add-after 'install 'revise
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let* ((out (assoc-ref outputs "out")))
149 (mkdir-p (string-append out "/include/EGL"))
150 (rename-file
151 (string-append out "/interface")
152 (string-append out "/include/EGL"))
153 (mkdir-p (string-append out "/share/pkgconfig"))
154 (rename-file
155 (string-append out "/eglexternalplatform.pc")
156 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
157 (for-each delete-file-recursively
158 (list
159 (string-append out "/samples")
160 (string-append out "/COPYING")
161 (string-append out "/README.md"))))
162 #t)))))
163 (synopsis "EGL External Platform interface")
164 (description "EGLExternalPlatform is an specification of the EGL External
165 Platform interface for writing EGL platforms and their interactions with modern
166 window systems on top of existing low-level EGL platform implementations. This
167 keeps window system implementation specifics out of EGL drivers by using
168 application-facing EGL functions.")
169 (home-page "https://github.com/NVIDIA/eglexternalplatform")
170 (license license:expat)))
171
172 (define-public egl-wayland
173 (package
174 (name "egl-wayland")
175 (version "1.1.6")
176 (source
177 (origin
178 (method git-fetch)
179 (uri
180 (git-reference
181 (url "https://github.com/NVIDIA/egl-wayland")
182 (commit version)))
183 (file-name
184 (git-file-name name version))
185 (sha256
186 (base32 "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk"))))
187 (build-system meson-build-system)
188 (native-inputs
189 `(("pkg-config" ,pkg-config)))
190 (inputs
191 `(("mesa" ,mesa)
192 ("wayland" ,wayland)))
193 (propagated-inputs
194 `(("eglexternalplatform" ,eglexternalplatform)))
195 (synopsis "EGLStream-based Wayland external platform")
196 (description "EGL-Wayland is an implementation of a EGL External Platform
197 library to add client-side Wayland support to EGL on top of EGLDevice and
198 EGLStream families of extensions.")
199 (home-page "https://github.com/NVIDIA/egl-wayland")
200 (license license:expat)))
201
202 (define-public mmm
203 (package
204 (name "mmm")
205 (version "0.1.1")
206 (source
207 (origin
208 (method git-fetch)
209 (uri
210 (git-reference
211 (url "https://github.com/hodefoting/mmm")
212 (commit version)))
213 (file-name
214 (git-file-name name version))
215 (sha256
216 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
217 (build-system meson-build-system)
218 (native-inputs
219 `(("luajit" ,luajit)
220 ("pkg-config" ,pkg-config)))
221 (inputs
222 `(("alsa" ,alsa-lib)
223 ("sdl" ,sdl)
224 ("sdl2" ,sdl2)))
225 (synopsis "Memory Mapped Machine")
226 (description "MMM is a shared memory protocol for virtualising access to
227 framebuffer graphics, audio output and input event.")
228 (home-page "https://github.com/hodefoting/mrg")
229 (license license:isc)))
230
231 (define-public directfb
232 (package
233 (name "directfb")
234 (version "1.7.7")
235 (source
236 (origin
237 (method git-fetch)
238 (uri
239 (git-reference
240 (url "https://github.com/deniskropp/DirectFB")
241 (commit "DIRECTFB_1_7_7")))
242 (file-name (git-file-name name version))
243 (sha256
244 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
245 (build-system gnu-build-system)
246 (arguments
247 `(#:phases
248 (modify-phases %standard-phases
249 (add-after 'unpack 'disable-configure-during-bootstrap
250 (lambda _
251 (substitute* "autogen.sh"
252 (("^.*\\$srcdir/configure.*") ""))
253 #t)))))
254 (native-inputs
255 `(("autoconf" ,autoconf)
256 ("automake" ,automake)
257 ("libtool" ,libtool)
258 ("perl" ,perl)
259 ("pkg-config" ,pkg-config)))
260 (inputs
261 `(("alsa" ,alsa-lib)
262 ("ffmpeg" ,ffmpeg)
263 ("freetype" ,freetype)
264 ("glu" ,glu)
265 ("gstreamer" ,gstreamer)
266 ("imlib2" ,imlib2)
267 ("jasper" ,jasper)
268 ("jpeg" ,libjpeg-turbo)
269 ("libcddb" ,libcddb)
270 ("libdrm" ,libdrm)
271 ("libtimidity" ,libtimidity)
272 ("linux-headers" ,linux-libre-headers)
273 ("mad" ,libmad)
274 ("mng" ,libmng)
275 ("mpeg2" ,libmpeg2)
276 ("mpeg3" ,libmpeg3)
277 ("opengl" ,mesa)
278 ("png" ,libpng)
279 ("sdl" ,sdl)
280 ("svg" ,librsvg)
281 ("tiff" ,libtiff)
282 ("tslib" ,tslib)
283 ("vdpau" ,libvdpau)
284 ("vorbisfile" ,libvorbis)
285 ("wayland" ,wayland)
286 ("webp" ,libwebp)
287 ("x11" ,libx11)
288 ("xcomposite" ,libxcomposite)
289 ("xext" ,libxext)
290 ("xproto" ,xorgproto)
291 ("zlib" ,zlib)))
292 (propagated-inputs
293 `(("flux" ,flux)))
294 (synopsis "DFB Graphics Library")
295 (description "DirectFB is a graphics library which was designed with embedded
296 systems in mind. It offers maximum hardware accelerated performance at a
297 minimum of resource usage and overhead.")
298 (home-page "https://github.com/deniskropp/DirectFB")
299 (license license:lgpl2.1+)))
300
301 (define-public flux
302 (package
303 (name "flux")
304 (version "1.4.4")
305 (source
306 (origin
307 (method git-fetch)
308 (uri
309 (git-reference
310 (url "https://github.com/deniskropp/flux")
311 (commit "e45758a")))
312 (file-name (git-file-name name version))
313 (sha256
314 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
315 (build-system gnu-build-system)
316 (native-inputs
317 `(("autoconf" ,autoconf)
318 ("automake" ,automake)
319 ("libtool" ,libtool)
320 ("pkg-config" ,pkg-config)))
321 (synopsis "Interface description language")
322 (description "Flux is an interface description language used by DirectFB.
323 Fluxcomp compiles .flux files to .cpp or .c files.")
324 (home-page "https://www.directfb.org/")
325 (license license:lgpl2.1+))) ; Same as DirectFB
326
327 (define-public fox
328 (package
329 (name "fox")
330 (version "1.6.57")
331 (source
332 (origin
333 (method url-fetch)
334 (uri
335 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
336 (sha256
337 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
338 (build-system gnu-build-system)
339 (arguments
340 `(#:phases
341 (modify-phases %standard-phases
342 (add-after 'unpack 'patch
343 (lambda _
344 (substitute* "configure"
345 (("-I/usr/include/freetype2")
346 (string-append "-I"
347 (string-append
348 (assoc-ref %build-inputs "freetype")
349 "/include/freetype2"))))
350 #t)))))
351 (native-inputs
352 `(("doxygen" ,doxygen)))
353 (inputs
354 `(("bzip2" ,lbzip2)
355 ("freetype" ,freetype)
356 ("gl" ,mesa)
357 ("glu" ,glu)
358 ("jpeg" ,libjpeg-turbo)
359 ("png" ,libpng)
360 ("tiff" ,libtiff)
361 ("x11" ,libx11)
362 ("xcursor" ,libxcursor)
363 ("xext" ,libxext)
364 ("xfixes" ,libxfixes)
365 ("xft" ,libxft)
366 ("xinput" ,libxi)
367 ("xrandr" ,libxrandr)
368 ("xrender" ,libxrender)
369 ("xshm" ,libxshmfence)
370 ("zlib" ,zlib)))
371 (synopsis "Widget Toolkit for building GUI")
372 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
373 Graphical User Interfaces easily and effectively. It offers a wide, and
374 growing, collection of Controls, and provides state of the art facilities such
375 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
376 manipulation. FOX also implements icons, images, and user-convenience features
377 such as status line help, and tooltips. Tooltips may even be used for 3D
378 objects!")
379 (home-page "http://www.fox-toolkit.org")
380 (license license:lgpl2.1+)))
381
382 (define-public autotrace
383 (let ((commit "travis-20190624.59")
384 (version-base "0.40.0"))
385 (package
386 (name "autotrace")
387 (version (string-append version-base "-"
388 (if (string-prefix? "travis-" commit)
389 (string-drop commit 7)
390 commit)))
391 (source (origin
392 (method git-fetch)
393 (uri (git-reference
394 (url "https://github.com/autotrace/autotrace")
395 (commit commit)))
396 (file-name (git-file-name name version))
397 (sha256
398 (base32
399 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
400 (build-system gnu-build-system)
401 (arguments
402 `(#:phases (modify-phases %standard-phases
403 ;; See: https://github.com/autotrace/autotrace/issues/27.
404 (add-after 'unpack 'include-spline.h-header
405 (lambda _
406 (substitute* "Makefile.am"
407 ((".*src/types.h.*" all)
408 (string-append all "\t\tsrc/spline.h \\\n")))
409 #t))
410 ;; See: https://github.com/autotrace/autotrace/issues/26.
411 (replace 'check
412 (lambda _
413 (invoke "sh" "tests/runtests.sh"))))))
414 (native-inputs
415 `(("which" ,which)
416 ("pkg-config" ,pkg-config)
417 ("autoconf" ,autoconf)
418 ("automake" ,automake)
419 ("intltool" ,intltool)
420 ("libtool" ,libtool)
421 ("gettext" ,gettext-minimal)))
422 (inputs
423 `(("glib" ,glib)
424 ("libjpeg" ,libjpeg-turbo)
425 ("libpng" ,libpng)
426 ("imagemagick" ,imagemagick)
427 ("pstoedit" ,pstoedit)))
428 (home-page "https://github.com/autotrace/autotrace")
429 (synopsis "Bitmap to vector graphics converter")
430 (description "AutoTrace is a utility for converting bitmap into vector
431 graphics. It can trace outlines and midlines, effect color reduction or
432 despeckling and has support for many input and output formats. It can be used
433 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
434 (license (list license:gpl2+ ;for the utility itself
435 license:lgpl2.1+))))) ;for use as a library
436
437 (define-public embree
438 (package
439 (name "embree")
440 (version "3.12.1")
441 (source (origin
442 (method git-fetch)
443 (uri (git-reference
444 (url "https://github.com/embree/embree")
445 (commit (string-append "v" version))))
446 (file-name (git-file-name name version))
447 (sha256
448 (base32
449 "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
450 (build-system cmake-build-system)
451 (arguments
452 `(#:tests? #f ; no tests (apparently)
453 #:configure-flags
454 (list
455 "-DEMBREE_ISPC_SUPPORT=OFF")))
456 (inputs
457 `(("tbb" ,tbb)
458 ("glfw" ,glfw)))
459 (home-page "https://www.embree.org/")
460 (synopsis "High performance ray tracing kernels")
461 (description
462 "Embree is a collection of high-performance ray tracing kernels.
463 Embree is meant to increase performance of photo-realistic rendering
464 applications.")
465 (license license:asl2.0)))
466
467 (define-public openvdb
468 (package
469 (name "openvdb")
470 (version "8.0.1")
471 (source (origin
472 (method git-fetch)
473 (uri (git-reference
474 (url "https://github.com/AcademySoftwareFoundation/openvdb/")
475 (commit (string-append "v" version))
476 (recursive? #t)))
477 (file-name (git-file-name name version))
478 (sha256
479 (base32
480 "0qzx6l5c183k6j9zki31gg9aixf5s1j46wdi7wr1h3bz7k53syg9"))))
481 (build-system cmake-build-system)
482 (arguments
483 `(#:configure-flags
484 (list (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
485 (assoc-ref %outputs "out") "/lib"))))
486 (inputs
487 `(("boost" ,boost)
488 ("c-blosc" ,c-blosc)
489 ("ilmbase" ,ilmbase)
490 ("tbb" ,tbb)
491 ("zlib" ,zlib)))
492 (native-inputs
493 `(("pkg-config" ,pkg-config)))
494 (home-page "https://www.openvdb.org/")
495 (synopsis "Sparse volume data structure and tools")
496 (description "OpenVDB is a C++ library comprising a hierarchical data
497 structure and a large suite of tools for the efficient storage and
498 manipulation of sparse volumetric data discretized on three-dimensional grids.
499 It was developed by DreamWorks Animation for use in volumetric applications
500 typically encountered in feature film production.")
501 (license license:mpl2.0)))
502
503 (define-public blender
504 (package
505 (name "blender")
506 (version "2.91.0")
507 (source (origin
508 (method url-fetch)
509 (uri (string-append "https://download.blender.org/source/"
510 "blender-" version ".tar.xz"))
511 (sha256
512 (base32
513 "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm"))))
514 (build-system cmake-build-system)
515 (arguments
516 (let ((python-version (version-major+minor (package-version python))))
517 `(;; Test files are very large and not included in the release tarball.
518 #:tests? #f
519 #:configure-flags
520 (list "-DWITH_CODEC_FFMPEG=ON"
521 "-DWITH_CODEC_SNDFILE=ON"
522 "-DWITH_CYCLES=ON"
523 "-DWITH_DOC_MANPAGE=ON"
524 "-DWITH_FFTW3=ON"
525 "-DWITH_IMAGE_OPENJPEG=ON"
526 "-DWITH_INPUT_NDOF=ON"
527 "-DWITH_INSTALL_PORTABLE=OFF"
528 "-DWITH_JACK=ON"
529 "-DWITH_MOD_OCEANSIM=ON"
530 "-DWITH_OPENVDB=ON"
531 "-DWITH_OPENSUBDIV=ON"
532 "-DWITH_PYTHON_INSTALL=OFF"
533 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
534 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
535 "/lib")
536 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
537 "/include/python" ,python-version)
538 (string-append "-DPYTHON_VERSION=" ,python-version)
539 (string-append "-DPYTHON_NUMPY_PATH="
540 (assoc-ref %build-inputs "python-numpy")
541 "/lib/python" ,python-version "/site-packages/"))
542 #:phases
543 (modify-phases %standard-phases
544 ;; XXX This file doesn't exist in the Git sources but will probably
545 ;; exist in the eventual 2.80 source tarball.
546 (add-after 'unpack 'fix-broken-import
547 (lambda _
548 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
549 (("import encode_bin") "from . import encode_bin"))
550 #t))
551 (add-after 'set-paths 'add-ilmbase-include-path
552 (lambda* (#:key inputs #:allow-other-keys)
553 ;; OpenEXR propagates ilmbase, but its include files do not appear
554 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
555 ;; the CPATH to satisfy the dependency on "half.h".
556 (setenv "CPATH"
557 (string-append (assoc-ref inputs "ilmbase")
558 "/include/OpenEXR"
559 ":" (or (getenv "CPATH") "")))
560 #t))))))
561 (inputs
562 `(("boost" ,boost)
563 ("jemalloc" ,jemalloc)
564 ("libx11" ,libx11)
565 ("libxi" ,libxi)
566 ("libxrender" ,libxrender)
567 ("opencolorio" ,opencolorio)
568 ("openimageio" ,openimageio)
569 ("openexr" ,openexr)
570 ("opensubdiv" ,opensubdiv)
571 ("ilmbase" ,ilmbase)
572 ("openjpeg" ,openjpeg)
573 ("libjpeg" ,libjpeg-turbo)
574 ("libpng" ,libpng)
575 ("libtiff" ,libtiff)
576 ("ffmpeg" ,ffmpeg)
577 ("fftw" ,fftw)
578 ("jack" ,jack-1)
579 ("libsndfile" ,libsndfile)
580 ("freetype" ,freetype)
581 ("glew" ,glew)
582 ("openal" ,openal)
583 ("pugixml" ,pugixml)
584 ("python" ,python)
585 ("python-numpy" ,python-numpy)
586 ("openvdb" ,openvdb)
587 ("tbb" ,tbb)
588 ("zlib" ,zlib)
589 ("embree" ,embree)))
590 (home-page "https://blender.org/")
591 (synopsis "3D graphics creation suite")
592 (description
593 "Blender is a 3D graphics creation suite. It supports the entirety of
594 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
595 compositing and motion tracking, even video editing and game creation. The
596 application can be customized via its API for Python scripting.")
597 (license license:gpl2+)))
598
599 (define-public blender-2.79
600 (package
601 (name "blender")
602 (version "2.79b")
603 (source (origin
604 (method url-fetch)
605 (uri (string-append "https://download.blender.org/source/"
606 "blender-" version ".tar.gz"))
607 (sha256
608 (base32
609 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
610 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
611 "blender-2.79-oiio2.patch"
612 ;; The following patches may be
613 ;; needed when the default GCC is
614 ;; updated:
615 ;; "blender-2.79-gcc8.patch"
616 ;; "blender-2.79-gcc9.patch"
617 "blender-2.79-python-3.7-fix.patch"
618 "blender-2.79-python-3.8-fix.patch"))))
619 (build-system cmake-build-system)
620 (arguments
621 (let ((python-version (version-major+minor (package-version python))))
622 `(;; Test files are very large and not included in the release tarball.
623 #:tests? #f
624 #:configure-flags
625 (list "-DWITH_CODEC_FFMPEG=ON"
626 "-DWITH_CODEC_SNDFILE=ON"
627 "-DWITH_CYCLES=ON"
628 "-DWITH_DOC_MANPAGE=ON"
629 "-DWITH_FFTW3=ON"
630 "-DWITH_GAMEENGINE=ON"
631 "-DWITH_IMAGE_OPENJPEG=ON"
632 "-DWITH_INPUT_NDOF=ON"
633 "-DWITH_INSTALL_PORTABLE=OFF"
634 "-DWITH_JACK=ON"
635 "-DWITH_MOD_OCEANSIM=ON"
636 "-DWITH_PLAYER=ON"
637 "-DWITH_PYTHON_INSTALL=OFF"
638 "-DWITH_PYTHON_INSTALL=OFF"
639 "-DWITH_SYSTEM_OPENJPEG=ON"
640 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
641 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
642 "/lib")
643 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
644 "/include/python" ,python-version)
645 (string-append "-DPYTHON_VERSION=" ,python-version))
646 #:phases
647 (modify-phases %standard-phases
648 (add-after 'unpack 'fix-broken-import
649 (lambda _
650 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
651 (("import encode_bin") "from . import encode_bin"))
652 #t))
653 (add-after 'set-paths 'add-ilmbase-include-path
654 (lambda* (#:key inputs #:allow-other-keys)
655 ;; OpenEXR propagates ilmbase, but its include files do not appear
656 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
657 ;; the CPATH to satisfy the dependency on "half.h".
658 (setenv "CPATH"
659 (string-append (assoc-ref inputs "ilmbase")
660 "/include/OpenEXR"
661 ":" (or (getenv "CPATH") "")))
662 #t))))))
663 (inputs
664 `(("boost" ,boost)
665 ("jemalloc" ,jemalloc)
666 ("libx11" ,libx11)
667 ("opencolorio" ,opencolorio)
668 ("openimageio" ,openimageio)
669 ("openexr" ,openexr)
670 ("ilmbase" ,ilmbase)
671 ("openjpeg" ,openjpeg)
672 ("libjpeg" ,libjpeg-turbo)
673 ("libpng" ,libpng)
674 ("libtiff" ,libtiff)
675 ("ffmpeg" ,ffmpeg)
676 ("fftw" ,fftw)
677 ("jack" ,jack-1)
678 ("libsndfile" ,libsndfile)
679 ("freetype" ,freetype)
680 ("glew" ,glew)
681 ("openal" ,openal)
682 ("pugixml" ,pugixml)
683 ("python" ,python)
684 ("zlib" ,zlib)))
685 (home-page "https://blender.org/")
686 (synopsis "3D graphics creation suite")
687 (description
688 "Blender is a 3D graphics creation suite. It supports the entirety of
689 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
690 compositing and motion tracking, even video editing and game creation. The
691 application can be customized via its API for Python scripting.
692
693 NOTE: This older version of Blender is the last release that does not require
694 OpenGL 3. It is retained for use with older computers.")
695 (license license:gpl2+)))
696
697 (define-public goxel
698 (package
699 (name "goxel")
700 (version "0.10.7")
701 (source (origin
702 (method git-fetch)
703 (uri (git-reference
704 (url "https://github.com/guillaumechereau/goxel")
705 (commit (string-append "v" version))))
706 (file-name (git-file-name name version))
707 (sha256
708 (base32
709 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
710 (build-system gnu-build-system)
711 (arguments
712 '(#:tests? #f
713 #:phases (modify-phases %standard-phases (delete 'configure))
714 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
715 "release")))
716 (native-inputs
717 `(("pkg-config" ,pkg-config)))
718 (inputs
719 `(("gtk3" ,gtk+)
720 ("glfw" ,glfw)
721 ("scons" ,scons)))
722 (home-page "https://goxel.xyz/")
723 (synopsis "Voxel editor")
724 (description
725 "Goxel is a voxel editor that features unlimited scene size, unlimited
726 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
727 and export to various formats including the format used by Magicavoxel.")
728 (license license:gpl3+)))
729
730 (define-public assimp
731 (package
732 (name "assimp")
733 (version "4.1.0")
734 (source (origin
735 (method git-fetch)
736 (uri (git-reference
737 (url "https://github.com/assimp/assimp")
738 (commit (string-append "v" version))))
739 (file-name (git-file-name name version))
740 (sha256
741 (base32
742 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
743 (build-system cmake-build-system)
744 (inputs
745 `(("zlib" ,zlib)))
746 (home-page "http://www.assimp.org/")
747 (synopsis "Asset import library")
748 (description
749 "The Open Asset Import Library loads more than 40 3D file formats into
750 one unified data structure. Additionally, assimp features various mesh post
751 processing tools: normals and tangent space generation, triangulation, vertex
752 cache locality optimization, removal of degenerate primitives and duplicate
753 vertices, sorting by primitive type, merging of redundant materials and many
754 more.")
755 (license license:bsd-3)))
756
757 (define-public cgal
758 (package
759 (name "cgal")
760 (version "5.2.1")
761 (source (origin
762 (method url-fetch)
763 (uri (string-append
764 "https://github.com/CGAL/cgal/releases/download/v" version
765 "/CGAL-" version ".tar.xz"))
766 (sha256
767 (base32
768 "1rhrpjsp4081nn2q215h78kc4msrj0081zg65k1gfp5hl88bg03y"))))
769 (build-system cmake-build-system)
770 (arguments
771 '(#:tests? #f)) ; no test target
772 (inputs
773 `(("mpfr" ,mpfr)
774 ("gmp" ,gmp)
775 ("boost" ,boost)))
776 (home-page "https://www.cgal.org/")
777 (synopsis "Computational geometry algorithms library")
778 (description
779 "CGAL provides easy access to efficient and reliable geometric algorithms
780 in the form of a C++ library. CGAL is used in various areas needing geometric
781 computation, such as: computer graphics, scientific visualization, computer
782 aided design and modeling, geographic information systems, molecular biology,
783 medical imaging, robotics and motion planning, mesh generation, numerical
784 methods, etc. It provides data structures and algorithms such as
785 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
786 many more.")
787
788 ;; The 'LICENSE' file explains that a subset is available under more
789 ;; permissive licenses.
790 (license license:gpl3+)))
791
792 (define-public ilmbase
793 (package
794 (name "ilmbase")
795 (version "2.5.5")
796 (source (origin
797 (method git-fetch)
798 (uri (git-reference
799 (url "https://github.com/openexr/openexr")
800 (commit (string-append "v" version))))
801 (file-name (git-file-name "ilmbase" version))
802 (sha256
803 (base32
804 "0mjzb3fd8b9pcqmrgy5cdsmvqd70hmlvjnfypi66v59h3fhrmgd8"))
805 (patches (search-patches "ilmbase-fix-tests.patch"))))
806 (build-system cmake-build-system)
807 (arguments
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'change-directory
810 (lambda _
811 (chdir "IlmBase")
812 #t)))))
813 (home-page "https://www.openexr.com/")
814 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
815 (description
816 "IlmBase provides several utility libraries for C++. Half is a class
817 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
818 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
819 quaternions and other useful 2D and 3D math functions. Iex is an
820 exception-handling library.")
821 (license license:bsd-3)))
822
823 (define-public lib2geom
824 ;; Use the latest master commit, as the 1.0 release suffer build problems.
825 (let ((revision "3")
826 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
827 (package
828 (name "lib2geom")
829 (version (git-version "1.0" revision commit))
830 (source (origin
831 (method git-fetch)
832 (uri (git-reference
833 (url "https://gitlab.com/inkscape/lib2geom.git")
834 (commit commit)))
835 (file-name (git-file-name name version))
836 (sha256
837 (base32
838 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
839 (patches
840 ;; Patch submitted to upstream (see:
841 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
842 (search-patches "lib2geom-fix-tests.patch"))
843 (modules '((guix build utils)))
844 (snippet
845 '(begin
846 ;; Fix py2geom module initialization (see:
847 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
848 (substitute* "src/py2geom/__init__.py"
849 (("_py2geom") "py2geom._py2geom"))
850 #t))))
851 (build-system cmake-build-system)
852 (arguments
853 `(#:imported-modules ((guix build python-build-system)
854 ,@%cmake-build-system-modules)
855 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
856 "-D2GEOM_BOOST_PYTHON=ON"
857 ;; Compiling the Cython bindings fail (see:
858 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
859 "-D2GEOM_CYTHON_BINDINGS=OFF")
860 #:phases
861 (modify-phases %standard-phases
862 (add-after 'unpack 'patch-python-lib-install-path
863 (lambda* (#:key inputs outputs #:allow-other-keys)
864 (let* ((python-version (@ (guix build python-build-system)
865 python-version))
866 (python-maj-min-version (python-version
867 (assoc-ref inputs "python")))
868 (site-package (string-append
869 (assoc-ref outputs "out")
870 "/lib/python" python-maj-min-version
871 "/site-packages")))
872 (substitute* '("src/cython/CMakeLists.txt"
873 "src/py2geom/CMakeLists.txt")
874 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
875 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
876 #t)))))
877 (native-inputs `(("python" ,python-wrapper)
878 ("googletest" ,googletest)
879 ("pkg-config" ,pkg-config)))
880 (inputs `(("cairo" ,cairo)
881 ("pycairo" ,python-pycairo)
882 ("double-conversion" ,double-conversion)
883 ("glib" ,glib)
884 ("gsl" ,gsl)))
885 (propagated-inputs
886 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
887 (home-page "https://gitlab.com/inkscape/lib2geom/")
888 (synopsis "C++ 2D graphics library")
889 (description "2geom is a C++ library of mathematics for paths, curves,
890 and other geometric calculations. Designed for vector graphics, it tackles
891 Bézier curves, conic sections, paths, intersections, transformations, and
892 basic geometries.")
893 ;; Because the library is linked with the GNU Scientific Library
894 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
895 ;; https://gitlab.com/inkscape/inkscape/issues/784).
896 (license license:gpl3+))))
897
898 (define-public pstoedit
899 (package
900 (name "pstoedit")
901 (version "3.75")
902 (source (origin
903 (method url-fetch)
904 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
905 version "/pstoedit-" version ".tar.gz"))
906 (sha256
907 (base32
908 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
909 (build-system gnu-build-system)
910 (native-inputs
911 `(("pkg-config" ,pkg-config)))
912 (inputs
913 `(("ghostscript" ,ghostscript)
914 ("imagemagick" ,imagemagick)
915 ("libplot" ,plotutils)
916 ("libjpeg" ,libjpeg-turbo)
917 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
918 (home-page "http://www.pstoedit.net/")
919 (synopsis "Converter for PostScript and PDF graphics")
920 (description "The @code{pstoedit} utility allows translating graphics
921 in the PostScript or PDF (Portable Document Format) formats to various
922 other vector formats such as:
923 @itemize
924 @item Tgif (.obj)
925 @item gnuplot
926 @item xfig (.fig)
927 @item Flattened PostScript
928 @item DXF, a CAD (Computed-Aided Design) exchange format
929 @item PIC (for troff/groff)
930 @item MetaPost (for usage with TeX/LaTeX)
931 @item LaTeX2e picture
932 @item GNU Metafile (for use with plotutils/libplot)
933 @item Any format supported by ImageMagick
934 @end itemize")
935 (license license:gpl2+)))
936
937 (define-public dear-imgui
938 (package
939 (name "dear-imgui")
940 (version "1.79")
941 (source
942 (origin
943 (method git-fetch)
944 (uri (git-reference
945 (url "https://github.com/ocornut/imgui")
946 (commit (string-append "v" version))))
947 (file-name (git-file-name name version))
948 (sha256
949 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
950 (build-system gnu-build-system)
951 (arguments
952 `(#:make-flags
953 (list (string-append "CC=" ,(cc-for-target))
954 (string-append "PREFIX=" (assoc-ref %outputs "out"))
955 (string-append "VERSION=" ,version))
956 #:tests? #f ; no test suite
957 #:phases
958 (modify-phases %standard-phases
959 (add-after 'unpack 'unpack-debian-files
960 (lambda* (#:key inputs #:allow-other-keys)
961 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
962 (apply invoke "patch" "-Np1" "-i"
963 (find-files "debian/patches" "\\.patch$"))
964 (substitute* "Makefile"
965 (("<stb/") "<") ; Guix doesn't use this subdirectory
966 ;; Don't build or install the static library.
967 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
968 (substitute* (list "imgui.pc.in"
969 "Makefile")
970 ;; Don't link against a non-existent library.
971 (("-lstb") ""))
972 #t))
973 (delete 'configure) ; no configure script
974 (replace 'install
975 ;; The default ‘install’ target installs the static library. Don't.
976 (lambda* (#:key make-flags #:allow-other-keys)
977 (apply invoke "make" "install-shared" "install-header"
978 make-flags))))))
979 (native-inputs
980 `(("debian-files"
981 ;; Upstream doesn't provide a build system. Use Debian's.
982 ,(origin
983 (method url-fetch)
984 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
985 version "+ds-1.debian.tar.xz"))
986 (sha256
987 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
988 ("pkg-config" ,pkg-config)))
989 (inputs
990 `(("freetype" ,freetype)
991 ("stb-rect-pack" ,stb-rect-pack)
992 ("stb-truetype" ,stb-truetype)))
993 (home-page "https://github.com/ocornut/imgui")
994 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
995 (description
996 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
997 It creates optimized vertex buffers that you can render anytime in your
998 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
999 self-contained, without external dependencies.
1000
1001 Dear ImGui is aimed at content creation, visualization, and debugging tools as
1002 opposed to average end-user interfaces. Hence it favors simplicity and
1003 productivity but lacks certain features often found in higher-level libraries.
1004 It is particularly suited to integration in game engine tooling, real-time 3D
1005 applications, full-screen applications, and embedded platforms without standard
1006 operating system features.")
1007 (license license:expat))) ; some examples/ use the zlib licence
1008
1009 (define-public ogre
1010 (package
1011 (name "ogre")
1012 (version "1.12.9")
1013 (source
1014 (origin
1015 (method git-fetch)
1016 (uri (git-reference
1017 (url "https://github.com/OGRECave/ogre")
1018 (commit (string-append "v" version))))
1019 (file-name (git-file-name name version))
1020 (sha256
1021 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
1022 (build-system cmake-build-system)
1023 (arguments
1024 '(#:phases
1025 (modify-phases %standard-phases
1026 (add-before 'configure 'unpack-dear-imgui
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (copy-recursively (assoc-ref inputs "dear-imgui-source")
1029 "../dear-imgui-source")
1030 #t))
1031 (add-before 'configure 'pre-configure
1032 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1033 ;; a consequence, we cannot suggest ours in configure flags. Fix
1034 ;; it.
1035 (lambda* (#:key inputs outputs #:allow-other-keys)
1036 (substitute* "CMakeLists.txt"
1037 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1038 #t)))
1039 #:configure-flags
1040 (let* ((out (assoc-ref %outputs "out"))
1041 (runpath
1042 (string-join (list (string-append out "/lib")
1043 (string-append out "/lib/OGRE"))
1044 ";")))
1045 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1046 "-DIMGUI_DIR=../dear-imgui-source"
1047 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1048 "-DOGRE_BUILD_TESTS=TRUE"
1049 "-DOGRE_INSTALL_DOCS=TRUE"
1050 "-DOGRE_INSTALL_SAMPLES=TRUE"
1051 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1052 (native-inputs
1053 `(("boost" ,boost)
1054 ("dear-imgui-source" ,(package-source dear-imgui))
1055 ("doxygen" ,doxygen)
1056 ("googletest" ,googletest-1.8)
1057 ("pkg-config" ,pkg-config)))
1058 (inputs
1059 `(("font-dejavu" ,font-dejavu)
1060 ("freeimage" ,freeimage)
1061 ("freetype" ,freetype)
1062 ("glu" ,glu)
1063 ("libxaw" ,libxaw)
1064 ("libxrandr" ,libxrandr)
1065 ("pugixml" ,pugixml)
1066 ("sdl2" ,sdl2)
1067 ("tinyxml" ,tinyxml)
1068 ("zziplib" ,zziplib)))
1069 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1070 (description
1071 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1072 flexible 3D engine written in C++ designed to make it easier and more intuitive
1073 for developers to produce applications utilising hardware-accelerated 3D
1074 graphics.")
1075 (home-page "https://www.ogre3d.org/")
1076 (license license:expat)))
1077
1078 (define-public openexr
1079 (package
1080 (name "openexr")
1081 (version (package-version ilmbase))
1082 (source (origin
1083 (inherit (package-source ilmbase))
1084 (file-name (git-file-name "openexr" version))
1085 (modules '((guix build utils)))
1086 (snippet
1087 '(begin
1088 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1089 (("\"/var/tmp/\"")
1090 "\"/tmp/\""))
1091 #t))))
1092 (build-system cmake-build-system)
1093 (arguments
1094 `(#:phases
1095 (modify-phases %standard-phases
1096 (add-after 'unpack 'change-directory
1097 (lambda _
1098 (chdir "OpenEXR")
1099 #t))
1100 (add-after 'change-directory 'increase-test-timeout
1101 (lambda _
1102 ;; On armhf-linux, we need to override the CTest default
1103 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1104 (substitute* "IlmImfTest/CMakeLists.txt"
1105 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1106 (string-append
1107 all
1108 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1109 #t))
1110 ,@(if (not (target-64bit?))
1111 `((add-after 'change-directory 'disable-broken-test
1112 ;; This test fails on i686. Upstream developers suggest that
1113 ;; this test is broken on i686 and can be safely disabled:
1114 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1115 (lambda _
1116 (substitute* "IlmImfTest/main.cpp"
1117 ((".*testOptimizedInterleavePatterns.*") ""))
1118 #t)))
1119 '()))))
1120 (native-inputs
1121 `(("pkg-config" ,pkg-config)))
1122 (propagated-inputs
1123 `(("ilmbase" ,ilmbase) ;used in public headers
1124 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1125 (home-page "https://www.openexr.com/")
1126 (synopsis "High-dynamic range file format library")
1127 (description
1128 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1129 use in computer imaging applications. The IlmImf C++ libraries support
1130 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1131 (license license:bsd-3)))
1132
1133 (define-public openimageio
1134 (package
1135 (name "openimageio")
1136 (version "2.2.10.1")
1137 (source (origin
1138 (method git-fetch)
1139 (uri (git-reference
1140 (url "https://github.com/OpenImageIO/oiio")
1141 (commit (string-append "Release-" version))))
1142 (file-name (git-file-name name version))
1143 (sha256
1144 (base32
1145 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1146 (build-system cmake-build-system)
1147 ;; FIXME: To run all tests successfully, test image sets from multiple
1148 ;; third party sources have to be present. For details see
1149 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1150 (arguments
1151 `(#:tests? #f
1152 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1153 (native-inputs
1154 `(("pkg-config" ,pkg-config)))
1155 (inputs
1156 `(("boost" ,boost)
1157 ("fmt" ,fmt)
1158 ("libpng" ,libpng)
1159 ("libjpeg" ,libjpeg-turbo)
1160 ("libtiff" ,libtiff)
1161 ("giflib" ,giflib)
1162 ("openexr" ,openexr)
1163 ("ilmbase" ,ilmbase)
1164 ("pugixml" ,pugixml)
1165 ("python" ,python-wrapper)
1166 ("pybind11" ,pybind11)
1167 ("robin-map" ,robin-map)
1168 ("zlib" ,zlib)))
1169 (synopsis "C++ library for reading and writing images")
1170 (description
1171 "OpenImageIO is a library for reading and writing images, and a bunch of
1172 related classes, utilities, and applications. There is a particular emphasis
1173 on formats and functionality used in professional, large-scale animation and
1174 visual effects work for film.")
1175 (home-page "https://www.openimageio.org")
1176 (license license:bsd-3)))
1177
1178 (define-public openscenegraph
1179 (package
1180 (name "openscenegraph")
1181 (version "3.6.5")
1182 (source
1183 (origin
1184 (method git-fetch)
1185 (uri (git-reference
1186 (url "https://github.com/openscenegraph/OpenSceneGraph")
1187 (commit (string-append "OpenSceneGraph-" version))))
1188 (sha256
1189 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1190 (file-name (git-file-name name version))))
1191 (properties
1192 `((upstream-name . "OpenSceneGraph")))
1193 (build-system cmake-build-system)
1194 (arguments
1195 `(#:tests? #f ; no test target available
1196 ;; Without this flag, 'rd' will be added to the name of the
1197 ;; library binaries and break linking with other programs.
1198 #:build-type "Release"
1199 #:configure-flags
1200 (list (string-append "-DCMAKE_INSTALL_RPATH="
1201 (assoc-ref %outputs "out") "/lib:"
1202 (assoc-ref %outputs "out") "/lib64"))))
1203 (native-inputs
1204 `(("pkg-config" ,pkg-config)
1205 ("unzip" ,unzip)))
1206 (inputs
1207 `(("giflib" ,giflib)
1208 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1209 ("jasper" ,jasper)
1210 ("librsvg" ,librsvg)
1211 ("libxrandr" ,libxrandr)
1212 ("ffmpeg" ,ffmpeg)
1213 ("mesa" ,mesa)))
1214 (synopsis "High-performance real-time graphics toolkit")
1215 (description
1216 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1217 used by application developers in fields such as visual simulation, games,
1218 virtual reality, scientific visualization and modeling.")
1219 (home-page "http://www.openscenegraph.org")
1220 ;; The 'LICENSE' file explains that the source is licensed under
1221 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1222 (license license:lgpl2.1)))
1223
1224 ;; We need this for simgear
1225 (define-public openscenegraph-3.4
1226 (package (inherit openscenegraph)
1227 (name "openscenegraph")
1228 (version "3.4.1")
1229 (source
1230 (origin
1231 (method git-fetch)
1232 (uri (git-reference
1233 (url "https://github.com/openscenegraph/OpenSceneGraph")
1234 (commit (string-append "OpenSceneGraph-" version))))
1235 (file-name (git-file-name name version))
1236 (sha256
1237 (base32
1238 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1239 (arguments
1240 (substitute-keyword-arguments (package-arguments openscenegraph)
1241 ((#:configure-flags flags)
1242 `(cons
1243 ;; The jpeg plugin requires conversion between integers and booleans
1244 "-DCMAKE_CXX_FLAGS=-fpermissive"
1245 ,flags))))
1246 (inputs
1247 `(("libjpeg" ,libjpeg-turbo)
1248 ,@(package-inputs openscenegraph)))))
1249
1250
1251 (define-public openmw-openscenegraph
1252 ;; OpenMW prefers its own fork of openscenegraph:
1253 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1254 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1255 (hidden-package
1256 (package
1257 (inherit openscenegraph)
1258 (version (git-version "3.6" "1" commit))
1259 (source
1260 (origin
1261 (method git-fetch)
1262 (uri (git-reference
1263 (url "https://github.com/OpenMW/osg/")
1264 (commit commit)))
1265 (file-name (git-file-name (package-name openscenegraph) version))
1266 (sha256
1267 (base32
1268 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1269 (arguments
1270 (substitute-keyword-arguments (package-arguments openscenegraph)
1271 ((#:configure-flags flags)
1272 ;; As per the above wiki link, the following plugins are enough:
1273 `(append
1274 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1275 "-DBUILD_OSG_PLUGIN_OSG=1"
1276 "-DBUILD_OSG_PLUGIN_DDS=1"
1277 "-DBUILD_OSG_PLUGIN_TGA=1"
1278 "-DBUILD_OSG_PLUGIN_BMP=1"
1279 "-DBUILD_OSG_PLUGIN_JPEG=1"
1280 "-DBUILD_OSG_PLUGIN_PNG=1"
1281 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1282 ;; The jpeg plugin requires conversion between integers and booleans
1283 "-DCMAKE_CXX_FLAGS=-fpermissive")
1284 ,flags))))))))
1285
1286 (define-public povray
1287 (package
1288 (name "povray")
1289 (version "3.7.0.8")
1290 (source (origin
1291 (method git-fetch)
1292 (uri (git-reference
1293 (url "https://github.com/POV-Ray/povray")
1294 (commit (string-append "v" version))))
1295 (file-name (git-file-name name version))
1296 (sha256
1297 (base32
1298 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1299 (modules '((guix build utils)))
1300 (snippet
1301 '(begin
1302 ;; Delete bundled libraries.
1303 (delete-file-recursively "libraries")
1304 #t))))
1305 (build-system gnu-build-system)
1306 (native-inputs
1307 `(("autoconf" ,autoconf)
1308 ("automake" ,automake)
1309 ("pkg-config" ,pkg-config)))
1310 (inputs
1311 `(("boost" ,boost)
1312 ("libjpeg" ,libjpeg-turbo)
1313 ("libpng" ,libpng)
1314 ("libtiff" ,libtiff)
1315 ("openexr" ,openexr)
1316 ("sdl" ,sdl)
1317 ("zlib" ,zlib)))
1318 (arguments
1319 '(#:configure-flags
1320 (list "COMPILED_BY=Guix"
1321 (string-append "--with-boost-libdir="
1322 (assoc-ref %build-inputs "boost") "/lib")
1323 "--disable-optimiz-arch")
1324 #:phases
1325 (modify-phases %standard-phases
1326 (add-after 'unpack 'run-prebuild
1327 (lambda _
1328 (setenv "HOME" (getcwd))
1329 (with-directory-excursion "unix"
1330 (substitute* "prebuild.sh"
1331 (("/bin/sh") (which "sh")))
1332 (invoke "sh" "prebuild.sh"))
1333 #t))
1334 ;; The bootstrap script is run by the prebuild script in the
1335 ;; "run-prebuild" phase.
1336 (delete 'bootstrap))))
1337 (synopsis "Tool for creating three-dimensional graphics")
1338 (description
1339 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1340 for producing high-quality computer graphics. @code{POV-Ray} creates
1341 three-dimensional, photo-realistic images using a rendering technique called
1342 ray-tracing. It reads in a text file containing information describing the
1343 objects and lighting in a scene and generates an image of that scene from the
1344 view point of a camera also described in the text file. Ray-tracing is not a
1345 fast process by any means, but it produces very high quality images with
1346 realistic reflections, shading, perspective and other effects.")
1347 (home-page "http://www.povray.org/")
1348 (license license:agpl3+)))
1349
1350 (define-public rapicorn
1351 (package
1352 (name "rapicorn")
1353 (version "16.0.0")
1354 (source (origin
1355 (method url-fetch)
1356 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1357 "rapicorn-" version ".tar.xz"))
1358 (sha256
1359 (base32
1360 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1361 (patches (search-patches "rapicorn-isnan.patch"))))
1362 (build-system gnu-build-system)
1363 (arguments
1364 `(#:phases
1365 (modify-phases %standard-phases
1366 (add-after 'unpack 'fix-tests
1367 (lambda _
1368 ;; Our grep does not support perl regular expressions.
1369 (substitute* "taptool.sh"
1370 (("grep -P") "grep -E"))
1371 ;; Disable path tests because we cannot access /bin or /sbin.
1372 (substitute* "rcore/tests/multitest.cc"
1373 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1374 #t))
1375 (add-before 'check 'pre-check
1376 (lambda _
1377 ;; The test suite requires a running X server (with DISPLAY
1378 ;; number 99 or higher).
1379 (system "Xvfb :99 &")
1380 (setenv "DISPLAY" ":99")
1381 #t))
1382 (add-after 'unpack 'replace-fhs-paths
1383 (lambda _
1384 (substitute* (cons "Makefile.decl"
1385 (find-files "." "^Makefile\\.in$"))
1386 (("/bin/ls") (which "ls"))
1387 (("/usr/bin/env") (which "env")))
1388 #t)))))
1389 ;; These libraries are listed in the "Required" section of the pkg-config
1390 ;; file.
1391 (propagated-inputs
1392 `(("librsvg" ,librsvg)
1393 ("cairo" ,cairo)
1394 ("pango" ,pango)
1395 ("libxml2" ,libxml2)
1396 ("python2-enum34" ,python2-enum34)))
1397 (inputs
1398 `(("gdk-pixbuf" ,gdk-pixbuf)
1399 ("libpng" ,libpng-1.2)
1400 ("readline" ,readline)
1401 ("libcroco" ,libcroco)
1402 ("python" ,python-2)
1403 ("cython" ,python2-cython)))
1404 (native-inputs
1405 `(("pandoc" ,pandoc)
1406 ("bison" ,bison)
1407 ("flex" ,flex)
1408 ("doxygen" ,doxygen)
1409 ("graphviz" ,graphviz)
1410 ("intltool" ,intltool)
1411 ("pkg-config" ,pkg-config)
1412 ("xvfb" ,xorg-server-for-tests)))
1413 (home-page "https://rapicorn.testbit.org/")
1414 (synopsis "Toolkit for rapid development of user interfaces")
1415 (description
1416 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1417 and Python. The user interface is designed in a declarative markup language
1418 and is connected to the programming logic using data bindings and commands.")
1419 (license license:mpl2.0)))
1420
1421 (define-public ctl
1422 (package
1423 (name "ctl")
1424 (version "1.5.2")
1425 (source (origin
1426 (method url-fetch)
1427 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1428 version ".tar.gz"))
1429 (sha256
1430 (base32
1431 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1432 (build-system cmake-build-system)
1433 (arguments '(#:tests? #f)) ;no 'test' target
1434
1435 ;; Headers include OpenEXR and IlmBase headers.
1436 (propagated-inputs `(("openexr" ,openexr)))
1437
1438 (home-page "http://ampasctl.sourceforge.net")
1439 (synopsis "Color Transformation Language")
1440 (description
1441 "The Color Transformation Language, or CTL, is a small programming
1442 language that was designed to serve as a building block for digital color
1443 management systems. CTL allows users to describe color transforms in a
1444 concise and unambiguous way by expressing them as programs. In order to apply
1445 a given transform to an image, the color management system instructs a CTL
1446 interpreter to load and run the CTL program that describes the transform. The
1447 original and the transformed image constitute the CTL program's input and
1448 output.")
1449
1450 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1451 ;; and headers use different wording.
1452 (license (license:non-copyleft "file://LICENSE"))))
1453
1454 (define-public brdf-explorer
1455 ;; There are no release tarballs, and not even tags in the repo,
1456 ;; so use the latest revision.
1457 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1458 (revision "1"))
1459 (package
1460 (name "brdf-explorer")
1461 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1462 (source (origin
1463 (method git-fetch)
1464 (uri (git-reference
1465 (url "https://github.com/wdas/brdf")
1466 (commit commit)))
1467 (sha256
1468 (base32
1469 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1470 (file-name (string-append name "-" version "-checkout"))))
1471 (build-system gnu-build-system)
1472 (arguments
1473 `(#:phases (modify-phases %standard-phases
1474 (replace 'configure
1475 (lambda* (#:key outputs #:allow-other-keys)
1476 (let ((out (assoc-ref outputs "out")))
1477 (invoke "qmake"
1478 (string-append "prefix=" out)))))
1479 (add-after 'install 'wrap-program
1480 (lambda* (#:key outputs #:allow-other-keys)
1481 (let* ((out (assoc-ref outputs "out"))
1482 (bin (string-append out "/bin"))
1483 (data (string-append
1484 out "/share/brdf")))
1485 (with-directory-excursion bin
1486 (rename-file "brdf" ".brdf-real")
1487 (call-with-output-file "brdf"
1488 (lambda (port)
1489 (format port "#!/bin/sh
1490 # Run the thing from its home, otherwise it just bails out.
1491 cd \"~a\"
1492 exec -a \"$0\" ~a/.brdf-real~%"
1493 data bin)))
1494 (chmod "brdf" #o555)))
1495 #t)))))
1496 (native-inputs
1497 `(("qttools" ,qttools))) ;for 'qmake'
1498 (inputs
1499 `(("qtbase" ,qtbase)
1500 ("mesa" ,mesa)
1501 ("glew" ,glew)
1502 ("freeglut" ,freeglut)
1503 ("zlib" ,zlib)))
1504 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1505 (synopsis
1506 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1507 (description
1508 "BRDF Explorer is an application that allows the development and analysis
1509 of bidirectional reflectance distribution functions (BRDFs). It can load and
1510 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1511 language), measured material data from the MERL database, and anisotropic
1512 measured material data from MIT CSAIL. Graphs and visualizations update in
1513 real time as parameters are changed, making it a useful tool for evaluating
1514 and understanding different BRDFs (and other component functions).")
1515 (license license:ms-pl))))
1516
1517 (define-public agg
1518 (package
1519 (name "agg")
1520 (version "2.5")
1521 (source (origin
1522 (method url-fetch)
1523 (uri (list (string-append
1524 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1525 version ".tar.gz")
1526 (string-append
1527 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1528 version ".tar.gz")
1529
1530 ;; Site was discontinued.
1531 (string-append "http://www.antigrain.com/agg-"
1532 version ".tar.gz")))
1533 (sha256
1534 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1535 (patches (search-patches "agg-am_c_prototype.patch"))))
1536 (build-system gnu-build-system)
1537 (arguments
1538 '(#:configure-flags
1539 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1540 "/include")
1541 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1542 "/lib")
1543 "--disable-examples")
1544 #:phases
1545 (modify-phases %standard-phases
1546 (replace 'bootstrap
1547 (lambda _
1548 ;; let's call configure from configure phase and not now
1549 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1550 (invoke "sh" "autogen.sh"))))))
1551 (native-inputs
1552 `(("pkg-config" ,pkg-config)
1553 ("libtool" ,libtool)
1554 ("autoconf" ,autoconf)
1555 ("automake" ,automake)))
1556 (inputs
1557 `(("libx11" ,libx11)
1558 ("freetype" ,freetype)
1559 ("sdl" ,sdl)))
1560
1561 ;; Antigrain.com was discontinued.
1562 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1563 (synopsis "High-quality 2D graphics rendering engine for C++")
1564 (description
1565 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1566 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1567 rendering SVG graphics.")
1568 (license license:gpl2+)))
1569
1570 (define-public python-pastel
1571 (package
1572 (name "python-pastel")
1573 (version "0.2.0")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (pypi-uri "pastel" version))
1578 (sha256
1579 (base32
1580 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1581 (build-system python-build-system)
1582 (arguments
1583 `(#:phases (modify-phases %standard-phases
1584 (replace 'check
1585 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1586 (native-inputs
1587 `(("python-pytest" ,python-pytest)))
1588 (home-page "https://github.com/sdispater/pastel")
1589 (synopsis "Library to colorize strings in your terminal")
1590 (description "Pastel is a simple library to help you colorize strings in
1591 your terminal.")
1592 (license license:expat)))
1593
1594 (define-public python2-pastel
1595 (package-with-python2 python-pastel))
1596
1597 (define-public fgallery
1598 (package
1599 (name "fgallery")
1600 (version "1.8.2")
1601 (source (origin
1602 (method url-fetch)
1603 (uri
1604 (string-append
1605 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1606 "fgallery-" version ".zip"))
1607 (sha256
1608 (base32
1609 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1610 (build-system gnu-build-system)
1611 (arguments
1612 `(#:tests? #f ; no tests
1613 #:phases
1614 (modify-phases %standard-phases
1615 (delete 'configure)
1616 (delete 'build)
1617 (replace 'install
1618 (lambda* (#:key inputs outputs #:allow-other-keys)
1619 (let* ((out (assoc-ref outputs "out"))
1620 (bin (string-append out "/bin/"))
1621 (share (string-append out "/share/fgallery"))
1622 (man (string-append out "/share/man/man1"))
1623 (perl5lib (getenv "PERL5LIB"))
1624 (script (string-append share "/fgallery")))
1625 (define (bin-directory input-name)
1626 (string-append (assoc-ref inputs input-name) "/bin"))
1627
1628 (mkdir-p man)
1629 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1630
1631 (mkdir-p share)
1632 (copy-recursively "." share)
1633
1634 ;; fgallery copies files from store when it is run. The
1635 ;; read-only permissions from the store directories will cause
1636 ;; fgallery to fail. Do not preserve file attributes when
1637 ;; copying files to prevent it.
1638 (substitute* script
1639 (("'cp'")
1640 "'cp', '--no-preserve=all'"))
1641
1642 (mkdir-p bin)
1643 (symlink script (string-append out "/bin/fgallery"))
1644
1645 (wrap-program script
1646 `("PATH" ":" prefix
1647 ,(map bin-directory '("imagemagick"
1648 "lcms"
1649 "fbida"
1650 "libjpeg"
1651 "zip"
1652 "jpegoptim"
1653 "pngcrush"
1654 "p7zip")))
1655 `("PERL5LIB" ":" prefix (,perl5lib)))
1656 #t))))))
1657 (native-inputs
1658 `(("unzip" ,unzip)))
1659 ;; TODO: Add missing optional dependency: facedetect.
1660 (inputs
1661 `(("imagemagick" ,imagemagick)
1662 ("lcms" ,lcms)
1663 ("fbida" ,fbida)
1664 ("libjpeg" ,libjpeg-turbo)
1665 ("zip" ,zip)
1666 ("perl" ,perl)
1667 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1668 ("perl-image-exiftool" ,perl-image-exiftool)
1669 ("jpegoptim" ,jpegoptim)
1670 ("pngcrush" ,pngcrush)
1671 ("p7zip" ,p7zip)))
1672 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1673 (synopsis "Static photo gallery generator")
1674 (description
1675 "FGallery is a static, JavaScript photo gallery generator with minimalist
1676 look. The result can be uploaded on any web server without additional
1677 requirements.")
1678 (license license:gpl2+)))
1679
1680 (define-public opensubdiv
1681 (package
1682 (name "opensubdiv")
1683 (version "3.4.0")
1684 (source (origin
1685 (method git-fetch)
1686 (uri (git-reference
1687 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1688 (commit (string-append "v" (string-join (string-split version #\.)
1689 "_")))))
1690 (file-name (git-file-name name version))
1691 (sha256
1692 (base32
1693 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1694 (build-system cmake-build-system)
1695 (arguments
1696 `(#:phases (modify-phases %standard-phases
1697 (add-before 'configure 'set-glew-location
1698 (lambda* (#:key inputs #:allow-other-keys)
1699 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1700 #t))
1701 (add-before 'check 'start-xorg-server
1702 (lambda* (#:key inputs #:allow-other-keys)
1703 ;; The test suite requires a running X server.
1704 (system (string-append (assoc-ref inputs "xorg-server")
1705 "/bin/Xvfb :1 &"))
1706 (setenv "DISPLAY" ":1")
1707 #t)))))
1708 (native-inputs
1709 `(("xorg-server" ,xorg-server-for-tests)))
1710 (inputs
1711 `(("glew" ,glew)
1712 ("libxrandr" ,libxrandr)
1713 ("libxcursor" ,libxcursor)
1714 ("libxinerama" ,libxinerama)
1715 ("libxi" ,libxi)
1716 ("zlib" ,zlib)
1717 ("glfw" ,glfw)))
1718 (home-page "https://graphics.pixar.com/opensubdiv/")
1719 (synopsis "High performance subdivision surface evaluation")
1720 (description "OpenSubdiv is a set of libraries that implement high
1721 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1722 and GPU architectures.")
1723 (license license:asl2.0)))
1724
1725 (define-public opencsg
1726 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1727 (package
1728 (name "opencsg")
1729 (version "1.4.2")
1730 (source
1731 (origin
1732 (method git-fetch)
1733 (uri (git-reference
1734 (url "https://github.com/floriankirsch/OpenCSG")
1735 (commit (string-append "opencsg-"
1736 (string-map dot-to-dash version)
1737 "-release"))))
1738 (file-name (git-file-name name version))
1739 (sha256
1740 (base32
1741 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1742 (build-system gnu-build-system)
1743 (arguments
1744 `(#:phases
1745 (modify-phases %standard-phases
1746 (replace 'configure
1747 (lambda* (#:key outputs #:allow-other-keys)
1748 (substitute* "src/Makefile"
1749 (("/usr/local") (assoc-ref outputs "out")))
1750 #t))
1751 (add-before 'build 'skip-example
1752 (lambda _ (chdir "src") #t)))))
1753 (inputs
1754 `(("glew" ,glew)
1755 ("freeglut" ,freeglut)))
1756 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1757 (description
1758 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1759 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1760 For example, two shapes can be combined by uniting them, by intersecting them,
1761 or by subtracting one shape from the other.")
1762 (home-page "http://www.opencsg.org/")
1763 (license license:gpl2))))
1764
1765 (define-public coin3D
1766 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1767 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1768 (let ((revision 1)
1769 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1770 (package
1771 (name "coin3D")
1772 (version
1773 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1774 (source
1775 (origin
1776 (method hg-fetch)
1777 (uri (hg-reference
1778 (url "https://bitbucket.org/Coin3D/coin")
1779 (changeset changeset)))
1780 (file-name (git-file-name name version))
1781 (sha256
1782 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1783 (modules '((guix build utils)))
1784 (snippet
1785 '(begin
1786 (for-each delete-file
1787 '("cfg/csubst.exe"
1788 "cfg/wrapmsvc.exe"))
1789 #t))))
1790 (build-system cmake-build-system)
1791 (native-inputs
1792 `(("doxygen" ,doxygen)
1793 ("graphviz" ,graphviz)))
1794 (inputs
1795 `(("boost" ,boost)
1796 ("freeglut" ,freeglut)
1797 ("glew" ,glew)))
1798 (arguments
1799 `(#:configure-flags
1800 (list
1801 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1802 (string-append "-DBOOST_ROOT="
1803 (assoc-ref %build-inputs "boost")))))
1804 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1805 (synopsis
1806 "High-level 3D visualization library with Open Inventor 2.1 API")
1807 (description
1808 "Coin is a 3D graphics library with an Application Programming Interface
1809 based on the Open Inventor 2.1 API. For those who are not familiar with
1810 Open Inventor, it is a scene-graph based retain-mode rendering and model
1811 interaction library, written in C++, which has become the de facto
1812 standard graphics library for 3D visualization and visual simulation
1813 software in the scientific and engineering community.")
1814 (license license:bsd-3))))
1815
1816 (define-public coin3D-4
1817 (package
1818 (name "coin3D")
1819 (version "4.0.0")
1820 (source
1821 (origin
1822 (method git-fetch)
1823 (uri (git-reference
1824 (url "https://github.com/coin3d/coin")
1825 (commit (string-append "Coin-" version))
1826 (recursive? #t)))
1827 (file-name (git-file-name name version))
1828 (sha256
1829 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1830 (modules '((guix build utils)))
1831 (snippet
1832 '(begin
1833 ;; Delete binaries
1834 (for-each delete-file
1835 '("cfg/csubst.exe"
1836 "cfg/wrapmsvc.exe"))
1837 ;; Delete references to packaging tool cpack. Otherwise the build
1838 ;; fails with "add_subdirectory given source "cpack.d" which is not
1839 ;; an existing directory."
1840 (substitute* "CMakeLists.txt"
1841 ((".*cpack.d.*") ""))
1842 #t))))
1843 (build-system cmake-build-system)
1844 (native-inputs
1845 `(("doxygen" ,doxygen)
1846 ("graphviz" ,graphviz)))
1847 (inputs
1848 `(("boost" ,boost)
1849 ("freeglut" ,freeglut)
1850 ("glew" ,glew)))
1851 (arguments
1852 `(#:configure-flags
1853 (list
1854 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1855 (string-append "-DBOOST_ROOT="
1856 (assoc-ref %build-inputs "boost")))))
1857 (home-page "https://github.com/coin3d/coin")
1858 (synopsis
1859 "High-level 3D visualization library with Open Inventor 2.1 API")
1860 (description
1861 "Coin is a 3D graphics library with an Application Programming Interface
1862 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1863 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1864 library, written in C++, which has become the de facto standard graphics
1865 library for 3D visualization and visual simulation software in the scientific
1866 and engineering community.")
1867 (license license:bsd-3)))
1868
1869 (define-public superfamiconv
1870 (package
1871 (name "superfamiconv")
1872 (version "0.8.8")
1873 (source
1874 (origin
1875 (method git-fetch)
1876 (uri (git-reference
1877 (url "https://github.com/Optiroc/SuperFamiconv")
1878 (commit (string-append "v" version))))
1879 (file-name (git-file-name name version))
1880 (sha256
1881 (base32
1882 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1883 (build-system gnu-build-system)
1884 (arguments
1885 `(#:tests? #f ; no tests
1886 #:phases
1887 (modify-phases %standard-phases
1888 (delete 'configure)
1889 (replace 'install
1890 (lambda* (#:key outputs #:allow-other-keys)
1891 (let* ((outdir (assoc-ref outputs "out"))
1892 (bindir (string-append outdir "/bin")))
1893 (install-file "bin/superfamiconv" bindir)
1894 #t))))))
1895 (home-page "https://github.com/Optiroc/SuperFamiconv")
1896 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1897 and PC Engine formats")
1898 (description "SuperFamiconv is a converter for tiled graphics, supporting
1899 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1900 Automated palette selection is supported.")
1901 (license license:expat)))
1902
1903 (define-public drawpile
1904 ;; This commit fix building with libmicrohttpd>=0.71.
1905 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1906 (revision "1"))
1907 (package
1908 (name "drawpile")
1909 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1910 (source (origin
1911 (method git-fetch)
1912 (uri (git-reference
1913 (url "https://github.com/drawpile/Drawpile")
1914 (commit commit)))
1915 (file-name (git-file-name name version))
1916 (sha256
1917 (base32
1918 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1919 (build-system qt-build-system)
1920 (arguments
1921 '(#:configure-flags
1922 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1923 (native-inputs
1924 `(("extra-cmake-modules" ,extra-cmake-modules)
1925 ("pkg-config" ,pkg-config)))
1926 (inputs
1927 `(("giflib" ,giflib)
1928 ("karchive" ,karchive)
1929 ("kdnssd" ,kdnssd)
1930 ("libmicrohttpd" ,libmicrohttpd)
1931 ("libsodium" ,libsodium)
1932 ("libvpx" ,libvpx)
1933 ("libxi" ,libxi)
1934 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1935 ("qtbase" ,qtbase)
1936 ("qtkeychain" ,qtkeychain)
1937 ("qtmultimedia" ,qtmultimedia)
1938 ("qtsvg" ,qtsvg)
1939 ("qtx11extras" ,qtx11extras)))
1940 (home-page "https://drawpile.net")
1941 (synopsis "Collaborative drawing program")
1942 (description "Drawpile is a drawing program that allows share the canvas
1943 with other users in real time.
1944
1945 Some feature highlights:
1946 @itemize
1947 @item Shared canvas using the built-in server or a dedicated server
1948 @item Record, play back and export drawing sessions
1949 @item Simple animation support
1950 @item Layers and blending modes
1951 @item Text layers
1952 @item Supports pressure sensitive Wacom tablets
1953 @item Built-in chat
1954 @item Supports OpenRaster file format
1955 @item Encrypted connections using SSL
1956 @item Automatic port forwarding with UPnP
1957 @end itemize\n")
1958 (license license:gpl3+))))
1959
1960 (define-public monado
1961 (package
1962 (name "monado")
1963 (version "21.0.0")
1964 (source (origin
1965 (method url-fetch)
1966 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1967 name "/-/archive/v" version "/"
1968 name "-v" version ".tar.bz2"))
1969 (sha256
1970 (base32
1971 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1972 (build-system meson-build-system)
1973 (inputs
1974 `(("ffmpeg" ,ffmpeg)
1975 ("glslang" ,glslang)
1976 ("libudev" ,eudev)
1977 ("libusb" ,libusb)
1978 ("libxcb" ,libxcb)
1979 ("libxrandr" ,libxrandr)
1980 ("opengl" ,mesa)
1981 ("v4l" ,v4l-utils)
1982 ("vulkan-loader" ,vulkan-loader)))
1983 (native-inputs
1984 `(("eigen" ,eigen)
1985 ("pkg-config" ,pkg-config)
1986 ("vulkan-headers" ,vulkan-headers)))
1987 (arguments
1988 `(#:configure-flags
1989 (list "-Dinstall-active-runtime=false")))
1990 (home-page "https://monado.freedesktop.org/")
1991 (synopsis "OpenXR runtime")
1992 (description "Monado is an OpenXR runtime delivering immersive experiences
1993 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
1994 a complete and conforming implementation of the OpenXR API made by Khronos.")
1995 (license license:boost1.0)))