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> |
04d52b1a | 4 | ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name> |
df8ab774 | 5 | ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net> |
1cd968e8 | 6 | ;;; Copyright © 2016, 2018 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> |
24268ec4 | 10 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
17153d18 | 11 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> |
fc4f13bd | 12 | ;;; Copyright © 2018 Alex Kost <alezost@gmail.com> |
340ee00b | 13 | ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net> |
8b672b2c | 14 | ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org> |
13f30b54 | 15 | ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au> |
c3c0eda6 | 16 | ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com> |
f36617cb | 17 | ;;; Copyright © 2019 John Soo <jsoo1@asu.edu> |
24f7bac0 | 18 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
942c7889 | 19 | ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> |
1e8826bd | 20 | ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org> |
f327b36e LC |
21 | ;;; |
22 | ;;; This file is part of GNU Guix. | |
23 | ;;; | |
24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
25 | ;;; under the terms of the GNU General Public License as published by | |
26 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
27 | ;;; your option) any later version. | |
28 | ;;; | |
29 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
32 | ;;; GNU General Public License for more details. | |
33 | ;;; | |
34 | ;;; You should have received a copy of the GNU General Public License | |
35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
36 | ||
37 | (define-module (gnu packages graphics) | |
cab6a253 | 38 | #:use-module (gnu packages) |
0e2f2aeb RW |
39 | #:use-module (gnu packages algebra) |
40 | #:use-module (gnu packages audio) | |
87bafa07 TČ |
41 | #:use-module (gnu packages autotools) |
42 | #:use-module (gnu packages bash) | |
96d15e48 | 43 | #:use-module (gnu packages bison) |
87bafa07 | 44 | #:use-module (gnu packages boost) |
dd75a9a2 | 45 | #:use-module (gnu packages check) |
595d1bd5 | 46 | #:use-module (gnu packages compression) |
99828fa7 | 47 | #:use-module (gnu packages documentation) |
96d15e48 | 48 | #:use-module (gnu packages flex) |
dd75a9a2 | 49 | #:use-module (gnu packages fonts) |
87bafa07 | 50 | #:use-module (gnu packages fontutils) |
595d1bd5 | 51 | #:use-module (gnu packages ghostscript) |
a29bfc28 | 52 | #:use-module (gnu packages gl) |
96d15e48 | 53 | #:use-module (gnu packages glib) |
595d1bd5 | 54 | #:use-module (gnu packages gnome) |
96d15e48 RW |
55 | #:use-module (gnu packages graphviz) |
56 | #:use-module (gnu packages gtk) | |
dddbc90c | 57 | #:use-module (gnu packages haskell-xyz) |
0e2f2aeb | 58 | #:use-module (gnu packages image) |
595d1bd5 | 59 | #:use-module (gnu packages imagemagick) |
0e2f2aeb | 60 | #:use-module (gnu packages jemalloc) |
595d1bd5 TGR |
61 | #:use-module (gnu packages multiprecision) |
62 | #:use-module (gnu packages pdf) | |
63 | #:use-module (gnu packages perl) | |
0e2f2aeb | 64 | #:use-module (gnu packages photo) |
595d1bd5 | 65 | #:use-module (gnu packages pkg-config) |
6bf11392 | 66 | #:use-module (gnu packages pth) |
595d1bd5 | 67 | #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate |
0e2f2aeb | 68 | #:use-module (gnu packages python) |
44d10b1f | 69 | #:use-module (gnu packages python-xyz) |
87bafa07 | 70 | #:use-module (gnu packages qt) |
96d15e48 | 71 | #:use-module (gnu packages readline) |
87bafa07 | 72 | #:use-module (gnu packages sdl) |
dd75a9a2 | 73 | #:use-module (gnu packages swig) |
0e2f2aeb | 74 | #:use-module (gnu packages video) |
96d15e48 | 75 | #:use-module (gnu packages xml) |
595d1bd5 TGR |
76 | #:use-module (gnu packages xorg) |
77 | #:use-module (guix build-system cmake) | |
78 | #:use-module (guix build-system gnu) | |
79 | #:use-module (guix build-system python) | |
80 | #:use-module (guix download) | |
81 | #:use-module (guix git-download) | |
24268ec4 | 82 | #:use-module (guix hg-download) |
595d1bd5 TGR |
83 | #:use-module ((guix licenses) #:prefix license:) |
84 | #:use-module (guix packages) | |
85 | #:use-module (guix utils)) | |
f327b36e | 86 | |
0e2f2aeb RW |
87 | (define-public blender |
88 | (package | |
89 | (name "blender") | |
274ba54e | 90 | (version "2.80") |
0e2f2aeb | 91 | (source (origin |
274ba54e LF |
92 | (method url-fetch) |
93 | (uri (string-append "https://download.blender.org/source/" | |
94 | "blender-" version ".tar.gz")) | |
0e2f2aeb RW |
95 | (sha256 |
96 | (base32 | |
274ba54e | 97 | "1h550jisdbis50hxwk5kxrvrk1a6sh2fsri3yyj66vhzbi87x7fd")))) |
0e2f2aeb RW |
98 | (build-system cmake-build-system) |
99 | (arguments | |
bb9cd6de LF |
100 | (let ((python-version (version-major+minor (package-version python)))) |
101 | `(;; Test files are very large and not included in the release tarball. | |
102 | #:tests? #f | |
103 | #:configure-flags | |
104 | (list "-DWITH_CODEC_FFMPEG=ON" | |
105 | "-DWITH_CODEC_SNDFILE=ON" | |
106 | "-DWITH_CYCLES=ON" | |
107 | "-DWITH_DOC_MANPAGE=ON" | |
108 | "-DWITH_FFTW3=ON" | |
bb9cd6de LF |
109 | "-DWITH_IMAGE_OPENJPEG=ON" |
110 | "-DWITH_INPUT_NDOF=ON" | |
111 | "-DWITH_INSTALL_PORTABLE=OFF" | |
112 | "-DWITH_JACK=ON" | |
113 | "-DWITH_MOD_OCEANSIM=ON" | |
588a0a33 | 114 | "-DWITH_OPENSUBDIV=ON" |
bb9cd6de | 115 | "-DWITH_PYTHON_INSTALL=OFF" |
bb9cd6de LF |
116 | (string-append "-DPYTHON_LIBRARY=python" ,python-version "m") |
117 | (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python") | |
118 | "/lib") | |
119 | (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python") | |
120 | "/include/python" ,python-version "m") | |
fc51c28a LF |
121 | (string-append "-DPYTHON_VERSION=" ,python-version) |
122 | (string-append "-DPYTHON_NUMPY_PATH=" | |
123 | (assoc-ref %build-inputs "python-numpy") | |
124 | "/lib/python" ,python-version "/site-packages/")) | |
bb9cd6de LF |
125 | #:phases |
126 | (modify-phases %standard-phases | |
fc51c28a LF |
127 | ;; XXX This file doesn't exist in the Git sources but will probably |
128 | ;; exist in the eventual 2.80 source tarball. | |
129 | ; (add-after 'unpack 'fix-broken-import | |
130 | ; (lambda _ | |
131 | ; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py" | |
132 | ; (("import encode_bin") "from . import encode_bin")) | |
133 | ; #t)) | |
bb9cd6de LF |
134 | (add-after 'set-paths 'add-ilmbase-include-path |
135 | (lambda* (#:key inputs #:allow-other-keys) | |
136 | ;; OpenEXR propagates ilmbase, but its include files do not appear | |
137 | ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to | |
138 | ;; the CPATH to satisfy the dependency on "half.h". | |
139 | (setenv "CPATH" | |
140 | (string-append (assoc-ref inputs "ilmbase") | |
141 | "/include/OpenEXR" | |
142 | ":" (or (getenv "CPATH") ""))) | |
143 | #t)))))) | |
0e2f2aeb RW |
144 | (inputs |
145 | `(("boost" ,boost) | |
146 | ("jemalloc" ,jemalloc) | |
147 | ("libx11" ,libx11) | |
148 | ("openimageio" ,openimageio) | |
149 | ("openexr" ,openexr) | |
588a0a33 | 150 | ("opensubdiv" ,opensubdiv) |
0e2f2aeb | 151 | ("ilmbase" ,ilmbase) |
fc51c28a | 152 | ("openjpeg" ,openjpeg) |
0e2f2aeb RW |
153 | ("libjpeg" ,libjpeg) |
154 | ("libpng" ,libpng) | |
155 | ("libtiff" ,libtiff) | |
5deb0c67 | 156 | ("ffmpeg" ,ffmpeg) |
0e2f2aeb RW |
157 | ("fftw" ,fftw) |
158 | ("jack" ,jack-1) | |
159 | ("libsndfile" ,libsndfile) | |
160 | ("freetype" ,freetype) | |
161 | ("glew" ,glew) | |
162 | ("openal" ,openal) | |
bb9cd6de | 163 | ("python" ,python) |
fc51c28a | 164 | ("python-numpy" ,python-numpy) |
0e2f2aeb | 165 | ("zlib" ,zlib))) |
9a6f5bbc | 166 | (home-page "https://blender.org/") |
0e2f2aeb RW |
167 | (synopsis "3D graphics creation suite") |
168 | (description | |
169 | "Blender is a 3D graphics creation suite. It supports the entirety of | |
170 | the 3D pipeline—modeling, rigging, animation, simulation, rendering, | |
171 | compositing and motion tracking, even video editing and game creation. The | |
6af4cb30 | 172 | application can be customized via its API for Python scripting.") |
dd9c137b | 173 | (license license:gpl2+))) |
0e2f2aeb | 174 | |
8b672b2c MW |
175 | (define-public blender-2.79 |
176 | (package | |
177 | (name "blender") | |
178 | (version "2.79b") | |
179 | (source (origin | |
180 | (method url-fetch) | |
181 | (uri (string-append "https://download.blender.org/source/" | |
182 | "blender-" version ".tar.gz")) | |
183 | (sha256 | |
184 | (base32 | |
185 | "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")) | |
186 | (patches (search-patches "blender-2.79-newer-ffmpeg.patch" | |
187 | "blender-2.79-python-3.7-fix.patch")))) | |
188 | (build-system cmake-build-system) | |
189 | (arguments | |
190 | (let ((python-version (version-major+minor (package-version python)))) | |
191 | `(;; Test files are very large and not included in the release tarball. | |
192 | #:tests? #f | |
193 | #:configure-flags | |
194 | (list "-DWITH_CODEC_FFMPEG=ON" | |
195 | "-DWITH_CODEC_SNDFILE=ON" | |
196 | "-DWITH_CYCLES=ON" | |
197 | "-DWITH_DOC_MANPAGE=ON" | |
198 | "-DWITH_FFTW3=ON" | |
199 | "-DWITH_GAMEENGINE=ON" | |
200 | "-DWITH_IMAGE_OPENJPEG=ON" | |
201 | "-DWITH_INPUT_NDOF=ON" | |
202 | "-DWITH_INSTALL_PORTABLE=OFF" | |
203 | "-DWITH_JACK=ON" | |
204 | "-DWITH_MOD_OCEANSIM=ON" | |
205 | "-DWITH_PLAYER=ON" | |
206 | "-DWITH_PYTHON_INSTALL=OFF" | |
207 | "-DWITH_PYTHON_INSTALL=OFF" | |
208 | "-DWITH_SYSTEM_OPENJPEG=ON" | |
209 | (string-append "-DPYTHON_LIBRARY=python" ,python-version "m") | |
210 | (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python") | |
211 | "/lib") | |
212 | (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python") | |
213 | "/include/python" ,python-version "m") | |
214 | (string-append "-DPYTHON_VERSION=" ,python-version)) | |
215 | #:phases | |
216 | (modify-phases %standard-phases | |
217 | (add-after 'unpack 'fix-broken-import | |
218 | (lambda _ | |
219 | (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py" | |
220 | (("import encode_bin") "from . import encode_bin")) | |
221 | #t)) | |
222 | (add-after 'set-paths 'add-ilmbase-include-path | |
223 | (lambda* (#:key inputs #:allow-other-keys) | |
224 | ;; OpenEXR propagates ilmbase, but its include files do not appear | |
225 | ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to | |
226 | ;; the CPATH to satisfy the dependency on "half.h". | |
227 | (setenv "CPATH" | |
228 | (string-append (assoc-ref inputs "ilmbase") | |
229 | "/include/OpenEXR" | |
230 | ":" (or (getenv "CPATH") ""))) | |
231 | #t)))))) | |
232 | (inputs | |
233 | `(("boost" ,boost) | |
234 | ("jemalloc" ,jemalloc) | |
235 | ("libx11" ,libx11) | |
04d52b1a | 236 | ("openimageio" ,openimageio-1.7) |
8b672b2c MW |
237 | ("openexr" ,openexr) |
238 | ("ilmbase" ,ilmbase) | |
239 | ("openjpeg" ,openjpeg-1) | |
240 | ("libjpeg" ,libjpeg) | |
241 | ("libpng" ,libpng) | |
242 | ("libtiff" ,libtiff) | |
243 | ("ffmpeg" ,ffmpeg) | |
244 | ("fftw" ,fftw) | |
245 | ("jack" ,jack-1) | |
246 | ("libsndfile" ,libsndfile) | |
247 | ("freetype" ,freetype) | |
248 | ("glew" ,glew) | |
249 | ("openal" ,openal) | |
250 | ("python" ,python) | |
251 | ("zlib" ,zlib))) | |
252 | (home-page "https://blender.org/") | |
253 | (synopsis "3D graphics creation suite") | |
254 | (description | |
255 | "Blender is a 3D graphics creation suite. It supports the entirety of | |
256 | the 3D pipeline—modeling, rigging, animation, simulation, rendering, | |
257 | compositing and motion tracking, even video editing and game creation. The | |
258 | application can be customized via its API for Python scripting. | |
259 | ||
260 | NOTE: This older version of Blender is the last release that does not require | |
261 | OpenGL 3. It is retained for use with older computers.") | |
262 | (license license:gpl2+))) | |
263 | ||
5a82f933 RW |
264 | (define-public assimp |
265 | (package | |
266 | (name "assimp") | |
2d4514e9 | 267 | (version "4.1.0") |
5a82f933 | 268 | (source (origin |
2d4514e9 EF |
269 | (method git-fetch) |
270 | (uri (git-reference | |
271 | (url "https://github.com/assimp/assimp.git") | |
272 | (commit (string-append "v" version)))) | |
273 | (file-name (git-file-name name version)) | |
5a82f933 RW |
274 | (sha256 |
275 | (base32 | |
2d4514e9 | 276 | "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28")))) |
5a82f933 RW |
277 | (build-system cmake-build-system) |
278 | (inputs | |
279 | `(("zlib" ,zlib))) | |
2d4514e9 | 280 | (home-page "http://www.assimp.org/") |
5a82f933 RW |
281 | (synopsis "Asset import library") |
282 | (description | |
283 | "The Open Asset Import Library loads more than 40 3D file formats into | |
284 | one unified data structure. Additionally, assimp features various mesh post | |
285 | processing tools: normals and tangent space generation, triangulation, vertex | |
286 | cache locality optimization, removal of degenerate primitives and duplicate | |
287 | vertices, sorting by primitive type, merging of redundant materials and many | |
288 | more.") | |
289 | (license license:bsd-3))) | |
290 | ||
f327b36e LC |
291 | (define-public cgal |
292 | (package | |
293 | (name "cgal") | |
0a7fc756 | 294 | (version "4.8.1") |
f327b36e LC |
295 | (source (origin |
296 | (method url-fetch) | |
297 | (uri (string-append | |
0a7fc756 EF |
298 | "https://github.com/CGAL/cgal/releases/download/releases/" |
299 | "CGAL-" version "/CGAL-" version ".tar.xz")) | |
f327b36e LC |
300 | (sha256 |
301 | (base32 | |
0a7fc756 | 302 | "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s")))) |
f327b36e LC |
303 | (build-system cmake-build-system) |
304 | (arguments | |
305 | '(;; "RelWithDebInfo" is not supported. | |
306 | #:build-type "Release" | |
307 | ||
308 | ;; No 'test' target. | |
309 | #:tests? #f)) | |
310 | (inputs | |
311 | `(("mpfr" ,mpfr) | |
312 | ("gmp" ,gmp) | |
313 | ("boost" ,boost))) | |
314 | (home-page "http://cgal.org/") | |
315 | (synopsis "Computational geometry algorithms library") | |
316 | (description | |
317 | "CGAL provides easy access to efficient and reliable geometric algorithms | |
318 | in the form of a C++ library. CGAL is used in various areas needing geometric | |
319 | computation, such as: computer graphics, scientific visualization, computer | |
320 | aided design and modeling, geographic information systems, molecular biology, | |
321 | medical imaging, robotics and motion planning, mesh generation, numerical | |
322 | methods, etc. It provides data structures and algorithms such as | |
323 | triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and | |
324 | many more.") | |
325 | ||
326 | ;; The 'LICENSE' file explains that a subset is available under more | |
327 | ;; permissive licenses. | |
328 | (license license:gpl3+))) | |
cab6a253 LC |
329 | |
330 | (define-public ilmbase | |
331 | (package | |
332 | (name "ilmbase") | |
942c7889 | 333 | (version "2.4.0") |
cab6a253 | 334 | (source (origin |
942c7889 MB |
335 | (method git-fetch) |
336 | (uri (git-reference | |
337 | (url "https://github.com/openexr/openexr") | |
338 | (commit (string-append "v" version)))) | |
339 | (file-name (git-file-name "ilmbase" version)) | |
cab6a253 LC |
340 | (sha256 |
341 | (base32 | |
942c7889 MB |
342 | "0g3rz11cvb7gnphp2np9z7bfl7v4dprq4w5hnsvx7yrasgsdyn8s")) |
343 | (patches (search-patches "ilmbase-fix-tests.patch" | |
344 | "ilmbase-openexr-pkg-config.patch")))) | |
345 | (build-system cmake-build-system) | |
346 | (arguments | |
347 | `(#:phases (modify-phases %standard-phases | |
348 | (add-after 'unpack 'change-directory | |
349 | (lambda _ | |
350 | (chdir "IlmBase") | |
351 | #t))))) | |
25c4a04f | 352 | (home-page "https://www.openexr.com/") |
cab6a253 LC |
353 | (synopsis "Utility C++ libraries for threads, maths, and exceptions") |
354 | (description | |
355 | "IlmBase provides several utility libraries for C++. Half is a class | |
356 | that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread | |
357 | abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices, | |
358 | quaternions and other useful 2D and 3D math functions. Iex is an | |
359 | exception-handling library.") | |
360 | (license license:bsd-3))) | |
361 | ||
dd75a9a2 MR |
362 | (define-public ogre |
363 | (package | |
364 | (name "ogre") | |
f63d6188 | 365 | (version "1.10.11") |
dd75a9a2 MR |
366 | (source |
367 | (origin | |
1aa662b3 EF |
368 | (method git-fetch) |
369 | (uri (git-reference | |
370 | (url "https://github.com/OGRECave/ogre.git") | |
371 | (commit (string-append "v" version)))) | |
372 | (file-name (git-file-name name version)) | |
dd75a9a2 MR |
373 | (sha256 |
374 | (base32 | |
1aa662b3 | 375 | "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr")))) |
dd75a9a2 MR |
376 | (build-system cmake-build-system) |
377 | (arguments | |
378 | '(#:phases | |
379 | (modify-phases %standard-phases | |
380 | (add-before 'configure 'pre-configure | |
dd75a9a2 | 381 | (lambda* (#:key inputs #:allow-other-keys) |
d5640c58 EF |
382 | (substitute* "Tests/CMakeLists.txt" |
383 | (("URL(.*)$") | |
384 | (string-append "URL " (assoc-ref inputs "googletest-source")))) | |
dd75a9a2 MR |
385 | #t))) |
386 | #:configure-flags | |
387 | (list "-DOGRE_BUILD_TESTS=TRUE" | |
388 | (string-append "-DCMAKE_INSTALL_RPATH=" | |
389 | (assoc-ref %outputs "out") "/lib:" | |
390 | (assoc-ref %outputs "out") "/lib/OGRE:" | |
391 | (assoc-ref %build-inputs "googletest") "/lib") | |
392 | "-DOGRE_INSTALL_DOCS=TRUE" | |
393 | "-DOGRE_INSTALL_SAMPLES=TRUE" | |
394 | "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))) | |
395 | (native-inputs | |
396 | `(("boost" ,boost) | |
397 | ("doxygen" ,doxygen) | |
398 | ("googletest-source" ,(package-source googletest)) | |
399 | ("pkg-config" ,pkg-config))) | |
400 | (inputs | |
401 | `(("font-dejavu" ,font-dejavu) | |
402 | ("freeimage" ,freeimage) | |
403 | ("freetype" ,freetype) | |
404 | ("glu" ,glu) | |
405 | ("googletest" ,googletest) | |
406 | ("sdl2" ,sdl2) | |
407 | ("libxaw" ,libxaw) | |
408 | ("libxrandr" ,libxrandr) | |
409 | ("tinyxml" ,tinyxml) | |
410 | ("zziplib" ,zziplib))) | |
411 | (synopsis "Scene-oriented, flexible 3D engine written in C++") | |
412 | (description | |
413 | "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, | |
414 | flexible 3D engine written in C++ designed to make it easier and more intuitive | |
415 | for developers to produce applications utilising hardware-accelerated 3D | |
416 | graphics.") | |
417 | (home-page "http://www.ogre3d.org/") | |
418 | (license license:expat))) | |
419 | ||
cab6a253 LC |
420 | (define-public openexr |
421 | (package | |
422 | (name "openexr") | |
942c7889 | 423 | (version (package-version ilmbase)) |
cab6a253 | 424 | (source (origin |
942c7889 MB |
425 | (inherit (package-source ilmbase)) |
426 | (file-name (git-file-name "openexr" version)) | |
cab6a253 LC |
427 | (modules '((guix build utils))) |
428 | (snippet | |
c2c36f5f | 429 | '(begin |
942c7889 | 430 | (substitute* (find-files "OpenEXR" "tmpDir\\.h") |
c2c36f5f LC |
431 | (("\"/var/tmp/\"") |
432 | "\"/tmp/\"")) | |
fcde1d27 | 433 | #t)))) |
942c7889 | 434 | (build-system cmake-build-system) |
bce6f7ce LF |
435 | (arguments |
436 | '(#:phases | |
437 | (modify-phases %standard-phases | |
942c7889 MB |
438 | (add-after 'unpack 'change-directory |
439 | (lambda _ | |
440 | (chdir "OpenEXR") | |
441 | #t)) | |
442 | (add-after 'change-directory 'disable-broken-test | |
bce6f7ce LF |
443 | ;; This test fails on i686. Upstream developers suggest that |
444 | ;; this test is broken on i686 and can be safely disabled: | |
445 | ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748 | |
446 | (lambda _ | |
447 | (substitute* "IlmImfTest/main.cpp" | |
448 | (("#include \"testOptimizedInterleavePatterns.h\"") | |
449 | "//#include \"testOptimizedInterleavePatterns.h\"") | |
450 | (("TEST \\(testOptimizedInterleavePatterns") | |
451 | "//TEST (testOptimizedInterleavePatterns")) | |
452 | #t))))) | |
cab6a253 LC |
453 | (native-inputs |
454 | `(("pkg-config" ,pkg-config))) | |
455 | (propagated-inputs | |
456 | `(("ilmbase" ,ilmbase) ;used in public headers | |
457 | ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz" | |
25c4a04f | 458 | (home-page "https://www.openexr.com/") |
9f2840cb | 459 | (synopsis "High-dynamic range file format library") |
cab6a253 LC |
460 | (description |
461 | "OpenEXR is a high dynamic-range (HDR) image file format developed for | |
9f2840cb LC |
462 | use in computer imaging applications. The IlmImf C++ libraries support |
463 | storage of the \"EXR\" file format for storing 16-bit floating-point images.") | |
cab6a253 | 464 | (license license:bsd-3))) |
9d620590 | 465 | |
71299c12 RW |
466 | (define-public openimageio |
467 | (package | |
468 | (name "openimageio") | |
04d52b1a | 469 | (version "1.8.17") |
71299c12 | 470 | (source (origin |
1cd968e8 EF |
471 | (method git-fetch) |
472 | (uri (git-reference | |
473 | (url "https://github.com/OpenImageIO/oiio.git") | |
474 | (commit (string-append "Release-" version)))) | |
475 | (file-name (git-file-name name version)) | |
71299c12 RW |
476 | (sha256 |
477 | (base32 | |
04d52b1a | 478 | "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2")))) |
71299c12 RW |
479 | (build-system cmake-build-system) |
480 | ;; FIXME: To run all tests successfully, test image sets from multiple | |
481 | ;; third party sources have to be present. For details see | |
482 | ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL | |
4b42b106 | 483 | (arguments |
51d4c79d | 484 | `(#:tests? #f)) |
71299c12 RW |
485 | (native-inputs |
486 | `(("pkg-config" ,pkg-config))) | |
487 | (inputs | |
488 | `(("boost" ,boost) | |
489 | ("libpng" ,libpng) | |
09982785 | 490 | ("libjpeg" ,libjpeg) |
71299c12 RW |
491 | ("libtiff" ,libtiff) |
492 | ("giflib" ,giflib) | |
493 | ("openexr" ,openexr) | |
494 | ("ilmbase" ,ilmbase) | |
495 | ("python" ,python-2) | |
496 | ("zlib" ,zlib))) | |
497 | (synopsis "C++ library for reading and writing images") | |
498 | (description | |
499 | "OpenImageIO is a library for reading and writing images, and a bunch of | |
500 | related classes, utilities, and applications. There is a particular emphasis | |
501 | on formats and functionality used in professional, large-scale animation and | |
502 | visual effects work for film.") | |
503 | (home-page "http://www.openimageio.org") | |
504 | (license license:bsd-3))) | |
505 | ||
04d52b1a LF |
506 | ;; This older version of OpenImageIO is required for Blender 2.79. |
507 | (define-public openimageio-1.7 | |
508 | (package | |
509 | (inherit openimageio) | |
510 | (name "openimageio") | |
511 | (version "1.7.19") | |
512 | (source (origin | |
513 | (method git-fetch) | |
514 | (uri (git-reference | |
515 | (url "https://github.com/OpenImageIO/oiio.git") | |
516 | (commit (string-append "Release-" version)))) | |
517 | (file-name (git-file-name name version)) | |
518 | (sha256 | |
519 | (base32 | |
520 | "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc")))))) | |
521 | ||
6bf11392 MR |
522 | (define-public openscenegraph |
523 | (package | |
524 | (name "openscenegraph") | |
24f7bac0 | 525 | (version "3.6.4") |
6bf11392 MR |
526 | (source |
527 | (origin | |
fc4f13bd AK |
528 | (method git-fetch) |
529 | (uri (git-reference | |
530 | (url "https://github.com/openscenegraph/OpenSceneGraph") | |
531 | (commit (string-append "OpenSceneGraph-" version)))) | |
6bf11392 MR |
532 | (sha256 |
533 | (base32 | |
24f7bac0 | 534 | "0x8hdbzw0b71j91fzp9cwmy9a7ava8v8wwyj8nxijq942vdx1785")) |
3752b683 | 535 | (file-name (git-file-name name version)))) |
fc4f13bd AK |
536 | (properties |
537 | `((upstream-name . "OpenSceneGraph"))) | |
6bf11392 MR |
538 | (build-system cmake-build-system) |
539 | (arguments | |
3def739d TGR |
540 | `(#:tests? #f ; no test target available |
541 | ;; Without this flag, 'rd' will be added to the name of the | |
542 | ;; library binaries and break linking with other programs. | |
543 | #:build-type "Release" | |
6bf11392 MR |
544 | #:configure-flags |
545 | (list (string-append "-DCMAKE_INSTALL_RPATH=" | |
546 | (assoc-ref %outputs "out") "/lib:" | |
3def739d | 547 | (assoc-ref %outputs "out") "/lib64")))) |
6bf11392 | 548 | (native-inputs |
fc4f13bd AK |
549 | `(("pkg-config" ,pkg-config) |
550 | ("unzip" ,unzip))) | |
6bf11392 | 551 | (inputs |
c695fb76 | 552 | `(("giflib" ,giflib) |
24f7bac0 | 553 | ("libjpeg" ,libjpeg) ; Required for the JPEG texture plugin. |
c695fb76 TGR |
554 | ("jasper" ,jasper) |
555 | ("librsvg" ,librsvg) | |
fc4f13bd | 556 | ("libxrandr" ,libxrandr) |
c695fb76 TGR |
557 | ("ffmpeg" ,ffmpeg) |
558 | ("mesa" ,mesa))) | |
6bf11392 MR |
559 | (synopsis "High performance real-time graphics toolkit") |
560 | (description | |
d7c5aac1 | 561 | "The OpenSceneGraph is a high performance 3D graphics toolkit |
6bf11392 | 562 | used by application developers in fields such as visual simulation, games, |
d7c5aac1 | 563 | virtual reality, scientific visualization and modeling.") |
6bf11392 MR |
564 | (home-page "http://www.openscenegraph.org") |
565 | ;; The 'LICENSE' file explains that the source is licensed under | |
566 | ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL. | |
567 | (license license:lgpl2.1))) | |
568 | ||
df8ab774 RW |
569 | ;; We need this for simgear |
570 | (define-public openscenegraph-3.4 | |
571 | (package (inherit openscenegraph) | |
572 | (name "openscenegraph") | |
573 | (version "3.4.1") | |
574 | (source | |
575 | (origin | |
576 | (method git-fetch) | |
577 | (uri (git-reference | |
578 | (url "https://github.com/openscenegraph/OpenSceneGraph") | |
579 | (commit (string-append "OpenSceneGraph-" version)))) | |
580 | (file-name (git-file-name name version)) | |
581 | (sha256 | |
582 | (base32 | |
583 | "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9")))) | |
584 | (arguments | |
585 | (substitute-keyword-arguments (package-arguments openscenegraph) | |
586 | ((#:configure-flags flags) | |
587 | `(cons | |
588 | ;; The jpeg plugin requires conversion between integers and booleans | |
589 | "-DCMAKE_CXX_FLAGS=-fpermissive" | |
590 | ,flags)))) | |
591 | (inputs | |
592 | `(("libjpeg" ,libjpeg) | |
593 | ,@(package-inputs openscenegraph))))) | |
594 | ||
84a0c6ff MB |
595 | |
596 | (define-public openmw-openscenegraph | |
597 | ;; OpenMW prefers its own fork of openscenegraph: | |
598 | ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph. | |
599 | (let ((commit "36a962845a2c87a6671fd822157e0729d164e940")) | |
600 | (hidden-package | |
601 | (package | |
602 | (inherit openscenegraph) | |
603 | (version (git-version "3.6" "1" commit)) | |
604 | (source | |
605 | (origin | |
606 | (method git-fetch) | |
607 | (uri (git-reference | |
608 | (url "https://github.com/OpenMW/osg/") | |
609 | (commit commit))) | |
610 | (file-name (git-file-name (package-name openscenegraph) version)) | |
611 | (sha256 | |
612 | (base32 | |
613 | "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia")))) | |
614 | (arguments | |
615 | (substitute-keyword-arguments (package-arguments openscenegraph) | |
616 | ((#:configure-flags flags) | |
617 | ;; As per the above wiki link, the following plugins are enough: | |
618 | `(append | |
619 | '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0" | |
620 | "-DBUILD_OSG_PLUGIN_OSG=1" | |
621 | "-DBUILD_OSG_PLUGIN_DDS=1" | |
622 | "-DBUILD_OSG_PLUGIN_TGA=1" | |
623 | "-DBUILD_OSG_PLUGIN_BMP=1" | |
624 | "-DBUILD_OSG_PLUGIN_JPEG=1" | |
625 | "-DBUILD_OSG_PLUGIN_PNG=1" | |
626 | "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0" | |
627 | ;; The jpeg plugin requires conversion between integers and booleans | |
628 | "-DCMAKE_CXX_FLAGS=-fpermissive") | |
629 | ,flags)))))))) | |
630 | ||
340ee00b KK |
631 | (define-public povray |
632 | (package | |
633 | (name "povray") | |
634 | (version "3.7.0.8") | |
635 | (source (origin | |
636 | (method git-fetch) | |
637 | (uri (git-reference | |
638 | (url "https://github.com/POV-Ray/povray") | |
639 | (commit (string-append "v" version)))) | |
640 | (file-name (git-file-name name version)) | |
641 | (sha256 | |
642 | (base32 | |
643 | "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z")) | |
644 | (modules '((guix build utils))) | |
645 | (snippet | |
646 | '(begin | |
647 | ;; Delete bundled libraries. | |
648 | (delete-file-recursively "libraries") | |
649 | #t)))) | |
650 | (build-system gnu-build-system) | |
651 | (native-inputs | |
652 | `(("autoconf" ,autoconf) | |
653 | ("automake" ,automake) | |
654 | ("pkg-config" ,pkg-config))) | |
655 | (inputs | |
656 | `(("boost" ,boost) | |
657 | ("libjpeg" ,libjpeg) | |
658 | ("libpng" ,libpng) | |
659 | ("libtiff" ,libtiff) | |
660 | ("openexr" ,openexr) | |
661 | ("sdl" ,sdl) | |
662 | ("zlib" ,zlib))) | |
663 | (arguments | |
664 | '(#:configure-flags | |
665 | (list "COMPILED_BY=Guix" | |
666 | (string-append "--with-boost-libdir=" | |
667 | (assoc-ref %build-inputs "boost") "/lib") | |
668 | "CXXFLAGS=-std=c++11" | |
669 | "--disable-optimiz-arch") | |
670 | #:phases | |
671 | (modify-phases %standard-phases | |
672 | (add-after 'unpack 'run-prebuild | |
673 | (lambda _ | |
674 | (setenv "HOME" (getcwd)) | |
675 | (with-directory-excursion "unix" | |
676 | (substitute* "prebuild.sh" | |
677 | (("/bin/sh") (which "sh"))) | |
678 | (invoke "sh" "prebuild.sh")) | |
679 | #t)) | |
680 | ;; The bootstrap script is run by the prebuild script in the | |
681 | ;; "run-prebuild" phase. | |
682 | (delete 'bootstrap)))) | |
683 | (synopsis "Tool for creating three-dimensional graphics") | |
684 | (description | |
685 | "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool | |
686 | for producing high-quality computer graphics. @code{POV-Ray} creates | |
687 | three-dimensional, photo-realistic images using a rendering technique called | |
688 | ray-tracing. It reads in a text file containing information describing the | |
689 | objects and lighting in a scene and generates an image of that scene from the | |
690 | view point of a camera also described in the text file. Ray-tracing is not a | |
691 | fast process by any means, but it produces very high quality images with | |
692 | realistic reflections, shading, perspective and other effects.") | |
693 | (home-page "http://www.povray.org/") | |
694 | (license license:agpl3+))) | |
695 | ||
96d15e48 RW |
696 | (define-public rapicorn |
697 | (package | |
698 | (name "rapicorn") | |
699 | (version "16.0.0") | |
700 | (source (origin | |
701 | (method url-fetch) | |
702 | (uri (string-append "https://testbit.eu/pub/dists/rapicorn/" | |
703 | "rapicorn-" version ".tar.xz")) | |
704 | (sha256 | |
705 | (base32 | |
42bf3429 AE |
706 | "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d")) |
707 | (patches (search-patches "rapicorn-isnan.patch")))) | |
96d15e48 RW |
708 | (build-system gnu-build-system) |
709 | (arguments | |
002528bc | 710 | `(#:phases |
96d15e48 | 711 | (modify-phases %standard-phases |
002528bc RW |
712 | (add-after 'unpack 'fix-tests |
713 | (lambda _ | |
714 | ;; Our grep does not support perl regular expressions. | |
715 | (substitute* "taptool.sh" | |
716 | (("grep -P") "grep -E")) | |
717 | ;; Disable path tests because we cannot access /bin or /sbin. | |
718 | (substitute* "rcore/tests/multitest.cc" | |
719 | (("TCMP \\(Path::equals \\(\"/bin\"") "//")) | |
720 | #t)) | |
721 | (add-before 'check 'pre-check | |
722 | (lambda _ | |
723 | ;; The test suite requires a running X server (with DISPLAY | |
724 | ;; number 99 or higher). | |
725 | (system "Xvfb :99 &") | |
726 | (setenv "DISPLAY" ":99") | |
727 | #t)) | |
728 | (add-after 'unpack 'replace-fhs-paths | |
96d15e48 RW |
729 | (lambda _ |
730 | (substitute* (cons "Makefile.decl" | |
731 | (find-files "." "^Makefile\\.in$")) | |
002528bc RW |
732 | (("/bin/ls") (which "ls")) |
733 | (("/usr/bin/env") (which "env"))) | |
96d15e48 RW |
734 | #t))))) |
735 | ;; These libraries are listed in the "Required" section of the pkg-config | |
736 | ;; file. | |
737 | (propagated-inputs | |
738 | `(("librsvg" ,librsvg) | |
739 | ("cairo" ,cairo) | |
740 | ("pango" ,pango) | |
002528bc RW |
741 | ("libxml2" ,libxml2) |
742 | ("python2-enum34" ,python2-enum34))) | |
96d15e48 RW |
743 | (inputs |
744 | `(("gdk-pixbuf" ,gdk-pixbuf) | |
745 | ("libpng" ,libpng-1.2) | |
746 | ("readline" ,readline) | |
747 | ("libcroco" ,libcroco) | |
748 | ("python" ,python-2) | |
749 | ("cython" ,python2-cython))) | |
750 | (native-inputs | |
751 | `(("pandoc" ,ghc-pandoc) | |
752 | ("bison" ,bison) | |
753 | ("flex" ,flex) | |
754 | ("doxygen" ,doxygen) | |
755 | ("graphviz" ,graphviz) | |
756 | ("intltool" ,intltool) | |
002528bc RW |
757 | ("pkg-config" ,pkg-config) |
758 | ("xvfb" ,xorg-server))) | |
36c5cf75 | 759 | (home-page "https://rapicorn.testbit.org/") |
96d15e48 RW |
760 | (synopsis "Toolkit for rapid development of user interfaces") |
761 | (description | |
762 | "Rapicorn is a toolkit for rapid development of user interfaces in C++ | |
763 | and Python. The user interface is designed in a declarative markup language | |
764 | and is connected to the programming logic using data bindings and commands.") | |
765 | (license license:mpl2.0))) | |
766 | ||
9d620590 LC |
767 | (define-public ctl |
768 | (package | |
769 | (name "ctl") | |
770 | (version "1.5.2") | |
771 | (source (origin | |
772 | (method url-fetch) | |
773 | (uri (string-append "https://github.com/ampas/CTL/archive/ctl-" | |
774 | version ".tar.gz")) | |
775 | (sha256 | |
776 | (base32 | |
777 | "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp")))) | |
778 | (build-system cmake-build-system) | |
779 | (arguments '(#:tests? #f)) ;no 'test' target | |
780 | ||
781 | ;; Headers include OpenEXR and IlmBase headers. | |
782 | (propagated-inputs `(("openexr" ,openexr))) | |
783 | ||
784 | (home-page "http://ampasctl.sourceforge.net") | |
785 | (synopsis "Color Transformation Language") | |
786 | (description | |
787 | "The Color Transformation Language, or CTL, is a small programming | |
788 | language that was designed to serve as a building block for digital color | |
789 | management systems. CTL allows users to describe color transforms in a | |
790 | concise and unambiguous way by expressing them as programs. In order to apply | |
791 | a given transform to an image, the color management system instructs a CTL | |
792 | interpreter to load and run the CTL program that describes the transform. The | |
793 | original and the transformed image constitute the CTL program's input and | |
794 | output.") | |
795 | ||
796 | ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file | |
797 | ;; and headers use different wording. | |
166191b3 | 798 | (license (license:non-copyleft "file://LICENSE")))) |
a29bfc28 LC |
799 | |
800 | (define-public brdf-explorer | |
9b91fb32 RW |
801 | ;; There are no release tarballs, and not even tags in the repo, |
802 | ;; so use the latest revision. | |
803 | (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019") | |
804 | (revision "1")) | |
805 | (package | |
806 | (name "brdf-explorer") | |
807 | (version (string-append "1.0.0-" revision "." (string-take commit 9))) | |
808 | (source (origin | |
809 | (method git-fetch) | |
810 | (uri (git-reference | |
811 | (url "https://github.com/wdas/brdf.git") | |
812 | (commit commit))) | |
813 | (sha256 | |
814 | (base32 | |
815 | "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx")) | |
816 | (file-name (string-append name "-" version "-checkout")))) | |
817 | (build-system gnu-build-system) | |
818 | (arguments | |
819 | `(#:phases (modify-phases %standard-phases | |
820 | (replace 'configure | |
821 | (lambda* (#:key outputs #:allow-other-keys) | |
822 | (let ((out (assoc-ref outputs "out"))) | |
cba8ba8b RW |
823 | (invoke "qmake" |
824 | (string-append "prefix=" out))))) | |
9b91fb32 RW |
825 | (add-after 'install 'wrap-program |
826 | (lambda* (#:key outputs #:allow-other-keys) | |
827 | (let* ((out (assoc-ref outputs "out")) | |
828 | (bin (string-append out "/bin")) | |
829 | (data (string-append | |
830 | out "/share/brdf"))) | |
831 | (with-directory-excursion bin | |
832 | (rename-file "brdf" ".brdf-real") | |
833 | (call-with-output-file "brdf" | |
834 | (lambda (port) | |
835 | (format port "#!/bin/sh | |
a29bfc28 LC |
836 | # Run the thing from its home, otherwise it just bails out. |
837 | cd \"~a\" | |
838 | exec -a \"$0\" ~a/.brdf-real~%" | |
9b91fb32 | 839 | data bin))) |
cba8ba8b RW |
840 | (chmod "brdf" #o555))) |
841 | #t))))) | |
9b91fb32 RW |
842 | (native-inputs |
843 | `(("qttools" ,qttools))) ;for 'qmake' | |
844 | (inputs | |
845 | `(("qtbase" ,qtbase) | |
846 | ("mesa" ,mesa) | |
847 | ("glew" ,glew) | |
848 | ("freeglut" ,freeglut) | |
849 | ("zlib" ,zlib))) | |
850 | (home-page "http://www.disneyanimation.com/technology/brdf.html") | |
851 | (synopsis | |
852 | "Analyze bidirectional reflectance distribution functions (BRDFs)") | |
853 | (description | |
854 | "BRDF Explorer is an application that allows the development and analysis | |
a29bfc28 LC |
855 | of bidirectional reflectance distribution functions (BRDFs). It can load and |
856 | plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader | |
857 | language), measured material data from the MERL database, and anisotropic | |
858 | measured material data from MIT CSAIL. Graphs and visualizations update in | |
859 | real time as parameters are changed, making it a useful tool for evaluating | |
860 | and understanding different BRDFs (and other component functions).") | |
9b91fb32 | 861 | (license license:ms-pl)))) |
87bafa07 TČ |
862 | |
863 | (define-public agg | |
864 | (package | |
865 | (name "agg") | |
866 | (version "2.5") | |
867 | (source (origin | |
868 | (method url-fetch) | |
7db0799d LC |
869 | (uri (list (string-append |
870 | "ftp://ftp.fau.de/gentoo/distfiles/agg-" | |
871 | version ".tar.gz") | |
872 | (string-append | |
873 | "ftp://ftp.ula.ve/gentoo/distfiles/agg-" | |
874 | version ".tar.gz") | |
875 | ||
876 | ;; Site was discontinued. | |
877 | (string-append "http://www.antigrain.com/agg-" | |
878 | version ".tar.gz"))) | |
87bafa07 TČ |
879 | (sha256 |
880 | (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb")) | |
fc1adab1 | 881 | (patches (search-patches "agg-am_c_prototype.patch")))) |
87bafa07 TČ |
882 | (build-system gnu-build-system) |
883 | (arguments | |
884 | '(#:configure-flags | |
885 | (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11") | |
886 | "/include") | |
887 | (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11") | |
31f45cf7 EF |
888 | "/lib") |
889 | "--disable-examples") | |
87bafa07 | 890 | #:phases |
dc1d3cde | 891 | (modify-phases %standard-phases |
8d18edde | 892 | (replace 'bootstrap |
dc1d3cde KK |
893 | (lambda _ |
894 | ;; let's call configure from configure phase and not now | |
895 | (substitute* "autogen.sh" (("./configure") "# ./configure")) | |
8d18edde | 896 | (invoke "sh" "autogen.sh")))))) |
87bafa07 TČ |
897 | (native-inputs |
898 | `(("pkg-config" ,pkg-config) | |
899 | ("libtool" ,libtool) | |
900 | ("autoconf" ,autoconf) | |
8d18edde | 901 | ("automake" ,automake))) |
87bafa07 TČ |
902 | (inputs |
903 | `(("libx11" ,libx11) | |
904 | ("freetype" ,freetype) | |
905 | ("sdl" ,sdl))) | |
7db0799d LC |
906 | |
907 | ;; Antigrain.com was discontinued. | |
908 | (home-page "http://agg.sourceforge.net/antigrain.com/index.html") | |
87bafa07 TČ |
909 | (synopsis "High-quality 2D graphics rendering engine for C++") |
910 | (description | |
911 | "Anti-Grain Geometry is a high quality rendering engine written in C++. | |
912 | It supports sub-pixel resolutions and anti-aliasing. It is also library for | |
913 | rendering SVG graphics.") | |
914 | (license license:gpl2+))) | |
f76d56d2 BW |
915 | |
916 | (define-public python-pastel | |
917 | (package | |
918 | (name "python-pastel") | |
1e8826bd | 919 | (version "0.1.1") |
f76d56d2 BW |
920 | (source |
921 | (origin | |
922 | (method url-fetch) | |
923 | (uri (pypi-uri "pastel" version)) | |
924 | (sha256 | |
925 | (base32 | |
1e8826bd | 926 | "1qxcrcl8pzh66l8s6hym153mijdhwna0afcsmgca0bj4n80ijfxz")))) |
f76d56d2 | 927 | (build-system python-build-system) |
1e8826bd | 928 | (arguments |
929 | `(#:phases (modify-phases %standard-phases | |
930 | (replace 'check | |
931 | (lambda _ (invoke "pytest" "pastel" "tests/")))))) | |
f76d56d2 BW |
932 | (native-inputs |
933 | `(("python-pytest" ,python-pytest))) | |
934 | (home-page "https://github.com/sdispater/pastel") | |
935 | (synopsis "Library to colorize strings in your terminal") | |
936 | (description "Pastel is a simple library to help you colorize strings in | |
1e8826bd | 937 | your terminal.") |
f76d56d2 BW |
938 | (license license:expat))) |
939 | ||
940 | (define-public python2-pastel | |
941 | (package-with-python2 python-pastel)) | |
17153d18 MO |
942 | |
943 | (define-public fgallery | |
944 | (package | |
945 | (name "fgallery") | |
946 | (version "1.8.2") | |
947 | (source (origin | |
948 | (method url-fetch) | |
949 | (uri | |
950 | (string-append | |
951 | "http://www.thregr.org/~wavexx/software/fgallery/releases/" | |
952 | "fgallery-" version ".zip")) | |
953 | (sha256 | |
954 | (base32 | |
955 | "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf")))) | |
956 | (build-system gnu-build-system) | |
957 | (arguments | |
958 | `(#:tests? #f ; no tests | |
959 | #:phases | |
960 | (modify-phases %standard-phases | |
961 | (delete 'configure) | |
962 | (delete 'build) | |
963 | (replace 'install | |
964 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
965 | (let* ((out (assoc-ref outputs "out")) | |
966 | (bin (string-append out "/bin/")) | |
967 | (share (string-append out "/share/fgallery")) | |
968 | (man (string-append out "/share/man/man1")) | |
969 | (perl5lib (getenv "PERL5LIB")) | |
970 | (script (string-append share "/fgallery"))) | |
971 | (define (bin-directory input-name) | |
972 | (string-append (assoc-ref inputs input-name) "/bin")) | |
973 | ||
974 | (mkdir-p man) | |
975 | (copy-file "fgallery.1" (string-append man "/fgallery.1")) | |
976 | ||
977 | (mkdir-p share) | |
978 | (copy-recursively "." share) | |
979 | ||
980 | ;; fgallery copies files from store when it is run. The | |
981 | ;; read-only permissions from the store directories will cause | |
982 | ;; fgallery to fail. Do not preserve file attributes when | |
983 | ;; copying files to prevent it. | |
984 | (substitute* script | |
985 | (("'cp'") | |
986 | "'cp', '--no-preserve=all'")) | |
987 | ||
988 | (mkdir-p bin) | |
989 | (symlink script (string-append out "/bin/fgallery")) | |
990 | ||
991 | (wrap-program script | |
992 | `("PATH" ":" prefix | |
993 | ,(map bin-directory '("imagemagick" | |
994 | "lcms" | |
995 | "fbida" | |
996 | "libjpeg" | |
997 | "zip" | |
998 | "jpegoptim" | |
999 | "pngcrush" | |
1000 | "p7zip"))) | |
1001 | `("PERL5LIB" ":" prefix (,perl5lib))) | |
1002 | #t)))))) | |
1003 | (native-inputs | |
1004 | `(("unzip" ,unzip))) | |
1005 | ;; TODO: Add missing optional dependency: facedetect. | |
1006 | (inputs | |
1007 | `(("imagemagick" ,imagemagick) | |
1008 | ("lcms" ,lcms) | |
1009 | ("fbida" ,fbida) | |
1010 | ("libjpeg" ,libjpeg) | |
1011 | ("zip" ,zip) | |
1012 | ("perl" ,perl) | |
1013 | ("perl-cpanel-json-xs" ,perl-cpanel-json-xs) | |
1014 | ("perl-image-exiftool" ,perl-image-exiftool) | |
1015 | ("jpegoptim" ,jpegoptim) | |
1016 | ("pngcrush" ,pngcrush) | |
1017 | ("p7zip" ,p7zip))) | |
1018 | (home-page "http://www.thregr.org/~wavexx/software/fgallery/") | |
1019 | (synopsis "Static photo gallery generator") | |
1020 | (description | |
1021 | "FGallery is a static, JavaScript photo gallery generator with minimalist | |
1022 | look. The result can be uploaded on any web server without additional | |
1023 | requirements.") | |
1024 | (license license:gpl2+))) | |
13f30b54 CZ |
1025 | |
1026 | (define-public opensubdiv | |
1027 | (package | |
1028 | (name "opensubdiv") | |
a31b7457 | 1029 | (version "3.4.0") |
13f30b54 CZ |
1030 | (source (origin |
1031 | (method git-fetch) | |
1032 | (uri (git-reference | |
a31b7457 MB |
1033 | (url "https://github.com/PixarAnimationStudios/OpenSubdiv") |
1034 | (commit (string-append "v" (string-join (string-split version #\.) | |
1035 | "_"))))) | |
13f30b54 CZ |
1036 | (file-name (git-file-name name version)) |
1037 | (sha256 | |
1038 | (base32 | |
1039 | "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12")))) | |
1040 | (build-system cmake-build-system) | |
1041 | (arguments | |
1042 | `(#:phases (modify-phases %standard-phases | |
1043 | (add-before 'configure 'set-glew-location | |
1044 | (lambda* (#:key inputs #:allow-other-keys) | |
1045 | (setenv "GLEW_LOCATION" (assoc-ref inputs "glew")) | |
1046 | #t)) | |
1047 | (add-before 'check 'start-xorg-server | |
1048 | (lambda* (#:key inputs #:allow-other-keys) | |
1049 | ;; The test suite requires a running X server. | |
1050 | (system (string-append (assoc-ref inputs "xorg-server") | |
1051 | "/bin/Xvfb :1 &")) | |
1052 | (setenv "DISPLAY" ":1") | |
1053 | #t))))) | |
1054 | (native-inputs | |
1055 | `(("xorg-server" ,xorg-server))) | |
1056 | (inputs | |
1057 | `(("glew" ,glew) | |
1058 | ("libxrandr" ,libxrandr) | |
1059 | ("libxcursor" ,libxcursor) | |
1060 | ("libxinerama" ,libxinerama) | |
1061 | ("libxi" ,libxi) | |
1062 | ("zlib" ,zlib) | |
1063 | ("glfw" ,glfw))) | |
1064 | (home-page "http://graphics.pixar.com/opensubdiv/") | |
1065 | (synopsis "High performance subdivision surface evaluation") | |
1066 | (description "OpenSubdiv is a set of libraries that implement high | |
1067 | performance subdivision surface (subdiv) evaluation on massively parallel CPU | |
1068 | and GPU architectures.") | |
1069 | (license license:asl2.0))) | |
c3c0eda6 SS |
1070 | |
1071 | (define-public opencsg | |
1072 | (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c)))) | |
1073 | (package | |
1074 | (name "opencsg") | |
1075 | (version "1.4.2") | |
1076 | (source | |
1077 | (origin | |
1078 | (method git-fetch) | |
1079 | (uri (git-reference | |
1080 | (url "https://github.com/floriankirsch/OpenCSG.git") | |
1081 | (commit (string-append "opencsg-" | |
1082 | (string-map dot-to-dash version) | |
1083 | "-release")))) | |
1084 | (file-name (git-file-name name version)) | |
1085 | (sha256 | |
1086 | (base32 | |
1087 | "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m")))) | |
1088 | (build-system gnu-build-system) | |
1089 | (arguments | |
1090 | `(#:phases | |
1091 | (modify-phases %standard-phases | |
1092 | (replace 'configure | |
1093 | (lambda* (#:key outputs #:allow-other-keys) | |
1094 | (substitute* "src/Makefile" | |
1095 | (("/usr/local") (assoc-ref outputs "out"))) | |
1096 | #t)) | |
1097 | (add-before 'build 'skip-example | |
1098 | (lambda _ (chdir "src") #t))))) | |
1099 | (inputs | |
1100 | `(("glew" ,glew) | |
1101 | ("freeglut" ,freeglut))) | |
1102 | (synopsis "Library for rendering Constructive Solid Geometry (CSG)") | |
1103 | (description | |
1104 | "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using | |
1105 | OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones. | |
1106 | For example, two shapes can be combined by uniting them, by intersecting them, | |
1107 | or by subtracting one shape from the other.") | |
1108 | (home-page "http://www.opencsg.org/") | |
1109 | (license license:gpl2)))) | |
f36617cb JS |
1110 | |
1111 | (define-public coin3D | |
24268ec4 TGR |
1112 | ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See: |
1113 | ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified | |
1114 | (let ((revision 1) | |
1115 | (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d")) | |
1116 | (package | |
1117 | (name "coin3D") | |
1118 | (version | |
1119 | (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7))) | |
1120 | (source | |
1121 | (origin | |
1122 | (method hg-fetch) | |
1123 | (uri (hg-reference | |
1124 | (url "https://bitbucket.org/Coin3D/coin") | |
1125 | (changeset changeset))) | |
1126 | (file-name (git-file-name name version)) | |
1127 | (sha256 | |
1128 | (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j")) | |
1129 | (modules '((guix build utils))) | |
1130 | (snippet | |
1131 | '(begin | |
1132 | (for-each delete-file | |
1133 | '("cfg/csubst.exe" | |
1134 | "cfg/wrapmsvc.exe")) | |
1135 | #t)))) | |
1136 | (build-system cmake-build-system) | |
1137 | (native-inputs | |
1138 | `(("doxygen" ,doxygen) | |
1139 | ("graphviz" ,graphviz))) | |
1140 | (inputs | |
1141 | `(("boost" ,boost) | |
1142 | ("freeglut" ,freeglut) | |
1143 | ("glew" ,glew))) | |
1144 | (arguments | |
1145 | `(#:configure-flags | |
1146 | (list | |
1147 | "-DCOIN_BUILD_DOCUMENTATION_MAN=ON" | |
1148 | (string-append "-DBOOST_ROOT=" | |
1149 | (assoc-ref %build-inputs "boost"))))) | |
1150 | (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home") | |
1151 | (synopsis | |
1152 | "High-level 3D visualization library with Open Inventor 2.1 API") | |
1153 | (description | |
1154 | "Coin is a 3D graphics library with an Application Programming Interface | |
f36617cb JS |
1155 | based on the Open Inventor 2.1 API. For those who are not familiar with |
1156 | Open Inventor, it is a scene-graph based retain-mode rendering and model | |
1157 | interaction library, written in C++, which has become the de facto | |
1158 | standard graphics library for 3D visualization and visual simulation | |
1159 | software in the scientific and engineering community.") | |
24268ec4 | 1160 | (license license:bsd-3)))) |