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