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