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