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