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