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