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