Commit | Line | Data |
---|---|---|
f327b36e LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> | |
e9f1fa39 | 3 | ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org> |
f327b36e LC |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages graphics) | |
21 | #:use-module (guix download) | |
a29bfc28 | 22 | #:use-module (guix svn-download) |
f327b36e LC |
23 | #:use-module (guix packages) |
24 | #:use-module (guix build-system gnu) | |
25 | #:use-module (guix build-system cmake) | |
26 | #:use-module ((guix licenses) #:prefix license:) | |
cab6a253 | 27 | #:use-module (gnu packages) |
87bafa07 TČ |
28 | #:use-module (gnu packages autotools) |
29 | #:use-module (gnu packages bash) | |
30 | #:use-module (gnu packages boost) | |
99d7460d LC |
31 | #:use-module (gnu packages image) |
32 | #:use-module (gnu packages python) | |
87bafa07 | 33 | #:use-module (gnu packages fontutils) |
cab6a253 LC |
34 | #:use-module (gnu packages pkg-config) |
35 | #:use-module (gnu packages compression) | |
f327b36e | 36 | #:use-module (gnu packages multiprecision) |
a29bfc28 LC |
37 | #:use-module (gnu packages boost) |
38 | #:use-module (gnu packages gl) | |
87bafa07 TČ |
39 | #:use-module (gnu packages qt) |
40 | #:use-module (gnu packages sdl) | |
41 | #:use-module (gnu packages xorg)) | |
f327b36e LC |
42 | |
43 | (define-public cgal | |
44 | (package | |
45 | (name "cgal") | |
61fe5a57 | 46 | (version "4.6.3") |
f327b36e LC |
47 | (source (origin |
48 | (method url-fetch) | |
49 | (uri (string-append | |
61fe5a57 AE |
50 | "http://gforge.inria.fr/frs/download.php/file/" |
51 | "35139/CGAL-4.6.3.tar.xz")) | |
f327b36e LC |
52 | (sha256 |
53 | (base32 | |
61fe5a57 | 54 | "08gwjjh0qz3fakj1y2nsl2qvb0qv5lc7k1pxwjkagh37hxxh4f73")))) |
f327b36e LC |
55 | (build-system cmake-build-system) |
56 | (arguments | |
57 | '(;; "RelWithDebInfo" is not supported. | |
58 | #:build-type "Release" | |
59 | ||
60 | ;; No 'test' target. | |
61 | #:tests? #f)) | |
62 | (inputs | |
63 | `(("mpfr" ,mpfr) | |
64 | ("gmp" ,gmp) | |
65 | ("boost" ,boost))) | |
66 | (home-page "http://cgal.org/") | |
67 | (synopsis "Computational geometry algorithms library") | |
68 | (description | |
69 | "CGAL provides easy access to efficient and reliable geometric algorithms | |
70 | in the form of a C++ library. CGAL is used in various areas needing geometric | |
71 | computation, such as: computer graphics, scientific visualization, computer | |
72 | aided design and modeling, geographic information systems, molecular biology, | |
73 | medical imaging, robotics and motion planning, mesh generation, numerical | |
74 | methods, etc. It provides data structures and algorithms such as | |
75 | triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and | |
76 | many more.") | |
77 | ||
78 | ;; The 'LICENSE' file explains that a subset is available under more | |
79 | ;; permissive licenses. | |
80 | (license license:gpl3+))) | |
cab6a253 LC |
81 | |
82 | (define-public ilmbase | |
83 | (package | |
84 | (name "ilmbase") | |
85 | (version "2.2.0") | |
86 | (source (origin | |
87 | (method url-fetch) | |
88 | (uri (string-append "mirror://savannah/openexr/ilmbase-" | |
89 | version ".tar.gz")) | |
90 | (sha256 | |
91 | (base32 | |
92 | "1izddjwbh1grs8080vmaix72z469qy29wrvkphgmqmcm0sv1by7c")))) | |
93 | (build-system gnu-build-system) | |
94 | (home-page "http://www.openexr.com/") | |
95 | (synopsis "Utility C++ libraries for threads, maths, and exceptions") | |
96 | (description | |
97 | "IlmBase provides several utility libraries for C++. Half is a class | |
98 | that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread | |
99 | abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices, | |
100 | quaternions and other useful 2D and 3D math functions. Iex is an | |
101 | exception-handling library.") | |
102 | (license license:bsd-3))) | |
103 | ||
104 | (define-public openexr | |
105 | (package | |
106 | (name "openexr") | |
107 | (version "2.2.0") | |
108 | (source (origin | |
109 | (method url-fetch) | |
110 | (uri (string-append "mirror://savannah/openexr/openexr-" | |
111 | version ".tar.gz")) | |
112 | (sha256 | |
113 | (base32 | |
114 | "0ca2j526n4wlamrxb85y2jrgcv0gf21b3a19rr0gh4rjqkv1581n")) | |
115 | (modules '((guix build utils))) | |
116 | (snippet | |
117 | '(substitute* (find-files "." "tmpDir\\.h") | |
118 | (("\"/var/tmp/\"") | |
119 | "\"/tmp/\""))) | |
120 | (patches (list (search-patch "openexr-missing-samples.patch"))))) | |
121 | (build-system gnu-build-system) | |
122 | (native-inputs | |
123 | `(("pkg-config" ,pkg-config))) | |
124 | (propagated-inputs | |
125 | `(("ilmbase" ,ilmbase) ;used in public headers | |
126 | ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz" | |
127 | (home-page "http://www.openexr.com") | |
9f2840cb | 128 | (synopsis "High-dynamic range file format library") |
cab6a253 LC |
129 | (description |
130 | "OpenEXR is a high dynamic-range (HDR) image file format developed for | |
9f2840cb LC |
131 | use in computer imaging applications. The IlmImf C++ libraries support |
132 | storage of the \"EXR\" file format for storing 16-bit floating-point images.") | |
cab6a253 | 133 | (license license:bsd-3))) |
9d620590 | 134 | |
71299c12 RW |
135 | (define-public openimageio |
136 | (package | |
137 | (name "openimageio") | |
138 | (version "1.5.18") | |
139 | (source (origin | |
140 | (method url-fetch) | |
141 | (uri (string-append "https://github.com/OpenImageIO/oiio/" | |
142 | "archive/Release-" version ".tar.gz")) | |
143 | (file-name (string-append name "-" version ".tar.gz")) | |
144 | (sha256 | |
145 | (base32 | |
146 | "0mn7cz19mn8dcrhkq15h25gl20ammr1wz0j2j3c2vxs6ph7zn8jy")))) | |
147 | (build-system cmake-build-system) | |
148 | ;; FIXME: To run all tests successfully, test image sets from multiple | |
149 | ;; third party sources have to be present. For details see | |
150 | ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL | |
151 | (arguments `(#:tests? #f)) | |
152 | (native-inputs | |
153 | `(("pkg-config" ,pkg-config))) | |
154 | (inputs | |
155 | `(("boost" ,boost) | |
156 | ("libpng" ,libpng) | |
157 | ("libjpeg" ,libjpeg-8) | |
158 | ("libtiff" ,libtiff) | |
159 | ("giflib" ,giflib) | |
160 | ("openexr" ,openexr) | |
161 | ("ilmbase" ,ilmbase) | |
162 | ("python" ,python-2) | |
163 | ("zlib" ,zlib))) | |
164 | (synopsis "C++ library for reading and writing images") | |
165 | (description | |
166 | "OpenImageIO is a library for reading and writing images, and a bunch of | |
167 | related classes, utilities, and applications. There is a particular emphasis | |
168 | on formats and functionality used in professional, large-scale animation and | |
169 | visual effects work for film.") | |
170 | (home-page "http://www.openimageio.org") | |
171 | (license license:bsd-3))) | |
172 | ||
9d620590 LC |
173 | (define-public ctl |
174 | (package | |
175 | (name "ctl") | |
176 | (version "1.5.2") | |
177 | (source (origin | |
178 | (method url-fetch) | |
179 | (uri (string-append "https://github.com/ampas/CTL/archive/ctl-" | |
180 | version ".tar.gz")) | |
181 | (sha256 | |
182 | (base32 | |
183 | "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp")))) | |
184 | (build-system cmake-build-system) | |
185 | (arguments '(#:tests? #f)) ;no 'test' target | |
186 | ||
187 | ;; Headers include OpenEXR and IlmBase headers. | |
188 | (propagated-inputs `(("openexr" ,openexr))) | |
189 | ||
190 | (home-page "http://ampasctl.sourceforge.net") | |
191 | (synopsis "Color Transformation Language") | |
192 | (description | |
193 | "The Color Transformation Language, or CTL, is a small programming | |
194 | language that was designed to serve as a building block for digital color | |
195 | management systems. CTL allows users to describe color transforms in a | |
196 | concise and unambiguous way by expressing them as programs. In order to apply | |
197 | a given transform to an image, the color management system instructs a CTL | |
198 | interpreter to load and run the CTL program that describes the transform. The | |
199 | original and the transformed image constitute the CTL program's input and | |
200 | output.") | |
201 | ||
202 | ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file | |
203 | ;; and headers use different wording. | |
166191b3 | 204 | (license (license:non-copyleft "file://LICENSE")))) |
a29bfc28 LC |
205 | |
206 | (define-public brdf-explorer | |
207 | (package | |
208 | (name "brdf-explorer") | |
209 | (version "17") ;svn revision | |
210 | (source (origin | |
211 | ;; There are no release tarballs, and not even tags in the repo, | |
212 | ;; so use the latest revision. | |
213 | (method svn-fetch) | |
214 | (uri (svn-reference | |
215 | (url "http://github.com/wdas/brdf") | |
216 | (revision (string->number version)))) | |
217 | (sha256 | |
218 | (base32 | |
219 | "1458fwsqxramh0gpnp24x7brfpl9afhvr1wqg6c78xqwf32960m5")) | |
220 | (file-name (string-append name "-" version "-checkout")))) | |
221 | (build-system gnu-build-system) | |
222 | (arguments | |
223 | `(#:phases (modify-phases %standard-phases | |
f8503e2b | 224 | (replace 'configure |
a29bfc28 LC |
225 | (lambda* (#:key outputs #:allow-other-keys) |
226 | (let ((out (assoc-ref outputs "out"))) | |
227 | (chdir "trunk") | |
228 | (zero? (system* "qmake" | |
229 | (string-append | |
230 | "prefix=" out)))))) | |
f8503e2b | 231 | (add-after 'install 'wrap-program |
a29bfc28 LC |
232 | (lambda* (#:key outputs #:allow-other-keys) |
233 | (let* ((out (assoc-ref outputs "out")) | |
234 | (bin (string-append out "/bin")) | |
235 | (data (string-append | |
236 | out "/share/brdf"))) | |
237 | (with-directory-excursion bin | |
238 | (rename-file "brdf" ".brdf-real") | |
239 | (call-with-output-file "brdf" | |
240 | (lambda (port) | |
241 | (format port "#!/bin/sh | |
242 | # Run the thing from its home, otherwise it just bails out. | |
243 | cd \"~a\" | |
244 | exec -a \"$0\" ~a/.brdf-real~%" | |
245 | data bin))) | |
246 | (chmod "brdf" #o555)))))))) | |
247 | (native-inputs | |
248 | `(("qt" ,qt-4))) ;for 'qmake' | |
249 | (inputs | |
250 | `(("qt" ,qt-4) | |
251 | ("mesa" ,mesa) | |
252 | ("glew" ,glew) | |
253 | ("freeglut" ,freeglut) | |
254 | ("zlib" ,zlib))) | |
255 | (home-page "http://www.disneyanimation.com/technology/brdf.html") | |
256 | (synopsis | |
257 | "Analyze bidirectional reflectance distribution functions (BRDFs)") | |
258 | (description | |
259 | "BRDF Explorer is an application that allows the development and analysis | |
260 | of bidirectional reflectance distribution functions (BRDFs). It can load and | |
261 | plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader | |
262 | language), measured material data from the MERL database, and anisotropic | |
263 | measured material data from MIT CSAIL. Graphs and visualizations update in | |
264 | real time as parameters are changed, making it a useful tool for evaluating | |
265 | and understanding different BRDFs (and other component functions).") | |
266 | (license license:ms-pl))) | |
87bafa07 TČ |
267 | |
268 | (define-public agg | |
269 | (package | |
270 | (name "agg") | |
271 | (version "2.5") | |
272 | (source (origin | |
273 | (method url-fetch) | |
274 | (uri (string-append "http://www.antigrain.com/agg-" | |
275 | version ".tar.gz")) | |
276 | (sha256 | |
277 | (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb")) | |
278 | (patches (list (search-patch "agg-am_c_prototype.patch"))))) | |
279 | (build-system gnu-build-system) | |
280 | (arguments | |
281 | '(#:configure-flags | |
282 | (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11") | |
283 | "/include") | |
284 | (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11") | |
285 | "/lib")) | |
286 | #:phases | |
287 | (alist-cons-after | |
288 | 'unpack 'autoreconf | |
289 | (lambda _ | |
290 | ;; let's call configure from configure phase and not now | |
291 | (substitute* "autogen.sh" (("./configure") "# ./configure")) | |
292 | (zero? (system* "sh" "autogen.sh"))) | |
293 | %standard-phases))) | |
294 | (native-inputs | |
295 | `(("pkg-config" ,pkg-config) | |
296 | ("libtool" ,libtool) | |
297 | ("autoconf" ,autoconf) | |
298 | ("automake" ,automake) | |
299 | ("bash" ,bash))) | |
300 | (inputs | |
301 | `(("libx11" ,libx11) | |
302 | ("freetype" ,freetype) | |
303 | ("sdl" ,sdl))) | |
304 | (home-page "http://antigrain.com") | |
305 | (synopsis "High-quality 2D graphics rendering engine for C++") | |
306 | (description | |
307 | "Anti-Grain Geometry is a high quality rendering engine written in C++. | |
308 | It supports sub-pixel resolutions and anti-aliasing. It is also library for | |
309 | rendering SVG graphics.") | |
310 | (license license:gpl2+))) |