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