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