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