gnu: ocaml-ezjsonm: Update to 1.1.0.
[jackhill/guix/guix.git] / gnu / packages / graphics.scm
CommitLineData
f327b36e 1;;; GNU Guix --- Functional package management for GNU
79f912c7 2;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
e9f1fa39 3;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
5e8276dc 4;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
df8ab774 5;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
1cd968e8 6;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
42bf3429 7;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
6bf11392 8;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
f63d6188 9;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
3def739d 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
17153d18 11;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
fc4f13bd 12;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
340ee00b 13;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
8b672b2c 14;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
f327b36e
LC
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages graphics)
cab6a253 32 #:use-module (gnu packages)
0e2f2aeb
RW
33 #:use-module (gnu packages algebra)
34 #:use-module (gnu packages audio)
87bafa07
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages bash)
96d15e48 37 #:use-module (gnu packages bison)
87bafa07 38 #:use-module (gnu packages boost)
dd75a9a2 39 #:use-module (gnu packages check)
595d1bd5 40 #:use-module (gnu packages compression)
99828fa7 41 #:use-module (gnu packages documentation)
96d15e48 42 #:use-module (gnu packages flex)
dd75a9a2 43 #:use-module (gnu packages fonts)
87bafa07 44 #:use-module (gnu packages fontutils)
595d1bd5 45 #:use-module (gnu packages ghostscript)
a29bfc28 46 #:use-module (gnu packages gl)
96d15e48 47 #:use-module (gnu packages glib)
595d1bd5 48 #:use-module (gnu packages gnome)
96d15e48
RW
49 #:use-module (gnu packages graphviz)
50 #:use-module (gnu packages gtk)
595d1bd5 51 #:use-module (gnu packages haskell)
0e2f2aeb 52 #:use-module (gnu packages image)
595d1bd5 53 #:use-module (gnu packages imagemagick)
0e2f2aeb 54 #:use-module (gnu packages jemalloc)
595d1bd5
TGR
55 #:use-module (gnu packages multiprecision)
56 #:use-module (gnu packages pdf)
57 #:use-module (gnu packages perl)
0e2f2aeb 58 #:use-module (gnu packages photo)
595d1bd5 59 #:use-module (gnu packages pkg-config)
6bf11392 60 #:use-module (gnu packages pth)
595d1bd5 61 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
0e2f2aeb 62 #:use-module (gnu packages python)
44d10b1f 63 #:use-module (gnu packages python-xyz)
87bafa07 64 #:use-module (gnu packages qt)
96d15e48 65 #:use-module (gnu packages readline)
87bafa07 66 #:use-module (gnu packages sdl)
dd75a9a2 67 #:use-module (gnu packages swig)
0e2f2aeb 68 #:use-module (gnu packages video)
96d15e48 69 #:use-module (gnu packages xml)
595d1bd5
TGR
70 #:use-module (gnu packages xorg)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system python)
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (guix packages)
78 #:use-module (guix utils))
f327b36e 79
0e2f2aeb 80(define-public blender
fc51c28a
LF
81 (let ((revision "0")
82 (commit "3c3d80ea22af15e13237f978181a881b90c41e7c"))
0e2f2aeb
RW
83 (package
84 (name "blender")
fc51c28a 85 (version (git-version "2.80-beta" revision commit))
0e2f2aeb 86 (source (origin
fc51c28a
LF
87 (method git-fetch)
88 (uri (git-reference
89 (url "https://git.blender.org/blender.git")
90 (commit commit)))
91 (file-name (git-file-name name version))
0e2f2aeb
RW
92 (sha256
93 (base32
fc51c28a 94 "1hhn8pf3a5556mxyrb2ggsiy6q0h75hnkdpcgq9b6vg284jl2l4q"))))
0e2f2aeb
RW
95 (build-system cmake-build-system)
96 (arguments
bb9cd6de
LF
97 (let ((python-version (version-major+minor (package-version python))))
98 `(;; Test files are very large and not included in the release tarball.
99 #:tests? #f
100 #:configure-flags
101 (list "-DWITH_CODEC_FFMPEG=ON"
102 "-DWITH_CODEC_SNDFILE=ON"
103 "-DWITH_CYCLES=ON"
104 "-DWITH_DOC_MANPAGE=ON"
105 "-DWITH_FFTW3=ON"
bb9cd6de
LF
106 "-DWITH_IMAGE_OPENJPEG=ON"
107 "-DWITH_INPUT_NDOF=ON"
108 "-DWITH_INSTALL_PORTABLE=OFF"
109 "-DWITH_JACK=ON"
110 "-DWITH_MOD_OCEANSIM=ON"
bb9cd6de 111 "-DWITH_PYTHON_INSTALL=OFF"
bb9cd6de
LF
112 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
113 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
114 "/lib")
115 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
116 "/include/python" ,python-version "m")
fc51c28a
LF
117 (string-append "-DPYTHON_VERSION=" ,python-version)
118 (string-append "-DPYTHON_NUMPY_PATH="
119 (assoc-ref %build-inputs "python-numpy")
120 "/lib/python" ,python-version "/site-packages/"))
bb9cd6de
LF
121 #:phases
122 (modify-phases %standard-phases
fc51c28a
LF
123 ;; XXX This file doesn't exist in the Git sources but will probably
124 ;; exist in the eventual 2.80 source tarball.
125; (add-after 'unpack 'fix-broken-import
126; (lambda _
127; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
128; (("import encode_bin") "from . import encode_bin"))
129; #t))
bb9cd6de
LF
130 (add-after 'set-paths 'add-ilmbase-include-path
131 (lambda* (#:key inputs #:allow-other-keys)
132 ;; OpenEXR propagates ilmbase, but its include files do not appear
133 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
134 ;; the CPATH to satisfy the dependency on "half.h".
135 (setenv "CPATH"
136 (string-append (assoc-ref inputs "ilmbase")
137 "/include/OpenEXR"
138 ":" (or (getenv "CPATH") "")))
139 #t))))))
0e2f2aeb
RW
140 (inputs
141 `(("boost" ,boost)
142 ("jemalloc" ,jemalloc)
143 ("libx11" ,libx11)
144 ("openimageio" ,openimageio)
145 ("openexr" ,openexr)
146 ("ilmbase" ,ilmbase)
fc51c28a 147 ("openjpeg" ,openjpeg)
0e2f2aeb
RW
148 ("libjpeg" ,libjpeg)
149 ("libpng" ,libpng)
150 ("libtiff" ,libtiff)
5deb0c67 151 ("ffmpeg" ,ffmpeg)
0e2f2aeb
RW
152 ("fftw" ,fftw)
153 ("jack" ,jack-1)
154 ("libsndfile" ,libsndfile)
155 ("freetype" ,freetype)
156 ("glew" ,glew)
157 ("openal" ,openal)
bb9cd6de 158 ("python" ,python)
fc51c28a 159 ("python-numpy" ,python-numpy)
0e2f2aeb 160 ("zlib" ,zlib)))
9a6f5bbc 161 (home-page "https://blender.org/")
0e2f2aeb
RW
162 (synopsis "3D graphics creation suite")
163 (description
164 "Blender is a 3D graphics creation suite. It supports the entirety of
165the 3D pipeline—modeling, rigging, animation, simulation, rendering,
166compositing and motion tracking, even video editing and game creation. The
fc51c28a
LF
167application can be customized via its API for Python scripting.
168
8b672b2c 169WARNING: This is a beta build of Blender.")
fc51c28a 170 (license license:gpl2+))))
0e2f2aeb 171
8b672b2c
MW
172(define-public blender-2.79
173 (package
174 (name "blender")
175 (version "2.79b")
176 (source (origin
177 (method url-fetch)
178 (uri (string-append "https://download.blender.org/source/"
179 "blender-" version ".tar.gz"))
180 (sha256
181 (base32
182 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
183 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
184 "blender-2.79-python-3.7-fix.patch"))))
185 (build-system cmake-build-system)
186 (arguments
187 (let ((python-version (version-major+minor (package-version python))))
188 `(;; Test files are very large and not included in the release tarball.
189 #:tests? #f
190 #:configure-flags
191 (list "-DWITH_CODEC_FFMPEG=ON"
192 "-DWITH_CODEC_SNDFILE=ON"
193 "-DWITH_CYCLES=ON"
194 "-DWITH_DOC_MANPAGE=ON"
195 "-DWITH_FFTW3=ON"
196 "-DWITH_GAMEENGINE=ON"
197 "-DWITH_IMAGE_OPENJPEG=ON"
198 "-DWITH_INPUT_NDOF=ON"
199 "-DWITH_INSTALL_PORTABLE=OFF"
200 "-DWITH_JACK=ON"
201 "-DWITH_MOD_OCEANSIM=ON"
202 "-DWITH_PLAYER=ON"
203 "-DWITH_PYTHON_INSTALL=OFF"
204 "-DWITH_PYTHON_INSTALL=OFF"
205 "-DWITH_SYSTEM_OPENJPEG=ON"
206 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
207 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
208 "/lib")
209 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
210 "/include/python" ,python-version "m")
211 (string-append "-DPYTHON_VERSION=" ,python-version))
212 #:phases
213 (modify-phases %standard-phases
214 (add-after 'unpack 'fix-broken-import
215 (lambda _
216 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
217 (("import encode_bin") "from . import encode_bin"))
218 #t))
219 (add-after 'set-paths 'add-ilmbase-include-path
220 (lambda* (#:key inputs #:allow-other-keys)
221 ;; OpenEXR propagates ilmbase, but its include files do not appear
222 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
223 ;; the CPATH to satisfy the dependency on "half.h".
224 (setenv "CPATH"
225 (string-append (assoc-ref inputs "ilmbase")
226 "/include/OpenEXR"
227 ":" (or (getenv "CPATH") "")))
228 #t))))))
229 (inputs
230 `(("boost" ,boost)
231 ("jemalloc" ,jemalloc)
232 ("libx11" ,libx11)
233 ("openimageio" ,openimageio)
234 ("openexr" ,openexr)
235 ("ilmbase" ,ilmbase)
236 ("openjpeg" ,openjpeg-1)
237 ("libjpeg" ,libjpeg)
238 ("libpng" ,libpng)
239 ("libtiff" ,libtiff)
240 ("ffmpeg" ,ffmpeg)
241 ("fftw" ,fftw)
242 ("jack" ,jack-1)
243 ("libsndfile" ,libsndfile)
244 ("freetype" ,freetype)
245 ("glew" ,glew)
246 ("openal" ,openal)
247 ("python" ,python)
248 ("zlib" ,zlib)))
249 (home-page "https://blender.org/")
250 (synopsis "3D graphics creation suite")
251 (description
252 "Blender is a 3D graphics creation suite. It supports the entirety of
253the 3D pipeline—modeling, rigging, animation, simulation, rendering,
254compositing and motion tracking, even video editing and game creation. The
255application can be customized via its API for Python scripting.
256
257NOTE: This older version of Blender is the last release that does not require
258OpenGL 3. It is retained for use with older computers.")
259 (license license:gpl2+)))
260
5a82f933
RW
261(define-public assimp
262 (package
263 (name "assimp")
2d4514e9 264 (version "4.1.0")
5a82f933 265 (source (origin
2d4514e9
EF
266 (method git-fetch)
267 (uri (git-reference
268 (url "https://github.com/assimp/assimp.git")
269 (commit (string-append "v" version))))
270 (file-name (git-file-name name version))
5a82f933
RW
271 (sha256
272 (base32
2d4514e9 273 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
5a82f933
RW
274 (build-system cmake-build-system)
275 (inputs
276 `(("zlib" ,zlib)))
2d4514e9 277 (home-page "http://www.assimp.org/")
5a82f933
RW
278 (synopsis "Asset import library")
279 (description
280 "The Open Asset Import Library loads more than 40 3D file formats into
281one unified data structure. Additionally, assimp features various mesh post
282processing tools: normals and tangent space generation, triangulation, vertex
283cache locality optimization, removal of degenerate primitives and duplicate
284vertices, sorting by primitive type, merging of redundant materials and many
285more.")
286 (license license:bsd-3)))
287
f327b36e
LC
288(define-public cgal
289 (package
290 (name "cgal")
0a7fc756 291 (version "4.8.1")
f327b36e
LC
292 (source (origin
293 (method url-fetch)
294 (uri (string-append
0a7fc756
EF
295 "https://github.com/CGAL/cgal/releases/download/releases/"
296 "CGAL-" version "/CGAL-" version ".tar.xz"))
f327b36e
LC
297 (sha256
298 (base32
0a7fc756 299 "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s"))))
f327b36e
LC
300 (build-system cmake-build-system)
301 (arguments
302 '(;; "RelWithDebInfo" is not supported.
303 #:build-type "Release"
304
305 ;; No 'test' target.
306 #:tests? #f))
307 (inputs
308 `(("mpfr" ,mpfr)
309 ("gmp" ,gmp)
310 ("boost" ,boost)))
311 (home-page "http://cgal.org/")
312 (synopsis "Computational geometry algorithms library")
313 (description
314 "CGAL provides easy access to efficient and reliable geometric algorithms
315in the form of a C++ library. CGAL is used in various areas needing geometric
316computation, such as: computer graphics, scientific visualization, computer
317aided design and modeling, geographic information systems, molecular biology,
318medical imaging, robotics and motion planning, mesh generation, numerical
319methods, etc. It provides data structures and algorithms such as
320triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
321many more.")
322
323 ;; The 'LICENSE' file explains that a subset is available under more
324 ;; permissive licenses.
325 (license license:gpl3+)))
cab6a253
LC
326
327(define-public ilmbase
328 (package
329 (name "ilmbase")
1ae2c577 330 (version "2.3.0")
cab6a253
LC
331 (source (origin
332 (method url-fetch)
1ae2c577
MB
333 (uri (string-append "https://github.com/openexr/openexr/releases"
334 "/download/v" version "/ilmbase-"
cab6a253
LC
335 version ".tar.gz"))
336 (sha256
337 (base32
1ae2c577 338 "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5"))
fc1adab1 339 (patches (search-patches "ilmbase-fix-tests.patch"))))
cab6a253
LC
340 (build-system gnu-build-system)
341 (home-page "http://www.openexr.com/")
342 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
343 (description
344 "IlmBase provides several utility libraries for C++. Half is a class
345that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
346abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
347quaternions and other useful 2D and 3D math functions. Iex is an
348exception-handling library.")
349 (license license:bsd-3)))
350
dd75a9a2
MR
351(define-public ogre
352 (package
353 (name "ogre")
f63d6188 354 (version "1.10.11")
dd75a9a2
MR
355 (source
356 (origin
1aa662b3
EF
357 (method git-fetch)
358 (uri (git-reference
359 (url "https://github.com/OGRECave/ogre.git")
360 (commit (string-append "v" version))))
361 (file-name (git-file-name name version))
dd75a9a2
MR
362 (sha256
363 (base32
1aa662b3 364 "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr"))))
dd75a9a2
MR
365 (build-system cmake-build-system)
366 (arguments
367 '(#:phases
368 (modify-phases %standard-phases
369 (add-before 'configure 'pre-configure
dd75a9a2 370 (lambda* (#:key inputs #:allow-other-keys)
d5640c58
EF
371 (substitute* "Tests/CMakeLists.txt"
372 (("URL(.*)$")
373 (string-append "URL " (assoc-ref inputs "googletest-source"))))
dd75a9a2
MR
374 #t)))
375 #:configure-flags
376 (list "-DOGRE_BUILD_TESTS=TRUE"
377 (string-append "-DCMAKE_INSTALL_RPATH="
378 (assoc-ref %outputs "out") "/lib:"
379 (assoc-ref %outputs "out") "/lib/OGRE:"
380 (assoc-ref %build-inputs "googletest") "/lib")
381 "-DOGRE_INSTALL_DOCS=TRUE"
382 "-DOGRE_INSTALL_SAMPLES=TRUE"
383 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
384 (native-inputs
385 `(("boost" ,boost)
386 ("doxygen" ,doxygen)
387 ("googletest-source" ,(package-source googletest))
388 ("pkg-config" ,pkg-config)))
389 (inputs
390 `(("font-dejavu" ,font-dejavu)
391 ("freeimage" ,freeimage)
392 ("freetype" ,freetype)
393 ("glu" ,glu)
394 ("googletest" ,googletest)
395 ("sdl2" ,sdl2)
396 ("libxaw" ,libxaw)
397 ("libxrandr" ,libxrandr)
398 ("tinyxml" ,tinyxml)
399 ("zziplib" ,zziplib)))
400 (synopsis "Scene-oriented, flexible 3D engine written in C++")
401 (description
402 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
403flexible 3D engine written in C++ designed to make it easier and more intuitive
404for developers to produce applications utilising hardware-accelerated 3D
405graphics.")
406 (home-page "http://www.ogre3d.org/")
407 (license license:expat)))
408
cab6a253
LC
409(define-public openexr
410 (package
411 (name "openexr")
fcde1d27 412 (version "2.3.0")
cab6a253
LC
413 (source (origin
414 (method url-fetch)
fcde1d27
MB
415 (uri (string-append "https://github.com/openexr/openexr/releases"
416 "/download/v" version "/openexr-"
cab6a253
LC
417 version ".tar.gz"))
418 (sha256
419 (base32
fcde1d27 420 "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x"))
cab6a253
LC
421 (modules '((guix build utils)))
422 (snippet
c2c36f5f
LC
423 '(begin
424 (substitute* (find-files "." "tmpDir\\.h")
425 (("\"/var/tmp/\"")
426 "\"/tmp/\""))
fcde1d27 427 #t))))
cab6a253 428 (build-system gnu-build-system)
bce6f7ce
LF
429 (arguments
430 '(#:phases
431 (modify-phases %standard-phases
432 (add-after 'unpack 'disable-broken-test
433 ;; This test fails on i686. Upstream developers suggest that
434 ;; this test is broken on i686 and can be safely disabled:
435 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
436 (lambda _
437 (substitute* "IlmImfTest/main.cpp"
438 (("#include \"testOptimizedInterleavePatterns.h\"")
439 "//#include \"testOptimizedInterleavePatterns.h\"")
440 (("TEST \\(testOptimizedInterleavePatterns")
441 "//TEST (testOptimizedInterleavePatterns"))
442 #t)))))
cab6a253
LC
443 (native-inputs
444 `(("pkg-config" ,pkg-config)))
445 (propagated-inputs
446 `(("ilmbase" ,ilmbase) ;used in public headers
447 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
448 (home-page "http://www.openexr.com")
9f2840cb 449 (synopsis "High-dynamic range file format library")
cab6a253
LC
450 (description
451 "OpenEXR is a high dynamic-range (HDR) image file format developed for
9f2840cb
LC
452use in computer imaging applications. The IlmImf C++ libraries support
453storage of the \"EXR\" file format for storing 16-bit floating-point images.")
cab6a253 454 (license license:bsd-3)))
9d620590 455
71299c12
RW
456(define-public openimageio
457 (package
458 (name "openimageio")
3a30ae05 459 (version "1.7.19")
71299c12 460 (source (origin
1cd968e8
EF
461 (method git-fetch)
462 (uri (git-reference
463 (url "https://github.com/OpenImageIO/oiio.git")
464 (commit (string-append "Release-" version))))
465 (file-name (git-file-name name version))
71299c12
RW
466 (sha256
467 (base32
1cd968e8 468 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))
71299c12
RW
469 (build-system cmake-build-system)
470 ;; FIXME: To run all tests successfully, test image sets from multiple
471 ;; third party sources have to be present. For details see
472 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
473 (arguments `(#:tests? #f))
474 (native-inputs
475 `(("pkg-config" ,pkg-config)))
476 (inputs
477 `(("boost" ,boost)
478 ("libpng" ,libpng)
09982785 479 ("libjpeg" ,libjpeg)
71299c12
RW
480 ("libtiff" ,libtiff)
481 ("giflib" ,giflib)
482 ("openexr" ,openexr)
483 ("ilmbase" ,ilmbase)
484 ("python" ,python-2)
485 ("zlib" ,zlib)))
486 (synopsis "C++ library for reading and writing images")
487 (description
488 "OpenImageIO is a library for reading and writing images, and a bunch of
489related classes, utilities, and applications. There is a particular emphasis
490on formats and functionality used in professional, large-scale animation and
491visual effects work for film.")
492 (home-page "http://www.openimageio.org")
493 (license license:bsd-3)))
494
6bf11392
MR
495(define-public openscenegraph
496 (package
497 (name "openscenegraph")
3752b683 498 (version "3.6.3")
6bf11392
MR
499 (source
500 (origin
fc4f13bd
AK
501 (method git-fetch)
502 (uri (git-reference
503 (url "https://github.com/openscenegraph/OpenSceneGraph")
504 (commit (string-append "OpenSceneGraph-" version))))
6bf11392
MR
505 (sha256
506 (base32
3752b683
TGR
507 "0h32z15sa8sbq276j0iib0n707m8bs4p5ji9z2ah411446paad9q"))
508 (file-name (git-file-name name version))))
fc4f13bd
AK
509 (properties
510 `((upstream-name . "OpenSceneGraph")))
6bf11392
MR
511 (build-system cmake-build-system)
512 (arguments
3def739d
TGR
513 `(#:tests? #f ; no test target available
514 ;; Without this flag, 'rd' will be added to the name of the
515 ;; library binaries and break linking with other programs.
516 #:build-type "Release"
6bf11392
MR
517 #:configure-flags
518 (list (string-append "-DCMAKE_INSTALL_RPATH="
519 (assoc-ref %outputs "out") "/lib:"
3def739d 520 (assoc-ref %outputs "out") "/lib64"))))
6bf11392 521 (native-inputs
fc4f13bd
AK
522 `(("pkg-config" ,pkg-config)
523 ("unzip" ,unzip)))
6bf11392 524 (inputs
c695fb76
TGR
525 `(("giflib" ,giflib)
526 ("jasper" ,jasper)
527 ("librsvg" ,librsvg)
fc4f13bd 528 ("libxrandr" ,libxrandr)
c695fb76
TGR
529 ("ffmpeg" ,ffmpeg)
530 ("mesa" ,mesa)))
6bf11392
MR
531 (synopsis "High performance real-time graphics toolkit")
532 (description
d7c5aac1 533 "The OpenSceneGraph is a high performance 3D graphics toolkit
6bf11392 534used by application developers in fields such as visual simulation, games,
d7c5aac1 535virtual reality, scientific visualization and modeling.")
6bf11392
MR
536 (home-page "http://www.openscenegraph.org")
537 ;; The 'LICENSE' file explains that the source is licensed under
538 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
539 (license license:lgpl2.1)))
540
df8ab774
RW
541;; We need this for simgear
542(define-public openscenegraph-3.4
543 (package (inherit openscenegraph)
544 (name "openscenegraph")
545 (version "3.4.1")
546 (source
547 (origin
548 (method git-fetch)
549 (uri (git-reference
550 (url "https://github.com/openscenegraph/OpenSceneGraph")
551 (commit (string-append "OpenSceneGraph-" version))))
552 (file-name (git-file-name name version))
553 (sha256
554 (base32
555 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
556 (arguments
557 (substitute-keyword-arguments (package-arguments openscenegraph)
558 ((#:configure-flags flags)
559 `(cons
560 ;; The jpeg plugin requires conversion between integers and booleans
561 "-DCMAKE_CXX_FLAGS=-fpermissive"
562 ,flags))))
563 (inputs
564 `(("libjpeg" ,libjpeg)
565 ,@(package-inputs openscenegraph)))))
566
340ee00b
KK
567(define-public povray
568 (package
569 (name "povray")
570 (version "3.7.0.8")
571 (source (origin
572 (method git-fetch)
573 (uri (git-reference
574 (url "https://github.com/POV-Ray/povray")
575 (commit (string-append "v" version))))
576 (file-name (git-file-name name version))
577 (sha256
578 (base32
579 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
580 (modules '((guix build utils)))
581 (snippet
582 '(begin
583 ;; Delete bundled libraries.
584 (delete-file-recursively "libraries")
585 #t))))
586 (build-system gnu-build-system)
587 (native-inputs
588 `(("autoconf" ,autoconf)
589 ("automake" ,automake)
590 ("pkg-config" ,pkg-config)))
591 (inputs
592 `(("boost" ,boost)
593 ("libjpeg" ,libjpeg)
594 ("libpng" ,libpng)
595 ("libtiff" ,libtiff)
596 ("openexr" ,openexr)
597 ("sdl" ,sdl)
598 ("zlib" ,zlib)))
599 (arguments
600 '(#:configure-flags
601 (list "COMPILED_BY=Guix"
602 (string-append "--with-boost-libdir="
603 (assoc-ref %build-inputs "boost") "/lib")
604 "CXXFLAGS=-std=c++11"
605 "--disable-optimiz-arch")
606 #:phases
607 (modify-phases %standard-phases
608 (add-after 'unpack 'run-prebuild
609 (lambda _
610 (setenv "HOME" (getcwd))
611 (with-directory-excursion "unix"
612 (substitute* "prebuild.sh"
613 (("/bin/sh") (which "sh")))
614 (invoke "sh" "prebuild.sh"))
615 #t))
616 ;; The bootstrap script is run by the prebuild script in the
617 ;; "run-prebuild" phase.
618 (delete 'bootstrap))))
619 (synopsis "Tool for creating three-dimensional graphics")
620 (description
621 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
622for producing high-quality computer graphics. @code{POV-Ray} creates
623three-dimensional, photo-realistic images using a rendering technique called
624ray-tracing. It reads in a text file containing information describing the
625objects and lighting in a scene and generates an image of that scene from the
626view point of a camera also described in the text file. Ray-tracing is not a
627fast process by any means, but it produces very high quality images with
628realistic reflections, shading, perspective and other effects.")
629 (home-page "http://www.povray.org/")
630 (license license:agpl3+)))
631
96d15e48
RW
632(define-public rapicorn
633 (package
634 (name "rapicorn")
635 (version "16.0.0")
636 (source (origin
637 (method url-fetch)
638 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
639 "rapicorn-" version ".tar.xz"))
640 (sha256
641 (base32
42bf3429
AE
642 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
643 (patches (search-patches "rapicorn-isnan.patch"))))
96d15e48
RW
644 (build-system gnu-build-system)
645 (arguments
002528bc 646 `(#:phases
96d15e48 647 (modify-phases %standard-phases
002528bc
RW
648 (add-after 'unpack 'fix-tests
649 (lambda _
650 ;; Our grep does not support perl regular expressions.
651 (substitute* "taptool.sh"
652 (("grep -P") "grep -E"))
653 ;; Disable path tests because we cannot access /bin or /sbin.
654 (substitute* "rcore/tests/multitest.cc"
655 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
656 #t))
657 (add-before 'check 'pre-check
658 (lambda _
659 ;; The test suite requires a running X server (with DISPLAY
660 ;; number 99 or higher).
661 (system "Xvfb :99 &")
662 (setenv "DISPLAY" ":99")
663 #t))
664 (add-after 'unpack 'replace-fhs-paths
96d15e48
RW
665 (lambda _
666 (substitute* (cons "Makefile.decl"
667 (find-files "." "^Makefile\\.in$"))
002528bc
RW
668 (("/bin/ls") (which "ls"))
669 (("/usr/bin/env") (which "env")))
96d15e48
RW
670 #t)))))
671 ;; These libraries are listed in the "Required" section of the pkg-config
672 ;; file.
673 (propagated-inputs
674 `(("librsvg" ,librsvg)
675 ("cairo" ,cairo)
676 ("pango" ,pango)
002528bc
RW
677 ("libxml2" ,libxml2)
678 ("python2-enum34" ,python2-enum34)))
96d15e48
RW
679 (inputs
680 `(("gdk-pixbuf" ,gdk-pixbuf)
681 ("libpng" ,libpng-1.2)
682 ("readline" ,readline)
683 ("libcroco" ,libcroco)
684 ("python" ,python-2)
685 ("cython" ,python2-cython)))
686 (native-inputs
687 `(("pandoc" ,ghc-pandoc)
688 ("bison" ,bison)
689 ("flex" ,flex)
690 ("doxygen" ,doxygen)
691 ("graphviz" ,graphviz)
692 ("intltool" ,intltool)
002528bc
RW
693 ("pkg-config" ,pkg-config)
694 ("xvfb" ,xorg-server)))
36c5cf75 695 (home-page "https://rapicorn.testbit.org/")
96d15e48
RW
696 (synopsis "Toolkit for rapid development of user interfaces")
697 (description
698 "Rapicorn is a toolkit for rapid development of user interfaces in C++
699and Python. The user interface is designed in a declarative markup language
700and is connected to the programming logic using data bindings and commands.")
701 (license license:mpl2.0)))
702
9d620590
LC
703(define-public ctl
704 (package
705 (name "ctl")
706 (version "1.5.2")
707 (source (origin
708 (method url-fetch)
709 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
710 version ".tar.gz"))
711 (sha256
712 (base32
713 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
714 (build-system cmake-build-system)
715 (arguments '(#:tests? #f)) ;no 'test' target
716
717 ;; Headers include OpenEXR and IlmBase headers.
718 (propagated-inputs `(("openexr" ,openexr)))
719
720 (home-page "http://ampasctl.sourceforge.net")
721 (synopsis "Color Transformation Language")
722 (description
723 "The Color Transformation Language, or CTL, is a small programming
724language that was designed to serve as a building block for digital color
725management systems. CTL allows users to describe color transforms in a
726concise and unambiguous way by expressing them as programs. In order to apply
727a given transform to an image, the color management system instructs a CTL
728interpreter to load and run the CTL program that describes the transform. The
729original and the transformed image constitute the CTL program's input and
730output.")
731
732 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
733 ;; and headers use different wording.
166191b3 734 (license (license:non-copyleft "file://LICENSE"))))
a29bfc28
LC
735
736(define-public brdf-explorer
9b91fb32
RW
737 ;; There are no release tarballs, and not even tags in the repo,
738 ;; so use the latest revision.
739 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
740 (revision "1"))
741 (package
742 (name "brdf-explorer")
743 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
744 (source (origin
745 (method git-fetch)
746 (uri (git-reference
747 (url "https://github.com/wdas/brdf.git")
748 (commit commit)))
749 (sha256
750 (base32
751 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
752 (file-name (string-append name "-" version "-checkout"))))
753 (build-system gnu-build-system)
754 (arguments
755 `(#:phases (modify-phases %standard-phases
756 (replace 'configure
757 (lambda* (#:key outputs #:allow-other-keys)
758 (let ((out (assoc-ref outputs "out")))
cba8ba8b
RW
759 (invoke "qmake"
760 (string-append "prefix=" out)))))
9b91fb32
RW
761 (add-after 'install 'wrap-program
762 (lambda* (#:key outputs #:allow-other-keys)
763 (let* ((out (assoc-ref outputs "out"))
764 (bin (string-append out "/bin"))
765 (data (string-append
766 out "/share/brdf")))
767 (with-directory-excursion bin
768 (rename-file "brdf" ".brdf-real")
769 (call-with-output-file "brdf"
770 (lambda (port)
771 (format port "#!/bin/sh
a29bfc28
LC
772# Run the thing from its home, otherwise it just bails out.
773cd \"~a\"
774exec -a \"$0\" ~a/.brdf-real~%"
9b91fb32 775 data bin)))
cba8ba8b
RW
776 (chmod "brdf" #o555)))
777 #t)))))
9b91fb32
RW
778 (native-inputs
779 `(("qttools" ,qttools))) ;for 'qmake'
780 (inputs
781 `(("qtbase" ,qtbase)
782 ("mesa" ,mesa)
783 ("glew" ,glew)
784 ("freeglut" ,freeglut)
785 ("zlib" ,zlib)))
786 (home-page "http://www.disneyanimation.com/technology/brdf.html")
787 (synopsis
788 "Analyze bidirectional reflectance distribution functions (BRDFs)")
789 (description
790 "BRDF Explorer is an application that allows the development and analysis
a29bfc28
LC
791of bidirectional reflectance distribution functions (BRDFs). It can load and
792plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
793language), measured material data from the MERL database, and anisotropic
794measured material data from MIT CSAIL. Graphs and visualizations update in
795real time as parameters are changed, making it a useful tool for evaluating
796and understanding different BRDFs (and other component functions).")
9b91fb32 797 (license license:ms-pl))))
87bafa07
798
799(define-public agg
800 (package
801 (name "agg")
802 (version "2.5")
803 (source (origin
804 (method url-fetch)
7db0799d
LC
805 (uri (list (string-append
806 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
807 version ".tar.gz")
808 (string-append
809 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
810 version ".tar.gz")
811
812 ;; Site was discontinued.
813 (string-append "http://www.antigrain.com/agg-"
814 version ".tar.gz")))
87bafa07
815 (sha256
816 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
fc1adab1 817 (patches (search-patches "agg-am_c_prototype.patch"))))
87bafa07
818 (build-system gnu-build-system)
819 (arguments
820 '(#:configure-flags
821 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
822 "/include")
823 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
31f45cf7
EF
824 "/lib")
825 "--disable-examples")
87bafa07 826 #:phases
dc1d3cde 827 (modify-phases %standard-phases
8d18edde 828 (replace 'bootstrap
dc1d3cde
KK
829 (lambda _
830 ;; let's call configure from configure phase and not now
831 (substitute* "autogen.sh" (("./configure") "# ./configure"))
8d18edde 832 (invoke "sh" "autogen.sh"))))))
87bafa07
833 (native-inputs
834 `(("pkg-config" ,pkg-config)
835 ("libtool" ,libtool)
836 ("autoconf" ,autoconf)
8d18edde 837 ("automake" ,automake)))
87bafa07
838 (inputs
839 `(("libx11" ,libx11)
840 ("freetype" ,freetype)
841 ("sdl" ,sdl)))
7db0799d
LC
842
843 ;; Antigrain.com was discontinued.
844 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
87bafa07
845 (synopsis "High-quality 2D graphics rendering engine for C++")
846 (description
847 "Anti-Grain Geometry is a high quality rendering engine written in C++.
848It supports sub-pixel resolutions and anti-aliasing. It is also library for
849rendering SVG graphics.")
850 (license license:gpl2+)))
f76d56d2
BW
851
852(define-public python-pastel
853 (package
854 (name "python-pastel")
855 (version "0.1.0")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "pastel" version))
860 (sha256
861 (base32
862 "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i"))))
863 (build-system python-build-system)
864 (native-inputs
865 `(("python-pytest" ,python-pytest)))
866 (home-page "https://github.com/sdispater/pastel")
867 (synopsis "Library to colorize strings in your terminal")
868 (description "Pastel is a simple library to help you colorize strings in
869your terminal. It comes bundled with predefined styles:
870@enumerate
871@item info: green
872@item comment: yellow
873@item question: black on cyan
874@item error: white on red
875@end enumerate
876")
877 (license license:expat)))
878
879(define-public python2-pastel
880 (package-with-python2 python-pastel))
17153d18
MO
881
882(define-public fgallery
883 (package
884 (name "fgallery")
885 (version "1.8.2")
886 (source (origin
887 (method url-fetch)
888 (uri
889 (string-append
890 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
891 "fgallery-" version ".zip"))
892 (sha256
893 (base32
894 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
895 (build-system gnu-build-system)
896 (arguments
897 `(#:tests? #f ; no tests
898 #:phases
899 (modify-phases %standard-phases
900 (delete 'configure)
901 (delete 'build)
902 (replace 'install
903 (lambda* (#:key inputs outputs #:allow-other-keys)
904 (let* ((out (assoc-ref outputs "out"))
905 (bin (string-append out "/bin/"))
906 (share (string-append out "/share/fgallery"))
907 (man (string-append out "/share/man/man1"))
908 (perl5lib (getenv "PERL5LIB"))
909 (script (string-append share "/fgallery")))
910 (define (bin-directory input-name)
911 (string-append (assoc-ref inputs input-name) "/bin"))
912
913 (mkdir-p man)
914 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
915
916 (mkdir-p share)
917 (copy-recursively "." share)
918
919 ;; fgallery copies files from store when it is run. The
920 ;; read-only permissions from the store directories will cause
921 ;; fgallery to fail. Do not preserve file attributes when
922 ;; copying files to prevent it.
923 (substitute* script
924 (("'cp'")
925 "'cp', '--no-preserve=all'"))
926
927 (mkdir-p bin)
928 (symlink script (string-append out "/bin/fgallery"))
929
930 (wrap-program script
931 `("PATH" ":" prefix
932 ,(map bin-directory '("imagemagick"
933 "lcms"
934 "fbida"
935 "libjpeg"
936 "zip"
937 "jpegoptim"
938 "pngcrush"
939 "p7zip")))
940 `("PERL5LIB" ":" prefix (,perl5lib)))
941 #t))))))
942 (native-inputs
943 `(("unzip" ,unzip)))
944 ;; TODO: Add missing optional dependency: facedetect.
945 (inputs
946 `(("imagemagick" ,imagemagick)
947 ("lcms" ,lcms)
948 ("fbida" ,fbida)
949 ("libjpeg" ,libjpeg)
950 ("zip" ,zip)
951 ("perl" ,perl)
952 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
953 ("perl-image-exiftool" ,perl-image-exiftool)
954 ("jpegoptim" ,jpegoptim)
955 ("pngcrush" ,pngcrush)
956 ("p7zip" ,p7zip)))
957 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
958 (synopsis "Static photo gallery generator")
959 (description
960 "FGallery is a static, JavaScript photo gallery generator with minimalist
961look. The result can be uploaded on any web server without additional
962requirements.")
963 (license license:gpl2+)))