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