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