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