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