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