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