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