gnu: icecat: Update to 78.10.0-guix0-preview1 [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, 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_OPENSUBDIV=ON"
531 "-DWITH_PYTHON_INSTALL=OFF"
532 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
533 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
534 "/lib")
535 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
536 "/include/python" ,python-version)
537 (string-append "-DPYTHON_VERSION=" ,python-version)
538 (string-append "-DPYTHON_NUMPY_PATH="
539 (assoc-ref %build-inputs "python-numpy")
540 "/lib/python" ,python-version "/site-packages/"))
541 #:phases
542 (modify-phases %standard-phases
543 ;; XXX This file doesn't exist in the Git sources but will probably
544 ;; exist in the eventual 2.80 source tarball.
545 (add-after 'unpack 'fix-broken-import
546 (lambda _
547 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
548 (("import encode_bin") "from . import encode_bin"))
549 #t))
550 (add-after 'set-paths 'add-ilmbase-include-path
551 (lambda* (#:key inputs #:allow-other-keys)
552 ;; OpenEXR propagates ilmbase, but its include files do not appear
553 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
554 ;; the CPATH to satisfy the dependency on "half.h".
555 (setenv "CPATH"
556 (string-append (assoc-ref inputs "ilmbase")
557 "/include/OpenEXR"
558 ":" (or (getenv "CPATH") "")))
559 #t))))))
560 (inputs
561 `(("boost" ,boost)
562 ("jemalloc" ,jemalloc)
563 ("libx11" ,libx11)
564 ("libxi" ,libxi)
565 ("libxrender" ,libxrender)
566 ("opencolorio" ,opencolorio)
567 ("openimageio" ,openimageio)
568 ("openexr" ,openexr)
569 ("opensubdiv" ,opensubdiv)
570 ("ilmbase" ,ilmbase)
571 ("openjpeg" ,openjpeg)
572 ("libjpeg" ,libjpeg-turbo)
573 ("libpng" ,libpng)
574 ("libtiff" ,libtiff)
575 ("ffmpeg" ,ffmpeg)
576 ("fftw" ,fftw)
577 ("jack" ,jack-1)
578 ("libsndfile" ,libsndfile)
579 ("freetype" ,freetype)
580 ("glew" ,glew)
581 ("openal" ,openal)
582 ("pugixml" ,pugixml)
583 ("python" ,python)
584 ("python-numpy" ,python-numpy)
585 ("tbb" ,tbb)
586 ("zlib" ,zlib)
587 ("embree" ,embree)))
588 (home-page "https://blender.org/")
589 (synopsis "3D graphics creation suite")
590 (description
591 "Blender is a 3D graphics creation suite. It supports the entirety of
592 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
593 compositing and motion tracking, even video editing and game creation. The
594 application can be customized via its API for Python scripting.")
595 (license license:gpl2+)))
596
597 (define-public blender-2.79
598 (package
599 (name "blender")
600 (version "2.79b")
601 (source (origin
602 (method url-fetch)
603 (uri (string-append "https://download.blender.org/source/"
604 "blender-" version ".tar.gz"))
605 (sha256
606 (base32
607 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
608 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
609 "blender-2.79-oiio2.patch"
610 ;; The following patches may be
611 ;; needed when the default GCC is
612 ;; updated:
613 ;; "blender-2.79-gcc8.patch"
614 ;; "blender-2.79-gcc9.patch"
615 "blender-2.79-python-3.7-fix.patch"
616 "blender-2.79-python-3.8-fix.patch"))))
617 (build-system cmake-build-system)
618 (arguments
619 (let ((python-version (version-major+minor (package-version python))))
620 `(;; Test files are very large and not included in the release tarball.
621 #:tests? #f
622 #:configure-flags
623 (list "-DWITH_CODEC_FFMPEG=ON"
624 "-DWITH_CODEC_SNDFILE=ON"
625 "-DWITH_CYCLES=ON"
626 "-DWITH_DOC_MANPAGE=ON"
627 "-DWITH_FFTW3=ON"
628 "-DWITH_GAMEENGINE=ON"
629 "-DWITH_IMAGE_OPENJPEG=ON"
630 "-DWITH_INPUT_NDOF=ON"
631 "-DWITH_INSTALL_PORTABLE=OFF"
632 "-DWITH_JACK=ON"
633 "-DWITH_MOD_OCEANSIM=ON"
634 "-DWITH_PLAYER=ON"
635 "-DWITH_PYTHON_INSTALL=OFF"
636 "-DWITH_PYTHON_INSTALL=OFF"
637 "-DWITH_SYSTEM_OPENJPEG=ON"
638 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
639 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
640 "/lib")
641 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
642 "/include/python" ,python-version)
643 (string-append "-DPYTHON_VERSION=" ,python-version))
644 #:phases
645 (modify-phases %standard-phases
646 (add-after 'unpack 'fix-broken-import
647 (lambda _
648 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
649 (("import encode_bin") "from . import encode_bin"))
650 #t))
651 (add-after 'set-paths 'add-ilmbase-include-path
652 (lambda* (#:key inputs #:allow-other-keys)
653 ;; OpenEXR propagates ilmbase, but its include files do not appear
654 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
655 ;; the CPATH to satisfy the dependency on "half.h".
656 (setenv "CPATH"
657 (string-append (assoc-ref inputs "ilmbase")
658 "/include/OpenEXR"
659 ":" (or (getenv "CPATH") "")))
660 #t))))))
661 (inputs
662 `(("boost" ,boost)
663 ("jemalloc" ,jemalloc)
664 ("libx11" ,libx11)
665 ("opencolorio" ,opencolorio)
666 ("openimageio" ,openimageio)
667 ("openexr" ,openexr)
668 ("ilmbase" ,ilmbase)
669 ("openjpeg" ,openjpeg)
670 ("libjpeg" ,libjpeg-turbo)
671 ("libpng" ,libpng)
672 ("libtiff" ,libtiff)
673 ("ffmpeg" ,ffmpeg)
674 ("fftw" ,fftw)
675 ("jack" ,jack-1)
676 ("libsndfile" ,libsndfile)
677 ("freetype" ,freetype)
678 ("glew" ,glew)
679 ("openal" ,openal)
680 ("pugixml" ,pugixml)
681 ("python" ,python)
682 ("zlib" ,zlib)))
683 (home-page "https://blender.org/")
684 (synopsis "3D graphics creation suite")
685 (description
686 "Blender is a 3D graphics creation suite. It supports the entirety of
687 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
688 compositing and motion tracking, even video editing and game creation. The
689 application can be customized via its API for Python scripting.
690
691 NOTE: This older version of Blender is the last release that does not require
692 OpenGL 3. It is retained for use with older computers.")
693 (license license:gpl2+)))
694
695 (define-public goxel
696 (package
697 (name "goxel")
698 (version "0.10.7")
699 (source (origin
700 (method git-fetch)
701 (uri (git-reference
702 (url "https://github.com/guillaumechereau/goxel")
703 (commit (string-append "v" version))))
704 (file-name (git-file-name name version))
705 (sha256
706 (base32
707 "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
708 (build-system gnu-build-system)
709 (arguments
710 '(#:tests? #f
711 #:phases (modify-phases %standard-phases (delete 'configure))
712 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
713 "release")))
714 (native-inputs
715 `(("pkg-config" ,pkg-config)))
716 (inputs
717 `(("gtk3" ,gtk+)
718 ("glfw" ,glfw)
719 ("scons" ,scons)))
720 (home-page "https://goxel.xyz/")
721 (synopsis "Voxel editor")
722 (description
723 "Goxel is a voxel editor that features unlimited scene size, unlimited
724 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
725 and export to various formats including the format used by Magicavoxel.")
726 (license license:gpl3+)))
727
728 (define-public assimp
729 (package
730 (name "assimp")
731 (version "4.1.0")
732 (source (origin
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/assimp/assimp")
736 (commit (string-append "v" version))))
737 (file-name (git-file-name name version))
738 (sha256
739 (base32
740 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
741 (build-system cmake-build-system)
742 (inputs
743 `(("zlib" ,zlib)))
744 (home-page "http://www.assimp.org/")
745 (synopsis "Asset import library")
746 (description
747 "The Open Asset Import Library loads more than 40 3D file formats into
748 one unified data structure. Additionally, assimp features various mesh post
749 processing tools: normals and tangent space generation, triangulation, vertex
750 cache locality optimization, removal of degenerate primitives and duplicate
751 vertices, sorting by primitive type, merging of redundant materials and many
752 more.")
753 (license license:bsd-3)))
754
755 (define-public cgal
756 (package
757 (name "cgal")
758 (version "5.2.1")
759 (source (origin
760 (method url-fetch)
761 (uri (string-append
762 "https://github.com/CGAL/cgal/releases/download/v" version
763 "/CGAL-" version ".tar.xz"))
764 (sha256
765 (base32
766 "1rhrpjsp4081nn2q215h78kc4msrj0081zg65k1gfp5hl88bg03y"))))
767 (build-system cmake-build-system)
768 (arguments
769 '(#:tests? #f)) ; no test target
770 (inputs
771 `(("mpfr" ,mpfr)
772 ("gmp" ,gmp)
773 ("boost" ,boost)))
774 (home-page "https://www.cgal.org/")
775 (synopsis "Computational geometry algorithms library")
776 (description
777 "CGAL provides easy access to efficient and reliable geometric algorithms
778 in the form of a C++ library. CGAL is used in various areas needing geometric
779 computation, such as: computer graphics, scientific visualization, computer
780 aided design and modeling, geographic information systems, molecular biology,
781 medical imaging, robotics and motion planning, mesh generation, numerical
782 methods, etc. It provides data structures and algorithms such as
783 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
784 many more.")
785
786 ;; The 'LICENSE' file explains that a subset is available under more
787 ;; permissive licenses.
788 (license license:gpl3+)))
789
790 (define-public ilmbase
791 (package
792 (name "ilmbase")
793 (version "2.5.5")
794 (source (origin
795 (method git-fetch)
796 (uri (git-reference
797 (url "https://github.com/openexr/openexr")
798 (commit (string-append "v" version))))
799 (file-name (git-file-name "ilmbase" version))
800 (sha256
801 (base32
802 "0mjzb3fd8b9pcqmrgy5cdsmvqd70hmlvjnfypi66v59h3fhrmgd8"))
803 (patches (search-patches "ilmbase-fix-tests.patch"))))
804 (build-system cmake-build-system)
805 (arguments
806 `(#:phases (modify-phases %standard-phases
807 (add-after 'unpack 'change-directory
808 (lambda _
809 (chdir "IlmBase")
810 #t)))))
811 (home-page "https://www.openexr.com/")
812 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
813 (description
814 "IlmBase provides several utility libraries for C++. Half is a class
815 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
816 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
817 quaternions and other useful 2D and 3D math functions. Iex is an
818 exception-handling library.")
819 (license license:bsd-3)))
820
821 (define-public lib2geom
822 ;; Use the latest master commit, as the 1.0 release suffer build problems.
823 (let ((revision "3")
824 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
825 (package
826 (name "lib2geom")
827 (version (git-version "1.0" revision commit))
828 (source (origin
829 (method git-fetch)
830 (uri (git-reference
831 (url "https://gitlab.com/inkscape/lib2geom.git")
832 (commit commit)))
833 (file-name (git-file-name name version))
834 (sha256
835 (base32
836 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
837 (patches
838 ;; Patch submitted to upstream (see:
839 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
840 (search-patches "lib2geom-fix-tests.patch"))
841 (modules '((guix build utils)))
842 (snippet
843 '(begin
844 ;; Fix py2geom module initialization (see:
845 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
846 (substitute* "src/py2geom/__init__.py"
847 (("_py2geom") "py2geom._py2geom"))
848 #t))))
849 (build-system cmake-build-system)
850 (arguments
851 `(#:imported-modules ((guix build python-build-system)
852 ,@%cmake-build-system-modules)
853 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
854 "-D2GEOM_BOOST_PYTHON=ON"
855 ;; Compiling the Cython bindings fail (see:
856 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
857 "-D2GEOM_CYTHON_BINDINGS=OFF")
858 #:phases
859 (modify-phases %standard-phases
860 (add-after 'unpack 'patch-python-lib-install-path
861 (lambda* (#:key inputs outputs #:allow-other-keys)
862 (let* ((python-version (@ (guix build python-build-system)
863 python-version))
864 (python-maj-min-version (python-version
865 (assoc-ref inputs "python")))
866 (site-package (string-append
867 (assoc-ref outputs "out")
868 "/lib/python" python-maj-min-version
869 "/site-packages")))
870 (substitute* '("src/cython/CMakeLists.txt"
871 "src/py2geom/CMakeLists.txt")
872 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
873 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
874 #t)))))
875 (native-inputs `(("python" ,python-wrapper)
876 ("googletest" ,googletest)
877 ("pkg-config" ,pkg-config)))
878 (inputs `(("cairo" ,cairo)
879 ("pycairo" ,python-pycairo)
880 ("double-conversion" ,double-conversion)
881 ("glib" ,glib)
882 ("gsl" ,gsl)))
883 (propagated-inputs
884 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
885 (home-page "https://gitlab.com/inkscape/lib2geom/")
886 (synopsis "C++ 2D graphics library")
887 (description "2geom is a C++ library of mathematics for paths, curves,
888 and other geometric calculations. Designed for vector graphics, it tackles
889 Bézier curves, conic sections, paths, intersections, transformations, and
890 basic geometries.")
891 ;; Because the library is linked with the GNU Scientific Library
892 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
893 ;; https://gitlab.com/inkscape/inkscape/issues/784).
894 (license license:gpl3+))))
895
896 (define-public pstoedit
897 (package
898 (name "pstoedit")
899 (version "3.75")
900 (source (origin
901 (method url-fetch)
902 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
903 version "/pstoedit-" version ".tar.gz"))
904 (sha256
905 (base32
906 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
907 (build-system gnu-build-system)
908 (native-inputs
909 `(("pkg-config" ,pkg-config)))
910 (inputs
911 `(("ghostscript" ,ghostscript)
912 ("imagemagick" ,imagemagick)
913 ("libplot" ,plotutils)
914 ("libjpeg" ,libjpeg-turbo)
915 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
916 (home-page "http://www.pstoedit.net/")
917 (synopsis "Converter for PostScript and PDF graphics")
918 (description "The @code{pstoedit} utility allows translating graphics
919 in the PostScript or PDF (Portable Document Format) formats to various
920 other vector formats such as:
921 @itemize
922 @item Tgif (.obj)
923 @item gnuplot
924 @item xfig (.fig)
925 @item Flattened PostScript
926 @item DXF, a CAD (Computed-Aided Design) exchange format
927 @item PIC (for troff/groff)
928 @item MetaPost (for usage with TeX/LaTeX)
929 @item LaTeX2e picture
930 @item GNU Metafile (for use with plotutils/libplot)
931 @item Any format supported by ImageMagick
932 @end itemize")
933 (license license:gpl2+)))
934
935 (define-public dear-imgui
936 (package
937 (name "dear-imgui")
938 (version "1.79")
939 (source
940 (origin
941 (method git-fetch)
942 (uri (git-reference
943 (url "https://github.com/ocornut/imgui")
944 (commit (string-append "v" version))))
945 (file-name (git-file-name name version))
946 (sha256
947 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
948 (build-system gnu-build-system)
949 (arguments
950 `(#:make-flags
951 (list (string-append "CC=" ,(cc-for-target))
952 (string-append "PREFIX=" (assoc-ref %outputs "out"))
953 (string-append "VERSION=" ,version))
954 #:tests? #f ; no test suite
955 #:phases
956 (modify-phases %standard-phases
957 (add-after 'unpack 'unpack-debian-files
958 (lambda* (#:key inputs #:allow-other-keys)
959 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
960 (apply invoke "patch" "-Np1" "-i"
961 (find-files "debian/patches" "\\.patch$"))
962 (substitute* "Makefile"
963 (("<stb/") "<") ; Guix doesn't use this subdirectory
964 ;; Don't build or install the static library.
965 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
966 (substitute* (list "imgui.pc.in"
967 "Makefile")
968 ;; Don't link against a non-existent library.
969 (("-lstb") ""))
970 #t))
971 (delete 'configure) ; no configure script
972 (replace 'install
973 ;; The default ‘install’ target installs the static library. Don't.
974 (lambda* (#:key make-flags #:allow-other-keys)
975 (apply invoke "make" "install-shared" "install-header"
976 make-flags))))))
977 (native-inputs
978 `(("debian-files"
979 ;; Upstream doesn't provide a build system. Use Debian's.
980 ,(origin
981 (method url-fetch)
982 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
983 version "+ds-1.debian.tar.xz"))
984 (sha256
985 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
986 ("pkg-config" ,pkg-config)))
987 (inputs
988 `(("freetype" ,freetype)
989 ("stb-rect-pack" ,stb-rect-pack)
990 ("stb-truetype" ,stb-truetype)))
991 (home-page "https://github.com/ocornut/imgui")
992 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
993 (description
994 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
995 It creates optimized vertex buffers that you can render anytime in your
996 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
997 self-contained, without external dependencies.
998
999 Dear ImGui is aimed at content creation, visualization, and debugging tools as
1000 opposed to average end-user interfaces. Hence it favors simplicity and
1001 productivity but lacks certain features often found in higher-level libraries.
1002 It is particularly suited to integration in game engine tooling, real-time 3D
1003 applications, full-screen applications, and embedded platforms without standard
1004 operating system features.")
1005 (license license:expat))) ; some examples/ use the zlib licence
1006
1007 (define-public ogre
1008 (package
1009 (name "ogre")
1010 (version "1.12.9")
1011 (source
1012 (origin
1013 (method git-fetch)
1014 (uri (git-reference
1015 (url "https://github.com/OGRECave/ogre")
1016 (commit (string-append "v" version))))
1017 (file-name (git-file-name name version))
1018 (sha256
1019 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
1020 (build-system cmake-build-system)
1021 (arguments
1022 '(#:phases
1023 (modify-phases %standard-phases
1024 (add-before 'configure 'unpack-dear-imgui
1025 (lambda* (#:key inputs #:allow-other-keys)
1026 (copy-recursively (assoc-ref inputs "dear-imgui-source")
1027 "../dear-imgui-source")
1028 #t))
1029 (add-before 'configure 'pre-configure
1030 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
1031 ;; a consequence, we cannot suggest ours in configure flags. Fix
1032 ;; it.
1033 (lambda* (#:key inputs outputs #:allow-other-keys)
1034 (substitute* "CMakeLists.txt"
1035 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
1036 #t)))
1037 #:configure-flags
1038 (let* ((out (assoc-ref %outputs "out"))
1039 (runpath
1040 (string-join (list (string-append out "/lib")
1041 (string-append out "/lib/OGRE"))
1042 ";")))
1043 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
1044 "-DIMGUI_DIR=../dear-imgui-source"
1045 "-DOGRE_BUILD_DEPENDENCIES=OFF"
1046 "-DOGRE_BUILD_TESTS=TRUE"
1047 "-DOGRE_INSTALL_DOCS=TRUE"
1048 "-DOGRE_INSTALL_SAMPLES=TRUE"
1049 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
1050 (native-inputs
1051 `(("boost" ,boost)
1052 ("dear-imgui-source" ,(package-source dear-imgui))
1053 ("doxygen" ,doxygen)
1054 ("googletest" ,googletest-1.8)
1055 ("pkg-config" ,pkg-config)))
1056 (inputs
1057 `(("font-dejavu" ,font-dejavu)
1058 ("freeimage" ,freeimage)
1059 ("freetype" ,freetype)
1060 ("glu" ,glu)
1061 ("libxaw" ,libxaw)
1062 ("libxrandr" ,libxrandr)
1063 ("pugixml" ,pugixml)
1064 ("sdl2" ,sdl2)
1065 ("tinyxml" ,tinyxml)
1066 ("zziplib" ,zziplib)))
1067 (synopsis "Scene-oriented, flexible 3D engine written in C++")
1068 (description
1069 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
1070 flexible 3D engine written in C++ designed to make it easier and more intuitive
1071 for developers to produce applications utilising hardware-accelerated 3D
1072 graphics.")
1073 (home-page "https://www.ogre3d.org/")
1074 (license license:expat)))
1075
1076 (define-public openexr
1077 (package
1078 (name "openexr")
1079 (version (package-version ilmbase))
1080 (source (origin
1081 (inherit (package-source ilmbase))
1082 (file-name (git-file-name "openexr" version))
1083 (modules '((guix build utils)))
1084 (snippet
1085 '(begin
1086 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1087 (("\"/var/tmp/\"")
1088 "\"/tmp/\""))
1089 #t))))
1090 (build-system cmake-build-system)
1091 (arguments
1092 `(#:phases
1093 (modify-phases %standard-phases
1094 (add-after 'unpack 'change-directory
1095 (lambda _
1096 (chdir "OpenEXR")
1097 #t))
1098 (add-after 'change-directory 'increase-test-timeout
1099 (lambda _
1100 ;; On armhf-linux, we need to override the CTest default
1101 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1102 (substitute* "IlmImfTest/CMakeLists.txt"
1103 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1104 (string-append
1105 all
1106 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1107 #t))
1108 ,@(if (not (target-64bit?))
1109 `((add-after 'change-directory 'disable-broken-test
1110 ;; This test fails on i686. Upstream developers suggest that
1111 ;; this test is broken on i686 and can be safely disabled:
1112 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1113 (lambda _
1114 (substitute* "IlmImfTest/main.cpp"
1115 ((".*testOptimizedInterleavePatterns.*") ""))
1116 #t)))
1117 '()))))
1118 (native-inputs
1119 `(("pkg-config" ,pkg-config)))
1120 (propagated-inputs
1121 `(("ilmbase" ,ilmbase) ;used in public headers
1122 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1123 (home-page "https://www.openexr.com/")
1124 (synopsis "High-dynamic range file format library")
1125 (description
1126 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1127 use in computer imaging applications. The IlmImf C++ libraries support
1128 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1129 (license license:bsd-3)))
1130
1131 (define-public openimageio
1132 (package
1133 (name "openimageio")
1134 (version "2.2.10.1")
1135 (source (origin
1136 (method git-fetch)
1137 (uri (git-reference
1138 (url "https://github.com/OpenImageIO/oiio")
1139 (commit (string-append "Release-" version))))
1140 (file-name (git-file-name name version))
1141 (sha256
1142 (base32
1143 "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
1144 (build-system cmake-build-system)
1145 ;; FIXME: To run all tests successfully, test image sets from multiple
1146 ;; third party sources have to be present. For details see
1147 ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
1148 (arguments
1149 `(#:tests? #f
1150 #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
1151 (native-inputs
1152 `(("pkg-config" ,pkg-config)))
1153 (inputs
1154 `(("boost" ,boost)
1155 ("fmt" ,fmt)
1156 ("libpng" ,libpng)
1157 ("libjpeg" ,libjpeg-turbo)
1158 ("libtiff" ,libtiff)
1159 ("giflib" ,giflib)
1160 ("openexr" ,openexr)
1161 ("ilmbase" ,ilmbase)
1162 ("pugixml" ,pugixml)
1163 ("python" ,python-wrapper)
1164 ("pybind11" ,pybind11)
1165 ("robin-map" ,robin-map)
1166 ("zlib" ,zlib)))
1167 (synopsis "C++ library for reading and writing images")
1168 (description
1169 "OpenImageIO is a library for reading and writing images, and a bunch of
1170 related classes, utilities, and applications. There is a particular emphasis
1171 on formats and functionality used in professional, large-scale animation and
1172 visual effects work for film.")
1173 (home-page "https://www.openimageio.org")
1174 (license license:bsd-3)))
1175
1176 (define-public openscenegraph
1177 (package
1178 (name "openscenegraph")
1179 (version "3.6.5")
1180 (source
1181 (origin
1182 (method git-fetch)
1183 (uri (git-reference
1184 (url "https://github.com/openscenegraph/OpenSceneGraph")
1185 (commit (string-append "OpenSceneGraph-" version))))
1186 (sha256
1187 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1188 (file-name (git-file-name name version))))
1189 (properties
1190 `((upstream-name . "OpenSceneGraph")))
1191 (build-system cmake-build-system)
1192 (arguments
1193 `(#:tests? #f ; no test target available
1194 ;; Without this flag, 'rd' will be added to the name of the
1195 ;; library binaries and break linking with other programs.
1196 #:build-type "Release"
1197 #:configure-flags
1198 (list (string-append "-DCMAKE_INSTALL_RPATH="
1199 (assoc-ref %outputs "out") "/lib:"
1200 (assoc-ref %outputs "out") "/lib64"))))
1201 (native-inputs
1202 `(("pkg-config" ,pkg-config)
1203 ("unzip" ,unzip)))
1204 (inputs
1205 `(("giflib" ,giflib)
1206 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1207 ("jasper" ,jasper)
1208 ("librsvg" ,librsvg)
1209 ("libxrandr" ,libxrandr)
1210 ("ffmpeg" ,ffmpeg)
1211 ("mesa" ,mesa)))
1212 (synopsis "High-performance real-time graphics toolkit")
1213 (description
1214 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1215 used by application developers in fields such as visual simulation, games,
1216 virtual reality, scientific visualization and modeling.")
1217 (home-page "http://www.openscenegraph.org")
1218 ;; The 'LICENSE' file explains that the source is licensed under
1219 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1220 (license license:lgpl2.1)))
1221
1222 ;; We need this for simgear
1223 (define-public openscenegraph-3.4
1224 (package (inherit openscenegraph)
1225 (name "openscenegraph")
1226 (version "3.4.1")
1227 (source
1228 (origin
1229 (method git-fetch)
1230 (uri (git-reference
1231 (url "https://github.com/openscenegraph/OpenSceneGraph")
1232 (commit (string-append "OpenSceneGraph-" version))))
1233 (file-name (git-file-name name version))
1234 (sha256
1235 (base32
1236 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1237 (arguments
1238 (substitute-keyword-arguments (package-arguments openscenegraph)
1239 ((#:configure-flags flags)
1240 `(cons
1241 ;; The jpeg plugin requires conversion between integers and booleans
1242 "-DCMAKE_CXX_FLAGS=-fpermissive"
1243 ,flags))))
1244 (inputs
1245 `(("libjpeg" ,libjpeg-turbo)
1246 ,@(package-inputs openscenegraph)))))
1247
1248
1249 (define-public openmw-openscenegraph
1250 ;; OpenMW prefers its own fork of openscenegraph:
1251 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1252 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1253 (hidden-package
1254 (package
1255 (inherit openscenegraph)
1256 (version (git-version "3.6" "1" commit))
1257 (source
1258 (origin
1259 (method git-fetch)
1260 (uri (git-reference
1261 (url "https://github.com/OpenMW/osg/")
1262 (commit commit)))
1263 (file-name (git-file-name (package-name openscenegraph) version))
1264 (sha256
1265 (base32
1266 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1267 (arguments
1268 (substitute-keyword-arguments (package-arguments openscenegraph)
1269 ((#:configure-flags flags)
1270 ;; As per the above wiki link, the following plugins are enough:
1271 `(append
1272 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1273 "-DBUILD_OSG_PLUGIN_OSG=1"
1274 "-DBUILD_OSG_PLUGIN_DDS=1"
1275 "-DBUILD_OSG_PLUGIN_TGA=1"
1276 "-DBUILD_OSG_PLUGIN_BMP=1"
1277 "-DBUILD_OSG_PLUGIN_JPEG=1"
1278 "-DBUILD_OSG_PLUGIN_PNG=1"
1279 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1280 ;; The jpeg plugin requires conversion between integers and booleans
1281 "-DCMAKE_CXX_FLAGS=-fpermissive")
1282 ,flags))))))))
1283
1284 (define-public povray
1285 (package
1286 (name "povray")
1287 (version "3.7.0.8")
1288 (source (origin
1289 (method git-fetch)
1290 (uri (git-reference
1291 (url "https://github.com/POV-Ray/povray")
1292 (commit (string-append "v" version))))
1293 (file-name (git-file-name name version))
1294 (sha256
1295 (base32
1296 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1297 (modules '((guix build utils)))
1298 (snippet
1299 '(begin
1300 ;; Delete bundled libraries.
1301 (delete-file-recursively "libraries")
1302 #t))))
1303 (build-system gnu-build-system)
1304 (native-inputs
1305 `(("autoconf" ,autoconf)
1306 ("automake" ,automake)
1307 ("pkg-config" ,pkg-config)))
1308 (inputs
1309 `(("boost" ,boost)
1310 ("libjpeg" ,libjpeg-turbo)
1311 ("libpng" ,libpng)
1312 ("libtiff" ,libtiff)
1313 ("openexr" ,openexr)
1314 ("sdl" ,sdl)
1315 ("zlib" ,zlib)))
1316 (arguments
1317 '(#:configure-flags
1318 (list "COMPILED_BY=Guix"
1319 (string-append "--with-boost-libdir="
1320 (assoc-ref %build-inputs "boost") "/lib")
1321 "--disable-optimiz-arch")
1322 #:phases
1323 (modify-phases %standard-phases
1324 (add-after 'unpack 'run-prebuild
1325 (lambda _
1326 (setenv "HOME" (getcwd))
1327 (with-directory-excursion "unix"
1328 (substitute* "prebuild.sh"
1329 (("/bin/sh") (which "sh")))
1330 (invoke "sh" "prebuild.sh"))
1331 #t))
1332 ;; The bootstrap script is run by the prebuild script in the
1333 ;; "run-prebuild" phase.
1334 (delete 'bootstrap))))
1335 (synopsis "Tool for creating three-dimensional graphics")
1336 (description
1337 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1338 for producing high-quality computer graphics. @code{POV-Ray} creates
1339 three-dimensional, photo-realistic images using a rendering technique called
1340 ray-tracing. It reads in a text file containing information describing the
1341 objects and lighting in a scene and generates an image of that scene from the
1342 view point of a camera also described in the text file. Ray-tracing is not a
1343 fast process by any means, but it produces very high quality images with
1344 realistic reflections, shading, perspective and other effects.")
1345 (home-page "http://www.povray.org/")
1346 (license license:agpl3+)))
1347
1348 (define-public rapicorn
1349 (package
1350 (name "rapicorn")
1351 (version "16.0.0")
1352 (source (origin
1353 (method url-fetch)
1354 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1355 "rapicorn-" version ".tar.xz"))
1356 (sha256
1357 (base32
1358 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1359 (patches (search-patches "rapicorn-isnan.patch"))))
1360 (build-system gnu-build-system)
1361 (arguments
1362 `(#:phases
1363 (modify-phases %standard-phases
1364 (add-after 'unpack 'fix-tests
1365 (lambda _
1366 ;; Our grep does not support perl regular expressions.
1367 (substitute* "taptool.sh"
1368 (("grep -P") "grep -E"))
1369 ;; Disable path tests because we cannot access /bin or /sbin.
1370 (substitute* "rcore/tests/multitest.cc"
1371 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1372 #t))
1373 (add-before 'check 'pre-check
1374 (lambda _
1375 ;; The test suite requires a running X server (with DISPLAY
1376 ;; number 99 or higher).
1377 (system "Xvfb :99 &")
1378 (setenv "DISPLAY" ":99")
1379 #t))
1380 (add-after 'unpack 'replace-fhs-paths
1381 (lambda _
1382 (substitute* (cons "Makefile.decl"
1383 (find-files "." "^Makefile\\.in$"))
1384 (("/bin/ls") (which "ls"))
1385 (("/usr/bin/env") (which "env")))
1386 #t)))))
1387 ;; These libraries are listed in the "Required" section of the pkg-config
1388 ;; file.
1389 (propagated-inputs
1390 `(("librsvg" ,librsvg)
1391 ("cairo" ,cairo)
1392 ("pango" ,pango)
1393 ("libxml2" ,libxml2)
1394 ("python2-enum34" ,python2-enum34)))
1395 (inputs
1396 `(("gdk-pixbuf" ,gdk-pixbuf)
1397 ("libpng" ,libpng-1.2)
1398 ("readline" ,readline)
1399 ("libcroco" ,libcroco)
1400 ("python" ,python-2)
1401 ("cython" ,python2-cython)))
1402 (native-inputs
1403 `(("pandoc" ,pandoc)
1404 ("bison" ,bison)
1405 ("flex" ,flex)
1406 ("doxygen" ,doxygen)
1407 ("graphviz" ,graphviz)
1408 ("intltool" ,intltool)
1409 ("pkg-config" ,pkg-config)
1410 ("xvfb" ,xorg-server-for-tests)))
1411 (home-page "https://rapicorn.testbit.org/")
1412 (synopsis "Toolkit for rapid development of user interfaces")
1413 (description
1414 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1415 and Python. The user interface is designed in a declarative markup language
1416 and is connected to the programming logic using data bindings and commands.")
1417 (license license:mpl2.0)))
1418
1419 (define-public ctl
1420 (package
1421 (name "ctl")
1422 (version "1.5.2")
1423 (source (origin
1424 (method url-fetch)
1425 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1426 version ".tar.gz"))
1427 (sha256
1428 (base32
1429 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1430 (build-system cmake-build-system)
1431 (arguments '(#:tests? #f)) ;no 'test' target
1432
1433 ;; Headers include OpenEXR and IlmBase headers.
1434 (propagated-inputs `(("openexr" ,openexr)))
1435
1436 (home-page "http://ampasctl.sourceforge.net")
1437 (synopsis "Color Transformation Language")
1438 (description
1439 "The Color Transformation Language, or CTL, is a small programming
1440 language that was designed to serve as a building block for digital color
1441 management systems. CTL allows users to describe color transforms in a
1442 concise and unambiguous way by expressing them as programs. In order to apply
1443 a given transform to an image, the color management system instructs a CTL
1444 interpreter to load and run the CTL program that describes the transform. The
1445 original and the transformed image constitute the CTL program's input and
1446 output.")
1447
1448 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1449 ;; and headers use different wording.
1450 (license (license:non-copyleft "file://LICENSE"))))
1451
1452 (define-public brdf-explorer
1453 ;; There are no release tarballs, and not even tags in the repo,
1454 ;; so use the latest revision.
1455 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1456 (revision "1"))
1457 (package
1458 (name "brdf-explorer")
1459 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1460 (source (origin
1461 (method git-fetch)
1462 (uri (git-reference
1463 (url "https://github.com/wdas/brdf")
1464 (commit commit)))
1465 (sha256
1466 (base32
1467 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1468 (file-name (string-append name "-" version "-checkout"))))
1469 (build-system gnu-build-system)
1470 (arguments
1471 `(#:phases (modify-phases %standard-phases
1472 (replace 'configure
1473 (lambda* (#:key outputs #:allow-other-keys)
1474 (let ((out (assoc-ref outputs "out")))
1475 (invoke "qmake"
1476 (string-append "prefix=" out)))))
1477 (add-after 'install 'wrap-program
1478 (lambda* (#:key outputs #:allow-other-keys)
1479 (let* ((out (assoc-ref outputs "out"))
1480 (bin (string-append out "/bin"))
1481 (data (string-append
1482 out "/share/brdf")))
1483 (with-directory-excursion bin
1484 (rename-file "brdf" ".brdf-real")
1485 (call-with-output-file "brdf"
1486 (lambda (port)
1487 (format port "#!/bin/sh
1488 # Run the thing from its home, otherwise it just bails out.
1489 cd \"~a\"
1490 exec -a \"$0\" ~a/.brdf-real~%"
1491 data bin)))
1492 (chmod "brdf" #o555)))
1493 #t)))))
1494 (native-inputs
1495 `(("qttools" ,qttools))) ;for 'qmake'
1496 (inputs
1497 `(("qtbase" ,qtbase)
1498 ("mesa" ,mesa)
1499 ("glew" ,glew)
1500 ("freeglut" ,freeglut)
1501 ("zlib" ,zlib)))
1502 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1503 (synopsis
1504 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1505 (description
1506 "BRDF Explorer is an application that allows the development and analysis
1507 of bidirectional reflectance distribution functions (BRDFs). It can load and
1508 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1509 language), measured material data from the MERL database, and anisotropic
1510 measured material data from MIT CSAIL. Graphs and visualizations update in
1511 real time as parameters are changed, making it a useful tool for evaluating
1512 and understanding different BRDFs (and other component functions).")
1513 (license license:ms-pl))))
1514
1515 (define-public agg
1516 (package
1517 (name "agg")
1518 (version "2.5")
1519 (source (origin
1520 (method url-fetch)
1521 (uri (list (string-append
1522 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1523 version ".tar.gz")
1524 (string-append
1525 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1526 version ".tar.gz")
1527
1528 ;; Site was discontinued.
1529 (string-append "http://www.antigrain.com/agg-"
1530 version ".tar.gz")))
1531 (sha256
1532 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1533 (patches (search-patches "agg-am_c_prototype.patch"))))
1534 (build-system gnu-build-system)
1535 (arguments
1536 '(#:configure-flags
1537 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1538 "/include")
1539 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1540 "/lib")
1541 "--disable-examples")
1542 #:phases
1543 (modify-phases %standard-phases
1544 (replace 'bootstrap
1545 (lambda _
1546 ;; let's call configure from configure phase and not now
1547 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1548 (invoke "sh" "autogen.sh"))))))
1549 (native-inputs
1550 `(("pkg-config" ,pkg-config)
1551 ("libtool" ,libtool)
1552 ("autoconf" ,autoconf)
1553 ("automake" ,automake)))
1554 (inputs
1555 `(("libx11" ,libx11)
1556 ("freetype" ,freetype)
1557 ("sdl" ,sdl)))
1558
1559 ;; Antigrain.com was discontinued.
1560 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1561 (synopsis "High-quality 2D graphics rendering engine for C++")
1562 (description
1563 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1564 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1565 rendering SVG graphics.")
1566 (license license:gpl2+)))
1567
1568 (define-public python-pastel
1569 (package
1570 (name "python-pastel")
1571 (version "0.2.0")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (pypi-uri "pastel" version))
1576 (sha256
1577 (base32
1578 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1579 (build-system python-build-system)
1580 (arguments
1581 `(#:phases (modify-phases %standard-phases
1582 (replace 'check
1583 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1584 (native-inputs
1585 `(("python-pytest" ,python-pytest)))
1586 (home-page "https://github.com/sdispater/pastel")
1587 (synopsis "Library to colorize strings in your terminal")
1588 (description "Pastel is a simple library to help you colorize strings in
1589 your terminal.")
1590 (license license:expat)))
1591
1592 (define-public python2-pastel
1593 (package-with-python2 python-pastel))
1594
1595 (define-public fgallery
1596 (package
1597 (name "fgallery")
1598 (version "1.8.2")
1599 (source (origin
1600 (method url-fetch)
1601 (uri
1602 (string-append
1603 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1604 "fgallery-" version ".zip"))
1605 (sha256
1606 (base32
1607 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1608 (build-system gnu-build-system)
1609 (arguments
1610 `(#:tests? #f ; no tests
1611 #:phases
1612 (modify-phases %standard-phases
1613 (delete 'configure)
1614 (delete 'build)
1615 (replace 'install
1616 (lambda* (#:key inputs outputs #:allow-other-keys)
1617 (let* ((out (assoc-ref outputs "out"))
1618 (bin (string-append out "/bin/"))
1619 (share (string-append out "/share/fgallery"))
1620 (man (string-append out "/share/man/man1"))
1621 (perl5lib (getenv "PERL5LIB"))
1622 (script (string-append share "/fgallery")))
1623 (define (bin-directory input-name)
1624 (string-append (assoc-ref inputs input-name) "/bin"))
1625
1626 (mkdir-p man)
1627 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1628
1629 (mkdir-p share)
1630 (copy-recursively "." share)
1631
1632 ;; fgallery copies files from store when it is run. The
1633 ;; read-only permissions from the store directories will cause
1634 ;; fgallery to fail. Do not preserve file attributes when
1635 ;; copying files to prevent it.
1636 (substitute* script
1637 (("'cp'")
1638 "'cp', '--no-preserve=all'"))
1639
1640 (mkdir-p bin)
1641 (symlink script (string-append out "/bin/fgallery"))
1642
1643 (wrap-program script
1644 `("PATH" ":" prefix
1645 ,(map bin-directory '("imagemagick"
1646 "lcms"
1647 "fbida"
1648 "libjpeg"
1649 "zip"
1650 "jpegoptim"
1651 "pngcrush"
1652 "p7zip")))
1653 `("PERL5LIB" ":" prefix (,perl5lib)))
1654 #t))))))
1655 (native-inputs
1656 `(("unzip" ,unzip)))
1657 ;; TODO: Add missing optional dependency: facedetect.
1658 (inputs
1659 `(("imagemagick" ,imagemagick)
1660 ("lcms" ,lcms)
1661 ("fbida" ,fbida)
1662 ("libjpeg" ,libjpeg-turbo)
1663 ("zip" ,zip)
1664 ("perl" ,perl)
1665 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1666 ("perl-image-exiftool" ,perl-image-exiftool)
1667 ("jpegoptim" ,jpegoptim)
1668 ("pngcrush" ,pngcrush)
1669 ("p7zip" ,p7zip)))
1670 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1671 (synopsis "Static photo gallery generator")
1672 (description
1673 "FGallery is a static, JavaScript photo gallery generator with minimalist
1674 look. The result can be uploaded on any web server without additional
1675 requirements.")
1676 (license license:gpl2+)))
1677
1678 (define-public opensubdiv
1679 (package
1680 (name "opensubdiv")
1681 (version "3.4.0")
1682 (source (origin
1683 (method git-fetch)
1684 (uri (git-reference
1685 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1686 (commit (string-append "v" (string-join (string-split version #\.)
1687 "_")))))
1688 (file-name (git-file-name name version))
1689 (sha256
1690 (base32
1691 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1692 (build-system cmake-build-system)
1693 (arguments
1694 `(#:phases (modify-phases %standard-phases
1695 (add-before 'configure 'set-glew-location
1696 (lambda* (#:key inputs #:allow-other-keys)
1697 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1698 #t))
1699 (add-before 'check 'start-xorg-server
1700 (lambda* (#:key inputs #:allow-other-keys)
1701 ;; The test suite requires a running X server.
1702 (system (string-append (assoc-ref inputs "xorg-server")
1703 "/bin/Xvfb :1 &"))
1704 (setenv "DISPLAY" ":1")
1705 #t)))))
1706 (native-inputs
1707 `(("xorg-server" ,xorg-server-for-tests)))
1708 (inputs
1709 `(("glew" ,glew)
1710 ("libxrandr" ,libxrandr)
1711 ("libxcursor" ,libxcursor)
1712 ("libxinerama" ,libxinerama)
1713 ("libxi" ,libxi)
1714 ("zlib" ,zlib)
1715 ("glfw" ,glfw)))
1716 (home-page "https://graphics.pixar.com/opensubdiv/")
1717 (synopsis "High performance subdivision surface evaluation")
1718 (description "OpenSubdiv is a set of libraries that implement high
1719 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1720 and GPU architectures.")
1721 (license license:asl2.0)))
1722
1723 (define-public opencsg
1724 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1725 (package
1726 (name "opencsg")
1727 (version "1.4.2")
1728 (source
1729 (origin
1730 (method git-fetch)
1731 (uri (git-reference
1732 (url "https://github.com/floriankirsch/OpenCSG")
1733 (commit (string-append "opencsg-"
1734 (string-map dot-to-dash version)
1735 "-release"))))
1736 (file-name (git-file-name name version))
1737 (sha256
1738 (base32
1739 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1740 (build-system gnu-build-system)
1741 (arguments
1742 `(#:phases
1743 (modify-phases %standard-phases
1744 (replace 'configure
1745 (lambda* (#:key outputs #:allow-other-keys)
1746 (substitute* "src/Makefile"
1747 (("/usr/local") (assoc-ref outputs "out")))
1748 #t))
1749 (add-before 'build 'skip-example
1750 (lambda _ (chdir "src") #t)))))
1751 (inputs
1752 `(("glew" ,glew)
1753 ("freeglut" ,freeglut)))
1754 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1755 (description
1756 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1757 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1758 For example, two shapes can be combined by uniting them, by intersecting them,
1759 or by subtracting one shape from the other.")
1760 (home-page "http://www.opencsg.org/")
1761 (license license:gpl2))))
1762
1763 (define-public coin3D
1764 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1765 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1766 (let ((revision 1)
1767 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1768 (package
1769 (name "coin3D")
1770 (version
1771 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1772 (source
1773 (origin
1774 (method hg-fetch)
1775 (uri (hg-reference
1776 (url "https://bitbucket.org/Coin3D/coin")
1777 (changeset changeset)))
1778 (file-name (git-file-name name version))
1779 (sha256
1780 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1781 (modules '((guix build utils)))
1782 (snippet
1783 '(begin
1784 (for-each delete-file
1785 '("cfg/csubst.exe"
1786 "cfg/wrapmsvc.exe"))
1787 #t))))
1788 (build-system cmake-build-system)
1789 (native-inputs
1790 `(("doxygen" ,doxygen)
1791 ("graphviz" ,graphviz)))
1792 (inputs
1793 `(("boost" ,boost)
1794 ("freeglut" ,freeglut)
1795 ("glew" ,glew)))
1796 (arguments
1797 `(#:configure-flags
1798 (list
1799 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1800 (string-append "-DBOOST_ROOT="
1801 (assoc-ref %build-inputs "boost")))))
1802 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1803 (synopsis
1804 "High-level 3D visualization library with Open Inventor 2.1 API")
1805 (description
1806 "Coin is a 3D graphics library with an Application Programming Interface
1807 based on the Open Inventor 2.1 API. For those who are not familiar with
1808 Open Inventor, it is a scene-graph based retain-mode rendering and model
1809 interaction library, written in C++, which has become the de facto
1810 standard graphics library for 3D visualization and visual simulation
1811 software in the scientific and engineering community.")
1812 (license license:bsd-3))))
1813
1814 (define-public coin3D-4
1815 (package
1816 (name "coin3D")
1817 (version "4.0.0")
1818 (source
1819 (origin
1820 (method git-fetch)
1821 (uri (git-reference
1822 (url "https://github.com/coin3d/coin")
1823 (commit (string-append "Coin-" version))
1824 (recursive? #t)))
1825 (file-name (git-file-name name version))
1826 (sha256
1827 (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
1828 (modules '((guix build utils)))
1829 (snippet
1830 '(begin
1831 ;; Delete binaries
1832 (for-each delete-file
1833 '("cfg/csubst.exe"
1834 "cfg/wrapmsvc.exe"))
1835 ;; Delete references to packaging tool cpack. Otherwise the build
1836 ;; fails with "add_subdirectory given source "cpack.d" which is not
1837 ;; an existing directory."
1838 (substitute* "CMakeLists.txt"
1839 ((".*cpack.d.*") ""))
1840 #t))))
1841 (build-system cmake-build-system)
1842 (native-inputs
1843 `(("doxygen" ,doxygen)
1844 ("graphviz" ,graphviz)))
1845 (inputs
1846 `(("boost" ,boost)
1847 ("freeglut" ,freeglut)
1848 ("glew" ,glew)))
1849 (arguments
1850 `(#:configure-flags
1851 (list
1852 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1853 (string-append "-DBOOST_ROOT="
1854 (assoc-ref %build-inputs "boost")))))
1855 (home-page "https://github.com/coin3d/coin")
1856 (synopsis
1857 "High-level 3D visualization library with Open Inventor 2.1 API")
1858 (description
1859 "Coin is a 3D graphics library with an Application Programming Interface
1860 based on the Open Inventor 2.1 API. For those who are not familiar with Open
1861 Inventor, it is a scene-graph based retain-mode rendering and model interaction
1862 library, written in C++, which has become the de facto standard graphics
1863 library for 3D visualization and visual simulation software in the scientific
1864 and engineering community.")
1865 (license license:bsd-3)))
1866
1867 (define-public superfamiconv
1868 (package
1869 (name "superfamiconv")
1870 (version "0.8.8")
1871 (source
1872 (origin
1873 (method git-fetch)
1874 (uri (git-reference
1875 (url "https://github.com/Optiroc/SuperFamiconv")
1876 (commit (string-append "v" version))))
1877 (file-name (git-file-name name version))
1878 (sha256
1879 (base32
1880 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1881 (build-system gnu-build-system)
1882 (arguments
1883 `(#:tests? #f ; no tests
1884 #:phases
1885 (modify-phases %standard-phases
1886 (delete 'configure)
1887 (replace 'install
1888 (lambda* (#:key outputs #:allow-other-keys)
1889 (let* ((outdir (assoc-ref outputs "out"))
1890 (bindir (string-append outdir "/bin")))
1891 (install-file "bin/superfamiconv" bindir)
1892 #t))))))
1893 (home-page "https://github.com/Optiroc/SuperFamiconv")
1894 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1895 and PC Engine formats")
1896 (description "SuperFamiconv is a converter for tiled graphics, supporting
1897 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1898 Automated palette selection is supported.")
1899 (license license:expat)))
1900
1901 (define-public drawpile
1902 ;; This commit fix building with libmicrohttpd>=0.71.
1903 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1904 (revision "1"))
1905 (package
1906 (name "drawpile")
1907 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1908 (source (origin
1909 (method git-fetch)
1910 (uri (git-reference
1911 (url "https://github.com/drawpile/Drawpile")
1912 (commit commit)))
1913 (file-name (git-file-name name version))
1914 (sha256
1915 (base32
1916 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1917 (build-system qt-build-system)
1918 (arguments
1919 '(#:configure-flags
1920 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1921 (native-inputs
1922 `(("extra-cmake-modules" ,extra-cmake-modules)
1923 ("pkg-config" ,pkg-config)))
1924 (inputs
1925 `(("giflib" ,giflib)
1926 ("karchive" ,karchive)
1927 ("kdnssd" ,kdnssd)
1928 ("libmicrohttpd" ,libmicrohttpd)
1929 ("libsodium" ,libsodium)
1930 ("libvpx" ,libvpx)
1931 ("libxi" ,libxi)
1932 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1933 ("qtbase" ,qtbase)
1934 ("qtkeychain" ,qtkeychain)
1935 ("qtmultimedia" ,qtmultimedia)
1936 ("qtsvg" ,qtsvg)
1937 ("qtx11extras" ,qtx11extras)))
1938 (home-page "https://drawpile.net")
1939 (synopsis "Collaborative drawing program")
1940 (description "Drawpile is a drawing program that allows share the canvas
1941 with other users in real time.
1942
1943 Some feature highlights:
1944 @itemize
1945 @item Shared canvas using the built-in server or a dedicated server
1946 @item Record, play back and export drawing sessions
1947 @item Simple animation support
1948 @item Layers and blending modes
1949 @item Text layers
1950 @item Supports pressure sensitive Wacom tablets
1951 @item Built-in chat
1952 @item Supports OpenRaster file format
1953 @item Encrypted connections using SSL
1954 @item Automatic port forwarding with UPnP
1955 @end itemize\n")
1956 (license license:gpl3+))))
1957
1958 (define-public monado
1959 (package
1960 (name "monado")
1961 (version "21.0.0")
1962 (source (origin
1963 (method url-fetch)
1964 (uri (string-append "https://gitlab.freedesktop.org/" name "/"
1965 name "/-/archive/v" version "/"
1966 name "-v" version ".tar.bz2"))
1967 (sha256
1968 (base32
1969 "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
1970 (build-system meson-build-system)
1971 (inputs
1972 `(("ffmpeg" ,ffmpeg)
1973 ("glslang" ,glslang)
1974 ("libudev" ,eudev)
1975 ("libusb" ,libusb)
1976 ("libxcb" ,libxcb)
1977 ("libxrandr" ,libxrandr)
1978 ("opengl" ,mesa)
1979 ("v4l" ,v4l-utils)
1980 ("vulkan-loader" ,vulkan-loader)))
1981 (native-inputs
1982 `(("eigen" ,eigen)
1983 ("pkg-config" ,pkg-config)
1984 ("vulkan-headers" ,vulkan-headers)))
1985 (arguments
1986 `(#:configure-flags
1987 (list "-Dinstall-active-runtime=false")))
1988 (home-page "https://monado.freedesktop.org/")
1989 (synopsis "OpenXR runtime")
1990 (description "Monado is an OpenXR runtime delivering immersive experiences
1991 such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
1992 a complete and conforming implementation of the OpenXR API made by Khronos.")
1993 (license license:boost1.0)))