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