gnu: openimageio: Update to 2.0.13.
[jackhill/guix/guix.git] / gnu / packages / graphics.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019, 2020 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
24 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
25 ;;;
26 ;;; This file is part of GNU Guix.
27 ;;;
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
32 ;;;
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
37 ;;;
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40
41 (define-module (gnu packages graphics)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages algebra)
44 #:use-module (gnu packages audio)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages bash)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages datastructures)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages flex)
55 #:use-module (gnu packages fonts)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages ghostscript)
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages graphviz)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages haskell-xyz)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages imagemagick)
67 #:use-module (gnu packages jemalloc)
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages multiprecision)
70 #:use-module (gnu packages pdf)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages photo)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages plotutils)
75 #:use-module (gnu packages pth)
76 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
77 #:use-module (gnu packages python)
78 #:use-module (gnu packages python-xyz)
79 #:use-module (gnu packages qt)
80 #:use-module (gnu packages readline)
81 #:use-module (gnu packages sdl)
82 #:use-module (gnu packages swig)
83 #:use-module (gnu packages tbb)
84 #:use-module (gnu packages video)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages xorg)
87 #:use-module (guix build-system cmake)
88 #:use-module (guix build-system gnu)
89 #:use-module (guix build-system python)
90 #:use-module (guix download)
91 #:use-module (guix git-download)
92 #:use-module (guix hg-download)
93 #:use-module ((guix licenses) #:prefix license:)
94 #:use-module (guix packages)
95 #:use-module (guix utils))
96
97 (define-public fox
98 (package
99 (name "fox")
100 (version "1.6.57")
101 (source
102 (origin
103 (method url-fetch)
104 (uri
105 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
106 (sha256
107 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
108 (build-system gnu-build-system)
109 (arguments
110 `(#:phases
111 (modify-phases %standard-phases
112 (add-after 'unpack 'patch
113 (lambda _
114 (substitute* "configure"
115 (("-I/usr/include/freetype2")
116 (string-append "-I"
117 (string-append
118 (assoc-ref %build-inputs "freetype")
119 "/include/freetype2"))))
120 #t)))))
121 (native-inputs
122 `(("doxygen" ,doxygen)))
123 (inputs
124 `(("bzip2" ,lbzip2)
125 ("freetype" ,freetype)
126 ("gl" ,mesa)
127 ("glu" ,glu)
128 ("jpeg" ,libjpeg-turbo)
129 ("png" ,libpng)
130 ("tiff" ,libtiff)
131 ("x11" ,libx11)
132 ("xcursor" ,libxcursor)
133 ("xext" ,libxext)
134 ("xfixes" ,libxfixes)
135 ("xft" ,libxft)
136 ("xinput" ,libxi)
137 ("xrandr" ,libxrandr)
138 ("xrender" ,libxrender)
139 ("xshm" ,libxshmfence)
140 ("zlib" ,zlib)))
141 (synopsis "Widget Toolkit for building GUI")
142 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
143 Graphical User Interfaces easily and effectively. It offers a wide, and
144 growing, collection of Controls, and provides state of the art facilities such
145 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
146 manipulation. FOX also implements icons, images, and user-convenience features
147 such as status line help, and tooltips. Tooltips may even be used for 3D
148 objects!")
149 (home-page "http://www.fox-toolkit.org")
150 (license license:lgpl2.1+)))
151
152 (define-public autotrace
153 (let ((commit "travis-20190624.59")
154 (version-base "0.40.0"))
155 (package
156 (name "autotrace")
157 (version (string-append version-base "-"
158 (if (string-prefix? "travis-" commit)
159 (string-drop commit 7)
160 commit)))
161 (source (origin
162 (method git-fetch)
163 (uri (git-reference
164 (url "https://github.com/autotrace/autotrace")
165 (commit commit)))
166 (file-name (git-file-name name version))
167 (sha256
168 (base32
169 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
170 (build-system gnu-build-system)
171 (arguments
172 `(#:phases (modify-phases %standard-phases
173 ;; See: https://github.com/autotrace/autotrace/issues/27.
174 (add-after 'unpack 'include-spline.h-header
175 (lambda _
176 (substitute* "Makefile.am"
177 ((".*src/types.h.*" all)
178 (string-append all "\t\tsrc/spline.h \\\n")))
179 #t))
180 ;; See: https://github.com/autotrace/autotrace/issues/26.
181 (replace 'check
182 (lambda _
183 (invoke "sh" "tests/runtests.sh"))))))
184 (native-inputs
185 `(("which" ,which)
186 ("pkg-config" ,pkg-config)
187 ("autoconf" ,autoconf)
188 ("automake" ,automake)
189 ("intltool" ,intltool)
190 ("libtool" ,libtool)
191 ("gettext" ,gettext-minimal)))
192 (inputs
193 `(("glib" ,glib)
194 ("libjpeg" ,libjpeg-turbo)
195 ("libpng" ,libpng)
196 ("imagemagick" ,imagemagick)
197 ("pstoedit" ,pstoedit)))
198 (home-page "https://github.com/autotrace/autotrace")
199 (synopsis "Bitmap to vector graphics converter")
200 (description "AutoTrace is a utility for converting bitmap into vector
201 graphics. It can trace outlines and midlines, effect color reduction or
202 despeckling and has support for many input and output formats. It can be used
203 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
204 (license (list license:gpl2+ ;for the utility itself
205 license:lgpl2.1+))))) ;for use as a library
206
207 (define-public blender
208 (package
209 (name "blender")
210 (version "2.83.3")
211 (source (origin
212 (method url-fetch)
213 (uri (string-append "https://download.blender.org/source/"
214 "blender-" version ".tar.xz"))
215 (sha256
216 (base32
217 "18m27abp4j3xv48dr6ddr2mqcvx2vkjffr487z90059yv9k0yh2p"))))
218 (build-system cmake-build-system)
219 (arguments
220 (let ((python-version (version-major+minor (package-version python))))
221 `(;; Test files are very large and not included in the release tarball.
222 #:tests? #f
223 #:configure-flags
224 (list "-DWITH_CODEC_FFMPEG=ON"
225 "-DWITH_CODEC_SNDFILE=ON"
226 "-DWITH_CYCLES=ON"
227 "-DWITH_DOC_MANPAGE=ON"
228 "-DWITH_FFTW3=ON"
229 "-DWITH_IMAGE_OPENJPEG=ON"
230 "-DWITH_INPUT_NDOF=ON"
231 "-DWITH_INSTALL_PORTABLE=OFF"
232 "-DWITH_JACK=ON"
233 "-DWITH_MOD_OCEANSIM=ON"
234 "-DWITH_OPENSUBDIV=ON"
235 "-DWITH_PYTHON_INSTALL=OFF"
236 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
237 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
238 "/lib")
239 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
240 "/include/python" ,python-version)
241 (string-append "-DPYTHON_VERSION=" ,python-version)
242 (string-append "-DPYTHON_NUMPY_PATH="
243 (assoc-ref %build-inputs "python-numpy")
244 "/lib/python" ,python-version "/site-packages/"))
245 #:phases
246 (modify-phases %standard-phases
247 ;; XXX This file doesn't exist in the Git sources but will probably
248 ;; exist in the eventual 2.80 source tarball.
249 (add-after 'unpack 'fix-broken-import
250 (lambda _
251 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
252 (("import encode_bin") "from . import encode_bin"))
253 #t))
254 (add-after 'set-paths 'add-ilmbase-include-path
255 (lambda* (#:key inputs #:allow-other-keys)
256 ;; OpenEXR propagates ilmbase, but its include files do not appear
257 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
258 ;; the CPATH to satisfy the dependency on "half.h".
259 (setenv "CPATH"
260 (string-append (assoc-ref inputs "ilmbase")
261 "/include/OpenEXR"
262 ":" (or (getenv "CPATH") "")))
263 #t))))))
264 (inputs
265 `(("boost" ,boost)
266 ("jemalloc" ,jemalloc)
267 ("libx11" ,libx11)
268 ("libxi" ,libxi)
269 ("libxrender" ,libxrender)
270 ("openimageio" ,openimageio)
271 ("openexr" ,openexr)
272 ("opensubdiv" ,opensubdiv)
273 ("ilmbase" ,ilmbase)
274 ("openjpeg" ,openjpeg)
275 ("libjpeg" ,libjpeg-turbo)
276 ("libpng" ,libpng)
277 ("libtiff" ,libtiff)
278 ("ffmpeg" ,ffmpeg)
279 ("fftw" ,fftw)
280 ("jack" ,jack-1)
281 ("libsndfile" ,libsndfile)
282 ("freetype" ,freetype)
283 ("glew" ,glew)
284 ("openal" ,openal)
285 ("python" ,python)
286 ("python-numpy" ,python-numpy)
287 ("tbb" ,tbb)
288 ("zlib" ,zlib)))
289 (home-page "https://blender.org/")
290 (synopsis "3D graphics creation suite")
291 (description
292 "Blender is a 3D graphics creation suite. It supports the entirety of
293 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
294 compositing and motion tracking, even video editing and game creation. The
295 application can be customized via its API for Python scripting.")
296 (license license:gpl2+)))
297
298 (define-public assimp
299 (package
300 (name "assimp")
301 (version "4.1.0")
302 (source (origin
303 (method git-fetch)
304 (uri (git-reference
305 (url "https://github.com/assimp/assimp")
306 (commit (string-append "v" version))))
307 (file-name (git-file-name name version))
308 (sha256
309 (base32
310 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
311 (build-system cmake-build-system)
312 (inputs
313 `(("zlib" ,zlib)))
314 (home-page "http://www.assimp.org/")
315 (synopsis "Asset import library")
316 (description
317 "The Open Asset Import Library loads more than 40 3D file formats into
318 one unified data structure. Additionally, assimp features various mesh post
319 processing tools: normals and tangent space generation, triangulation, vertex
320 cache locality optimization, removal of degenerate primitives and duplicate
321 vertices, sorting by primitive type, merging of redundant materials and many
322 more.")
323 (license license:bsd-3)))
324
325 (define-public cgal
326 (package
327 (name "cgal")
328 (version "4.14.2")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append
332 "https://github.com/CGAL/cgal/releases/download/releases/"
333 "CGAL-" version "/CGAL-" version ".tar.xz"))
334 (sha256
335 (base32
336 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
337 (build-system cmake-build-system)
338 (arguments
339 '(#:tests? #f)) ; no test target
340 (inputs
341 `(("mpfr" ,mpfr)
342 ("gmp" ,gmp)
343 ("boost" ,boost)))
344 (home-page "https://www.cgal.org/")
345 (synopsis "Computational geometry algorithms library")
346 (description
347 "CGAL provides easy access to efficient and reliable geometric algorithms
348 in the form of a C++ library. CGAL is used in various areas needing geometric
349 computation, such as: computer graphics, scientific visualization, computer
350 aided design and modeling, geographic information systems, molecular biology,
351 medical imaging, robotics and motion planning, mesh generation, numerical
352 methods, etc. It provides data structures and algorithms such as
353 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
354 many more.")
355
356 ;; The 'LICENSE' file explains that a subset is available under more
357 ;; permissive licenses.
358 (license license:gpl3+)))
359
360 (define-public ilmbase
361 (package
362 (name "ilmbase")
363 (version "2.5.2")
364 (source (origin
365 (method git-fetch)
366 (uri (git-reference
367 (url "https://github.com/openexr/openexr")
368 (commit (string-append "v" version))))
369 (file-name (git-file-name "ilmbase" version))
370 (sha256
371 (base32
372 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
373 (patches (search-patches "ilmbase-fix-tests.patch"))))
374 (build-system cmake-build-system)
375 (arguments
376 `(#:phases (modify-phases %standard-phases
377 (add-after 'unpack 'change-directory
378 (lambda _
379 (chdir "IlmBase")
380 #t)))))
381 (home-page "https://www.openexr.com/")
382 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
383 (description
384 "IlmBase provides several utility libraries for C++. Half is a class
385 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
386 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
387 quaternions and other useful 2D and 3D math functions. Iex is an
388 exception-handling library.")
389 (license license:bsd-3)))
390
391 (define-public lib2geom
392 ;; Use the latest master commit, as the 1.0 release suffer build problems.
393 (let ((revision "2")
394 (commit "f98256d2a923955af74b8cff3d456f0df1ee4b59"))
395 (package
396 (name "lib2geom")
397 (version (git-version "1.0" revision commit))
398 (source (origin
399 (method git-fetch)
400 (uri (git-reference
401 (url "https://gitlab.com/inkscape/lib2geom.git")
402 (commit commit)))
403 (file-name (git-file-name name version))
404 (sha256
405 (base32
406 "0w6ijaai8i80d0f35c0shgdspqlsdhw3cvz106k1gm7bmnz1wzpq"))
407 (patches
408 ;; Patches submitted to upstream (see:
409 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/17,
410 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
411 (search-patches "lib2geom-enable-assertions.patch"
412 "lib2geom-fix-tests.patch"))
413 (modules '((guix build utils)))
414 (snippet
415 '(begin
416 ;; Fix py2geom module initialization (see:
417 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
418 (substitute* "src/py2geom/__init__.py"
419 (("_py2geom") "py2geom._py2geom"))
420 #t))))
421 (build-system cmake-build-system)
422 (arguments
423 `(#:imported-modules ((guix build python-build-system)
424 ,@%cmake-build-system-modules)
425 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
426 "-D2GEOM_BOOST_PYTHON=ON"
427 ;; Compiling the Cython bindings fail (see:
428 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
429 "-D2GEOM_CYTHON_BINDINGS=OFF")
430 #:phases
431 (modify-phases %standard-phases
432 (add-after 'unpack 'patch-python-lib-install-path
433 (lambda* (#:key inputs outputs #:allow-other-keys)
434 (let* ((python-version (@ (guix build python-build-system)
435 python-version))
436 (python-maj-min-version (python-version
437 (assoc-ref inputs "python")))
438 (site-package (string-append
439 (assoc-ref outputs "out")
440 "/lib/python" python-maj-min-version
441 "/site-packages")))
442 (substitute* '("src/cython/CMakeLists.txt"
443 "src/py2geom/CMakeLists.txt")
444 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
445 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
446 #t)))))
447 (native-inputs `(("python" ,python-wrapper)
448 ("googletest" ,googletest)
449 ("pkg-config" ,pkg-config)))
450 (inputs `(("cairo" ,cairo)
451 ("pycairo" ,python-pycairo)
452 ("double-conversion" ,double-conversion)
453 ("glib" ,glib)
454 ("gsl" ,gsl)))
455 (propagated-inputs
456 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
457 (home-page "https://gitlab.com/inkscape/lib2geom/")
458 (synopsis "C++ 2D graphics library")
459 (description "2geom is a C++ library of mathematics for paths, curves,
460 and other geometric calculations. Designed for vector graphics, it tackles
461 Bézier curves, conic sections, paths, intersections, transformations, and
462 basic geometries.")
463 ;; Because the library is linked with the GNU Scientific Library
464 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
465 ;; https://gitlab.com/inkscape/inkscape/issues/784).
466 (license license:gpl3+))))
467
468 (define-public pstoedit
469 (package
470 (name "pstoedit")
471 (version "3.75")
472 (source (origin
473 (method url-fetch)
474 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
475 version "/pstoedit-" version ".tar.gz"))
476 (sha256
477 (base32
478 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
479 (build-system gnu-build-system)
480 (native-inputs
481 `(("pkg-config" ,pkg-config)))
482 (inputs
483 `(("ghostscript" ,ghostscript)
484 ("imagemagick" ,imagemagick)
485 ("libplot" ,plotutils)
486 ("libjpeg" ,libjpeg-turbo)
487 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
488 (home-page "http://www.pstoedit.net/")
489 (synopsis "Converter for PostScript and PDF graphics")
490 (description "The @code{pstoedit} utility allows translating graphics
491 in the PostScript or PDF (Portable Document Format) formats to various
492 other vector formats such as:
493 @itemize
494 @item Tgif (.obj)
495 @item gnuplot
496 @item xfig (.fig)
497 @item Flattened PostScript
498 @item DXF, a CAD (Computed-Aided Design) exchange format
499 @item PIC (for troff/groff)
500 @item MetaPost (for usage with TeX/LaTeX)
501 @item LaTeX2e picture
502 @item GNU Metafile (for use with plotutils/libplot)
503 @item Any format supported by ImageMagick
504 @end itemize")
505 (license license:gpl2+)))
506
507 (define-public ogre
508 (package
509 (name "ogre")
510 (version "1.12.5")
511 (source
512 (origin
513 (method git-fetch)
514 (uri (git-reference
515 (url "https://github.com/OGRECave/ogre")
516 (commit (string-append "v" version))
517 (recursive? #t))) ;for Dear ImGui submodule
518 (file-name (git-file-name name version))
519 (sha256
520 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
521 (build-system cmake-build-system)
522 (arguments
523 '(#:phases
524 (modify-phases %standard-phases
525 (add-before 'configure 'pre-configure
526 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
527 ;; a consequence, we cannot suggest ours in configure flags. Fix
528 ;; it.
529 (lambda* (#:key inputs outputs #:allow-other-keys)
530 (substitute* "CMakeLists.txt"
531 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
532 #t)))
533 #:configure-flags
534 (let* ((out (assoc-ref %outputs "out"))
535 (runpath
536 (string-join (list (string-append out "/lib")
537 (string-append out "/lib/OGRE"))
538 ";")))
539 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
540 "-DOGRE_BUILD_DEPENDENCIES=OFF"
541 "-DOGRE_BUILD_TESTS=TRUE"
542 "-DOGRE_INSTALL_DOCS=TRUE"
543 "-DOGRE_INSTALL_SAMPLES=TRUE"
544 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
545 (native-inputs
546 `(("boost" ,boost)
547 ("doxygen" ,doxygen)
548 ("googletest" ,googletest-1.8)
549 ("pkg-config" ,pkg-config)))
550 (inputs
551 `(("font-dejavu" ,font-dejavu)
552 ("freeimage" ,freeimage)
553 ("freetype" ,freetype)
554 ("glu" ,glu)
555 ("libxaw" ,libxaw)
556 ("libxrandr" ,libxrandr)
557 ("pugixml" ,pugixml)
558 ("sdl2" ,sdl2)
559 ("tinyxml" ,tinyxml)
560 ("zziplib" ,zziplib)))
561 (synopsis "Scene-oriented, flexible 3D engine written in C++")
562 (description
563 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
564 flexible 3D engine written in C++ designed to make it easier and more intuitive
565 for developers to produce applications utilising hardware-accelerated 3D
566 graphics.")
567 (home-page "https://www.ogre3d.org/")
568 (license license:expat)))
569
570 (define-public openexr
571 (package
572 (name "openexr")
573 (version (package-version ilmbase))
574 (source (origin
575 (inherit (package-source ilmbase))
576 (file-name (git-file-name "openexr" version))
577 (modules '((guix build utils)))
578 (snippet
579 '(begin
580 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
581 (("\"/var/tmp/\"")
582 "\"/tmp/\""))
583 #t))))
584 (build-system cmake-build-system)
585 (arguments
586 `(#:phases
587 (modify-phases %standard-phases
588 (add-after 'unpack 'change-directory
589 (lambda _
590 (chdir "OpenEXR")
591 #t))
592 (add-after 'change-directory 'increase-test-timeout
593 (lambda _
594 ;; On armhf-linux, we need to override the CTest default
595 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
596 (substitute* "IlmImfTest/CMakeLists.txt"
597 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
598 (string-append
599 all
600 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
601 #t))
602 ,@(if (not (target-64bit?))
603 `((add-after 'change-directory 'disable-broken-test
604 ;; This test fails on i686. Upstream developers suggest that
605 ;; this test is broken on i686 and can be safely disabled:
606 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
607 (lambda _
608 (substitute* "IlmImfTest/main.cpp"
609 ((".*testOptimizedInterleavePatterns.*") ""))
610 #t)))
611 '()))))
612 (native-inputs
613 `(("pkg-config" ,pkg-config)))
614 (propagated-inputs
615 `(("ilmbase" ,ilmbase) ;used in public headers
616 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
617 (home-page "https://www.openexr.com/")
618 (synopsis "High-dynamic range file format library")
619 (description
620 "OpenEXR is a high dynamic-range (HDR) image file format developed for
621 use in computer imaging applications. The IlmImf C++ libraries support
622 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
623 (license license:bsd-3)))
624
625 (define-public openimageio
626 (package
627 (name "openimageio")
628 (version "2.0.13")
629 (source (origin
630 (method git-fetch)
631 (uri (git-reference
632 (url "https://github.com/OpenImageIO/oiio")
633 (commit (string-append "Release-" version))))
634 (file-name (git-file-name name version))
635 (sha256
636 (base32
637 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
638 (build-system cmake-build-system)
639 ;; FIXME: To run all tests successfully, test image sets from multiple
640 ;; third party sources have to be present. For details see
641 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
642 (arguments
643 `(#:tests? #f))
644 (native-inputs
645 `(("pkg-config" ,pkg-config)))
646 (inputs
647 `(("boost" ,boost)
648 ("libpng" ,libpng)
649 ("libjpeg" ,libjpeg-turbo)
650 ("libtiff" ,libtiff)
651 ("giflib" ,giflib)
652 ("openexr" ,openexr)
653 ("ilmbase" ,ilmbase)
654 ("python" ,python-wrapper)
655 ("pybind11" ,pybind11)
656 ("robin-map" ,robin-map)
657 ("zlib" ,zlib)))
658 (synopsis "C++ library for reading and writing images")
659 (description
660 "OpenImageIO is a library for reading and writing images, and a bunch of
661 related classes, utilities, and applications. There is a particular emphasis
662 on formats and functionality used in professional, large-scale animation and
663 visual effects work for film.")
664 (home-page "https://www.openimageio.org")
665 (license license:bsd-3)))
666
667 (define-public openscenegraph
668 (package
669 (name "openscenegraph")
670 (version "3.6.5")
671 (source
672 (origin
673 (method git-fetch)
674 (uri (git-reference
675 (url "https://github.com/openscenegraph/OpenSceneGraph")
676 (commit (string-append "OpenSceneGraph-" version))))
677 (sha256
678 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
679 (file-name (git-file-name name version))))
680 (properties
681 `((upstream-name . "OpenSceneGraph")))
682 (build-system cmake-build-system)
683 (arguments
684 `(#:tests? #f ; no test target available
685 ;; Without this flag, 'rd' will be added to the name of the
686 ;; library binaries and break linking with other programs.
687 #:build-type "Release"
688 #:configure-flags
689 (list (string-append "-DCMAKE_INSTALL_RPATH="
690 (assoc-ref %outputs "out") "/lib:"
691 (assoc-ref %outputs "out") "/lib64"))))
692 (native-inputs
693 `(("pkg-config" ,pkg-config)
694 ("unzip" ,unzip)))
695 (inputs
696 `(("giflib" ,giflib)
697 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
698 ("jasper" ,jasper)
699 ("librsvg" ,librsvg)
700 ("libxrandr" ,libxrandr)
701 ("ffmpeg" ,ffmpeg)
702 ("mesa" ,mesa)))
703 (synopsis "High-performance real-time graphics toolkit")
704 (description
705 "The OpenSceneGraph is a high-performance 3D graphics toolkit
706 used by application developers in fields such as visual simulation, games,
707 virtual reality, scientific visualization and modeling.")
708 (home-page "http://www.openscenegraph.org")
709 ;; The 'LICENSE' file explains that the source is licensed under
710 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
711 (license license:lgpl2.1)))
712
713 ;; We need this for simgear
714 (define-public openscenegraph-3.4
715 (package (inherit openscenegraph)
716 (name "openscenegraph")
717 (version "3.4.1")
718 (source
719 (origin
720 (method git-fetch)
721 (uri (git-reference
722 (url "https://github.com/openscenegraph/OpenSceneGraph")
723 (commit (string-append "OpenSceneGraph-" version))))
724 (file-name (git-file-name name version))
725 (sha256
726 (base32
727 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
728 (arguments
729 (substitute-keyword-arguments (package-arguments openscenegraph)
730 ((#:configure-flags flags)
731 `(cons
732 ;; The jpeg plugin requires conversion between integers and booleans
733 "-DCMAKE_CXX_FLAGS=-fpermissive"
734 ,flags))))
735 (inputs
736 `(("libjpeg" ,libjpeg-turbo)
737 ,@(package-inputs openscenegraph)))))
738
739
740 (define-public openmw-openscenegraph
741 ;; OpenMW prefers its own fork of openscenegraph:
742 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
743 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
744 (hidden-package
745 (package
746 (inherit openscenegraph)
747 (version (git-version "3.6" "1" commit))
748 (source
749 (origin
750 (method git-fetch)
751 (uri (git-reference
752 (url "https://github.com/OpenMW/osg/")
753 (commit commit)))
754 (file-name (git-file-name (package-name openscenegraph) version))
755 (sha256
756 (base32
757 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
758 (arguments
759 (substitute-keyword-arguments (package-arguments openscenegraph)
760 ((#:configure-flags flags)
761 ;; As per the above wiki link, the following plugins are enough:
762 `(append
763 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
764 "-DBUILD_OSG_PLUGIN_OSG=1"
765 "-DBUILD_OSG_PLUGIN_DDS=1"
766 "-DBUILD_OSG_PLUGIN_TGA=1"
767 "-DBUILD_OSG_PLUGIN_BMP=1"
768 "-DBUILD_OSG_PLUGIN_JPEG=1"
769 "-DBUILD_OSG_PLUGIN_PNG=1"
770 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
771 ;; The jpeg plugin requires conversion between integers and booleans
772 "-DCMAKE_CXX_FLAGS=-fpermissive")
773 ,flags))))))))
774
775 (define-public povray
776 (package
777 (name "povray")
778 (version "3.7.0.8")
779 (source (origin
780 (method git-fetch)
781 (uri (git-reference
782 (url "https://github.com/POV-Ray/povray")
783 (commit (string-append "v" version))))
784 (file-name (git-file-name name version))
785 (sha256
786 (base32
787 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
788 (modules '((guix build utils)))
789 (snippet
790 '(begin
791 ;; Delete bundled libraries.
792 (delete-file-recursively "libraries")
793 #t))))
794 (build-system gnu-build-system)
795 (native-inputs
796 `(("autoconf" ,autoconf)
797 ("automake" ,automake)
798 ("pkg-config" ,pkg-config)))
799 (inputs
800 `(("boost" ,boost)
801 ("libjpeg" ,libjpeg-turbo)
802 ("libpng" ,libpng)
803 ("libtiff" ,libtiff)
804 ("openexr" ,openexr)
805 ("sdl" ,sdl)
806 ("zlib" ,zlib)))
807 (arguments
808 '(#:configure-flags
809 (list "COMPILED_BY=Guix"
810 (string-append "--with-boost-libdir="
811 (assoc-ref %build-inputs "boost") "/lib")
812 "--disable-optimiz-arch")
813 #:phases
814 (modify-phases %standard-phases
815 (add-after 'unpack 'run-prebuild
816 (lambda _
817 (setenv "HOME" (getcwd))
818 (with-directory-excursion "unix"
819 (substitute* "prebuild.sh"
820 (("/bin/sh") (which "sh")))
821 (invoke "sh" "prebuild.sh"))
822 #t))
823 ;; The bootstrap script is run by the prebuild script in the
824 ;; "run-prebuild" phase.
825 (delete 'bootstrap))))
826 (synopsis "Tool for creating three-dimensional graphics")
827 (description
828 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
829 for producing high-quality computer graphics. @code{POV-Ray} creates
830 three-dimensional, photo-realistic images using a rendering technique called
831 ray-tracing. It reads in a text file containing information describing the
832 objects and lighting in a scene and generates an image of that scene from the
833 view point of a camera also described in the text file. Ray-tracing is not a
834 fast process by any means, but it produces very high quality images with
835 realistic reflections, shading, perspective and other effects.")
836 (home-page "http://www.povray.org/")
837 (license license:agpl3+)))
838
839 (define-public rapicorn
840 (package
841 (name "rapicorn")
842 (version "16.0.0")
843 (source (origin
844 (method url-fetch)
845 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
846 "rapicorn-" version ".tar.xz"))
847 (sha256
848 (base32
849 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
850 (patches (search-patches "rapicorn-isnan.patch"))))
851 (build-system gnu-build-system)
852 (arguments
853 `(#:phases
854 (modify-phases %standard-phases
855 (add-after 'unpack 'fix-tests
856 (lambda _
857 ;; Our grep does not support perl regular expressions.
858 (substitute* "taptool.sh"
859 (("grep -P") "grep -E"))
860 ;; Disable path tests because we cannot access /bin or /sbin.
861 (substitute* "rcore/tests/multitest.cc"
862 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
863 #t))
864 (add-before 'check 'pre-check
865 (lambda _
866 ;; The test suite requires a running X server (with DISPLAY
867 ;; number 99 or higher).
868 (system "Xvfb :99 &")
869 (setenv "DISPLAY" ":99")
870 #t))
871 (add-after 'unpack 'replace-fhs-paths
872 (lambda _
873 (substitute* (cons "Makefile.decl"
874 (find-files "." "^Makefile\\.in$"))
875 (("/bin/ls") (which "ls"))
876 (("/usr/bin/env") (which "env")))
877 #t)))))
878 ;; These libraries are listed in the "Required" section of the pkg-config
879 ;; file.
880 (propagated-inputs
881 `(("librsvg" ,librsvg)
882 ("cairo" ,cairo)
883 ("pango" ,pango)
884 ("libxml2" ,libxml2)
885 ("python2-enum34" ,python2-enum34)))
886 (inputs
887 `(("gdk-pixbuf" ,gdk-pixbuf)
888 ("libpng" ,libpng-1.2)
889 ("readline" ,readline)
890 ("libcroco" ,libcroco)
891 ("python" ,python-2)
892 ("cython" ,python2-cython)))
893 (native-inputs
894 `(("pandoc" ,ghc-pandoc)
895 ("bison" ,bison)
896 ("flex" ,flex)
897 ("doxygen" ,doxygen)
898 ("graphviz" ,graphviz)
899 ("intltool" ,intltool)
900 ("pkg-config" ,pkg-config)
901 ("xvfb" ,xorg-server-for-tests)))
902 (home-page "https://rapicorn.testbit.org/")
903 (synopsis "Toolkit for rapid development of user interfaces")
904 (description
905 "Rapicorn is a toolkit for rapid development of user interfaces in C++
906 and Python. The user interface is designed in a declarative markup language
907 and is connected to the programming logic using data bindings and commands.")
908 (license license:mpl2.0)))
909
910 (define-public ctl
911 (package
912 (name "ctl")
913 (version "1.5.2")
914 (source (origin
915 (method url-fetch)
916 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
917 version ".tar.gz"))
918 (sha256
919 (base32
920 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
921 (build-system cmake-build-system)
922 (arguments '(#:tests? #f)) ;no 'test' target
923
924 ;; Headers include OpenEXR and IlmBase headers.
925 (propagated-inputs `(("openexr" ,openexr)))
926
927 (home-page "http://ampasctl.sourceforge.net")
928 (synopsis "Color Transformation Language")
929 (description
930 "The Color Transformation Language, or CTL, is a small programming
931 language that was designed to serve as a building block for digital color
932 management systems. CTL allows users to describe color transforms in a
933 concise and unambiguous way by expressing them as programs. In order to apply
934 a given transform to an image, the color management system instructs a CTL
935 interpreter to load and run the CTL program that describes the transform. The
936 original and the transformed image constitute the CTL program's input and
937 output.")
938
939 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
940 ;; and headers use different wording.
941 (license (license:non-copyleft "file://LICENSE"))))
942
943 (define-public brdf-explorer
944 ;; There are no release tarballs, and not even tags in the repo,
945 ;; so use the latest revision.
946 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
947 (revision "1"))
948 (package
949 (name "brdf-explorer")
950 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
951 (source (origin
952 (method git-fetch)
953 (uri (git-reference
954 (url "https://github.com/wdas/brdf")
955 (commit commit)))
956 (sha256
957 (base32
958 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
959 (file-name (string-append name "-" version "-checkout"))))
960 (build-system gnu-build-system)
961 (arguments
962 `(#:phases (modify-phases %standard-phases
963 (replace 'configure
964 (lambda* (#:key outputs #:allow-other-keys)
965 (let ((out (assoc-ref outputs "out")))
966 (invoke "qmake"
967 (string-append "prefix=" out)))))
968 (add-after 'install 'wrap-program
969 (lambda* (#:key outputs #:allow-other-keys)
970 (let* ((out (assoc-ref outputs "out"))
971 (bin (string-append out "/bin"))
972 (data (string-append
973 out "/share/brdf")))
974 (with-directory-excursion bin
975 (rename-file "brdf" ".brdf-real")
976 (call-with-output-file "brdf"
977 (lambda (port)
978 (format port "#!/bin/sh
979 # Run the thing from its home, otherwise it just bails out.
980 cd \"~a\"
981 exec -a \"$0\" ~a/.brdf-real~%"
982 data bin)))
983 (chmod "brdf" #o555)))
984 #t)))))
985 (native-inputs
986 `(("qttools" ,qttools))) ;for 'qmake'
987 (inputs
988 `(("qtbase" ,qtbase)
989 ("mesa" ,mesa)
990 ("glew" ,glew)
991 ("freeglut" ,freeglut)
992 ("zlib" ,zlib)))
993 (home-page "https://www.disneyanimation.com/technology/brdf.html")
994 (synopsis
995 "Analyze bidirectional reflectance distribution functions (BRDFs)")
996 (description
997 "BRDF Explorer is an application that allows the development and analysis
998 of bidirectional reflectance distribution functions (BRDFs). It can load and
999 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1000 language), measured material data from the MERL database, and anisotropic
1001 measured material data from MIT CSAIL. Graphs and visualizations update in
1002 real time as parameters are changed, making it a useful tool for evaluating
1003 and understanding different BRDFs (and other component functions).")
1004 (license license:ms-pl))))
1005
1006 (define-public agg
1007 (package
1008 (name "agg")
1009 (version "2.5")
1010 (source (origin
1011 (method url-fetch)
1012 (uri (list (string-append
1013 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1014 version ".tar.gz")
1015 (string-append
1016 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1017 version ".tar.gz")
1018
1019 ;; Site was discontinued.
1020 (string-append "http://www.antigrain.com/agg-"
1021 version ".tar.gz")))
1022 (sha256
1023 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1024 (patches (search-patches "agg-am_c_prototype.patch"))))
1025 (build-system gnu-build-system)
1026 (arguments
1027 '(#:configure-flags
1028 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1029 "/include")
1030 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1031 "/lib")
1032 "--disable-examples")
1033 #:phases
1034 (modify-phases %standard-phases
1035 (replace 'bootstrap
1036 (lambda _
1037 ;; let's call configure from configure phase and not now
1038 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1039 (invoke "sh" "autogen.sh"))))))
1040 (native-inputs
1041 `(("pkg-config" ,pkg-config)
1042 ("libtool" ,libtool)
1043 ("autoconf" ,autoconf)
1044 ("automake" ,automake)))
1045 (inputs
1046 `(("libx11" ,libx11)
1047 ("freetype" ,freetype)
1048 ("sdl" ,sdl)))
1049
1050 ;; Antigrain.com was discontinued.
1051 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1052 (synopsis "High-quality 2D graphics rendering engine for C++")
1053 (description
1054 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1055 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1056 rendering SVG graphics.")
1057 (license license:gpl2+)))
1058
1059 (define-public python-pastel
1060 (package
1061 (name "python-pastel")
1062 (version "0.2.0")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pastel" version))
1067 (sha256
1068 (base32
1069 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1070 (build-system python-build-system)
1071 (arguments
1072 `(#:phases (modify-phases %standard-phases
1073 (replace 'check
1074 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1075 (native-inputs
1076 `(("python-pytest" ,python-pytest)))
1077 (home-page "https://github.com/sdispater/pastel")
1078 (synopsis "Library to colorize strings in your terminal")
1079 (description "Pastel is a simple library to help you colorize strings in
1080 your terminal.")
1081 (license license:expat)))
1082
1083 (define-public python2-pastel
1084 (package-with-python2 python-pastel))
1085
1086 (define-public fgallery
1087 (package
1088 (name "fgallery")
1089 (version "1.8.2")
1090 (source (origin
1091 (method url-fetch)
1092 (uri
1093 (string-append
1094 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1095 "fgallery-" version ".zip"))
1096 (sha256
1097 (base32
1098 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1099 (build-system gnu-build-system)
1100 (arguments
1101 `(#:tests? #f ; no tests
1102 #:phases
1103 (modify-phases %standard-phases
1104 (delete 'configure)
1105 (delete 'build)
1106 (replace 'install
1107 (lambda* (#:key inputs outputs #:allow-other-keys)
1108 (let* ((out (assoc-ref outputs "out"))
1109 (bin (string-append out "/bin/"))
1110 (share (string-append out "/share/fgallery"))
1111 (man (string-append out "/share/man/man1"))
1112 (perl5lib (getenv "PERL5LIB"))
1113 (script (string-append share "/fgallery")))
1114 (define (bin-directory input-name)
1115 (string-append (assoc-ref inputs input-name) "/bin"))
1116
1117 (mkdir-p man)
1118 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1119
1120 (mkdir-p share)
1121 (copy-recursively "." share)
1122
1123 ;; fgallery copies files from store when it is run. The
1124 ;; read-only permissions from the store directories will cause
1125 ;; fgallery to fail. Do not preserve file attributes when
1126 ;; copying files to prevent it.
1127 (substitute* script
1128 (("'cp'")
1129 "'cp', '--no-preserve=all'"))
1130
1131 (mkdir-p bin)
1132 (symlink script (string-append out "/bin/fgallery"))
1133
1134 (wrap-program script
1135 `("PATH" ":" prefix
1136 ,(map bin-directory '("imagemagick"
1137 "lcms"
1138 "fbida"
1139 "libjpeg"
1140 "zip"
1141 "jpegoptim"
1142 "pngcrush"
1143 "p7zip")))
1144 `("PERL5LIB" ":" prefix (,perl5lib)))
1145 #t))))))
1146 (native-inputs
1147 `(("unzip" ,unzip)))
1148 ;; TODO: Add missing optional dependency: facedetect.
1149 (inputs
1150 `(("imagemagick" ,imagemagick)
1151 ("lcms" ,lcms)
1152 ("fbida" ,fbida)
1153 ("libjpeg" ,libjpeg-turbo)
1154 ("zip" ,zip)
1155 ("perl" ,perl)
1156 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1157 ("perl-image-exiftool" ,perl-image-exiftool)
1158 ("jpegoptim" ,jpegoptim)
1159 ("pngcrush" ,pngcrush)
1160 ("p7zip" ,p7zip)))
1161 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1162 (synopsis "Static photo gallery generator")
1163 (description
1164 "FGallery is a static, JavaScript photo gallery generator with minimalist
1165 look. The result can be uploaded on any web server without additional
1166 requirements.")
1167 (license license:gpl2+)))
1168
1169 (define-public opensubdiv
1170 (package
1171 (name "opensubdiv")
1172 (version "3.4.0")
1173 (source (origin
1174 (method git-fetch)
1175 (uri (git-reference
1176 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1177 (commit (string-append "v" (string-join (string-split version #\.)
1178 "_")))))
1179 (file-name (git-file-name name version))
1180 (sha256
1181 (base32
1182 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1183 (build-system cmake-build-system)
1184 (arguments
1185 `(#:phases (modify-phases %standard-phases
1186 (add-before 'configure 'set-glew-location
1187 (lambda* (#:key inputs #:allow-other-keys)
1188 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1189 #t))
1190 (add-before 'check 'start-xorg-server
1191 (lambda* (#:key inputs #:allow-other-keys)
1192 ;; The test suite requires a running X server.
1193 (system (string-append (assoc-ref inputs "xorg-server")
1194 "/bin/Xvfb :1 &"))
1195 (setenv "DISPLAY" ":1")
1196 #t)))))
1197 (native-inputs
1198 `(("xorg-server" ,xorg-server-for-tests)))
1199 (inputs
1200 `(("glew" ,glew)
1201 ("libxrandr" ,libxrandr)
1202 ("libxcursor" ,libxcursor)
1203 ("libxinerama" ,libxinerama)
1204 ("libxi" ,libxi)
1205 ("zlib" ,zlib)
1206 ("glfw" ,glfw)))
1207 (home-page "https://graphics.pixar.com/opensubdiv/")
1208 (synopsis "High performance subdivision surface evaluation")
1209 (description "OpenSubdiv is a set of libraries that implement high
1210 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1211 and GPU architectures.")
1212 (license license:asl2.0)))
1213
1214 (define-public opencsg
1215 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1216 (package
1217 (name "opencsg")
1218 (version "1.4.2")
1219 (source
1220 (origin
1221 (method git-fetch)
1222 (uri (git-reference
1223 (url "https://github.com/floriankirsch/OpenCSG")
1224 (commit (string-append "opencsg-"
1225 (string-map dot-to-dash version)
1226 "-release"))))
1227 (file-name (git-file-name name version))
1228 (sha256
1229 (base32
1230 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1231 (build-system gnu-build-system)
1232 (arguments
1233 `(#:phases
1234 (modify-phases %standard-phases
1235 (replace 'configure
1236 (lambda* (#:key outputs #:allow-other-keys)
1237 (substitute* "src/Makefile"
1238 (("/usr/local") (assoc-ref outputs "out")))
1239 #t))
1240 (add-before 'build 'skip-example
1241 (lambda _ (chdir "src") #t)))))
1242 (inputs
1243 `(("glew" ,glew)
1244 ("freeglut" ,freeglut)))
1245 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1246 (description
1247 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1248 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1249 For example, two shapes can be combined by uniting them, by intersecting them,
1250 or by subtracting one shape from the other.")
1251 (home-page "http://www.opencsg.org/")
1252 (license license:gpl2))))
1253
1254 (define-public coin3D
1255 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1256 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1257 (let ((revision 1)
1258 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1259 (package
1260 (name "coin3D")
1261 (version
1262 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1263 (source
1264 (origin
1265 (method hg-fetch)
1266 (uri (hg-reference
1267 (url "https://bitbucket.org/Coin3D/coin")
1268 (changeset changeset)))
1269 (file-name (git-file-name name version))
1270 (sha256
1271 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1272 (modules '((guix build utils)))
1273 (snippet
1274 '(begin
1275 (for-each delete-file
1276 '("cfg/csubst.exe"
1277 "cfg/wrapmsvc.exe"))
1278 #t))))
1279 (build-system cmake-build-system)
1280 (native-inputs
1281 `(("doxygen" ,doxygen)
1282 ("graphviz" ,graphviz)))
1283 (inputs
1284 `(("boost" ,boost)
1285 ("freeglut" ,freeglut)
1286 ("glew" ,glew)))
1287 (arguments
1288 `(#:configure-flags
1289 (list
1290 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1291 (string-append "-DBOOST_ROOT="
1292 (assoc-ref %build-inputs "boost")))))
1293 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1294 (synopsis
1295 "High-level 3D visualization library with Open Inventor 2.1 API")
1296 (description
1297 "Coin is a 3D graphics library with an Application Programming Interface
1298 based on the Open Inventor 2.1 API. For those who are not familiar with
1299 Open Inventor, it is a scene-graph based retain-mode rendering and model
1300 interaction library, written in C++, which has become the de facto
1301 standard graphics library for 3D visualization and visual simulation
1302 software in the scientific and engineering community.")
1303 (license license:bsd-3))))
1304
1305 (define-public superfamiconv
1306 (package
1307 (name "superfamiconv")
1308 (version "0.8.8")
1309 (source
1310 (origin
1311 (method git-fetch)
1312 (uri (git-reference
1313 (url "https://github.com/Optiroc/SuperFamiconv")
1314 (commit (string-append "v" version))))
1315 (file-name (git-file-name name version))
1316 (sha256
1317 (base32
1318 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1319 (build-system gnu-build-system)
1320 (arguments
1321 `(#:tests? #f ; no tests
1322 #:phases
1323 (modify-phases %standard-phases
1324 (delete 'configure)
1325 (replace 'install
1326 (lambda* (#:key outputs #:allow-other-keys)
1327 (let* ((outdir (assoc-ref outputs "out"))
1328 (bindir (string-append outdir "/bin")))
1329 (install-file "bin/superfamiconv" bindir)
1330 #t))))))
1331 (home-page "https://github.com/Optiroc/SuperFamiconv")
1332 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1333 and PC Engine formats")
1334 (description "SuperFamiconv is a converter for tiled graphics, supporting
1335 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1336 Automated palette selection is supported.")
1337 (license license:expat)))