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