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