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