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