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