1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019, 2020 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
24 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
25 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages graphics)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages algebra)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages cdrom)
52 #:use-module (gnu packages check)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages datastructures)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages fonts)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gnome)
66 #:use-module (gnu packages gnunet)
67 #:use-module (gnu packages graphviz)
68 #:use-module (gnu packages gstreamer)
69 #:use-module (gnu packages gtk)
70 #:use-module (gnu packages haskell-xyz)
71 #:use-module (gnu packages image)
72 #:use-module (gnu packages image-processing)
73 #:use-module (gnu packages imagemagick)
74 #:use-module (gnu packages jemalloc)
75 #:use-module (gnu packages kde-frameworks)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages lua)
78 #:use-module (gnu packages maths)
79 #:use-module (gnu packages mp3)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages pdf)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages photo)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages plotutils)
86 #:use-module (gnu packages pth)
87 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-xyz)
90 #:use-module (gnu packages qt)
91 #:use-module (gnu packages readline)
92 #:use-module (gnu packages sdl)
93 #:use-module (gnu packages stb)
94 #:use-module (gnu packages swig)
95 #:use-module (gnu packages tbb)
96 #:use-module (gnu packages upnp)
97 #:use-module (gnu packages video)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xorg)
101 #:use-module (gnu packages xdisorg)
102 #:use-module (guix build-system copy)
103 #:use-module (guix build-system cmake)
104 #:use-module (guix build-system gnu)
105 #:use-module (guix build-system meson)
106 #:use-module (guix build-system python)
107 #:use-module (guix build-system qt)
108 #:use-module (guix download)
109 #:use-module (guix git-download)
110 #:use-module (guix hg-download)
111 #:use-module ((guix licenses) #:prefix license:)
112 #:use-module (guix packages)
113 #:use-module (guix utils))
115 (define-public eglexternalplatform
117 (name "eglexternalplatform")
124 (url "https://github.com/NVIDIA/eglexternalplatform.git")
127 (git-file-name name version))
129 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
130 (build-system copy-build-system)
133 (modify-phases %standard-phases
134 (add-after 'unpack 'patch-pkgconfig
135 (lambda* (#:key outputs #:allow-other-keys)
136 (substitute* "eglexternalplatform.pc"
138 (assoc-ref outputs "out")))
140 (add-after 'install 'revise
141 (lambda* (#:key outputs #:allow-other-keys)
142 (let* ((out (assoc-ref outputs "out")))
143 (mkdir-p (string-append out "/include/EGL"))
145 (string-append out "/interface")
146 (string-append out "/include/EGL"))
147 (mkdir-p (string-append out "/share/pkgconfig"))
149 (string-append out "/eglexternalplatform.pc")
150 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
151 (for-each delete-file-recursively
153 (string-append out "/samples")
154 (string-append out "/COPYING")
155 (string-append out "/README.md"))))
157 (synopsis "EGL External Platform interface")
158 (description "EGLExternalPlatform is an specification of the EGL External
159 Platform interface for writing EGL platforms and their interactions with modern
160 window systems on top of existing low-level EGL platform implementations. This
161 keeps window system implementation specifics out of EGL drivers by using
162 application-facing EGL functions.")
163 (home-page "https://github.com/NVIDIA/eglexternalplatform")
164 (license license:expat)))
166 (define-public egl-wayland
175 (url "https://github.com/NVIDIA/egl-wayland.git")
178 (git-file-name name version))
180 (base32 "09r6a69z75j3hb9751g3ap4gm1xn71aw3j7z0c7jns292cnaa76n"))))
181 (build-system meson-build-system)
183 `(("pkg-config" ,pkg-config)))
186 ("wayland" ,wayland)))
188 `(("eglexternalplatform" ,eglexternalplatform)))
189 (synopsis "EGLStream-based Wayland external platform")
190 (description "EGL-Wayland is an implementation of a EGL External Platform
191 library to add client-side Wayland support to EGL on top of EGLDevice and
192 EGLStream families of extensions.")
193 (home-page "https://github.com/NVIDIA/egl-wayland")
194 (license license:expat)))
205 (url "https://github.com/hodefoting/mmm.git")
208 (git-file-name name version))
210 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
211 (build-system meson-build-system)
214 ("pkg-config" ,pkg-config)))
219 (synopsis "Memory Mapped Machine")
220 (description "MMM is a shared memory protocol for virtualising access to
221 framebuffer graphics, audio output and input event.")
222 (home-page "https://github.com/hodefoting/mrg")
223 (license license:isc)))
225 (define-public directfb
234 (url "https://github.com/deniskropp/DirectFB.git")
235 (commit "DIRECTFB_1_7_7")))
236 (file-name (git-file-name name version))
238 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
239 (build-system gnu-build-system)
242 (modify-phases %standard-phases
243 (add-after 'unpack 'disable-configure-during-bootstrap
245 (substitute* "autogen.sh"
246 (("^.*\\$srcdir/configure.*") ""))
249 `(("autoconf" ,autoconf)
250 ("automake" ,automake)
253 ("pkg-config" ,pkg-config)))
257 ("freetype" ,freetype)
259 ("gstreamer" ,gstreamer)
262 ("jpeg" ,libjpeg-turbo)
265 ("libtimidity" ,libtimidity)
266 ("linux-headers" ,linux-libre-headers)
278 ("vorbisfile" ,libvorbis)
282 ("xcomposite" ,libxcomposite)
284 ("xproto" ,xorgproto)
288 (synopsis "DFB Graphics Library")
289 (description "DirectFB is a graphics library which was designed with embedded
290 systems in mind. It offers maximum hardware accelerated performance at a
291 minimum of resource usage and overhead.")
292 (home-page "http://www.directfb.org/")
293 (license license:lgpl2.1+)))
304 (url "https://github.com/deniskropp/flux.git")
306 (file-name (git-file-name name version))
308 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
309 (build-system gnu-build-system)
311 `(("autoconf" ,autoconf)
312 ("automake" ,automake)
314 ("pkg-config" ,pkg-config)))
315 (synopsis "Interface description language")
316 (description "Flux is an interface description language used by DirectFB.
317 Fluxcomp compiles .flux files to .cpp or .c files.")
318 (home-page "http://www.directfb.org/")
319 (license license:lgpl2.1+))) ; Same as DirectFB
329 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
331 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
332 (build-system gnu-build-system)
335 (modify-phases %standard-phases
336 (add-after 'unpack 'patch
338 (substitute* "configure"
339 (("-I/usr/include/freetype2")
342 (assoc-ref %build-inputs "freetype")
343 "/include/freetype2"))))
346 `(("doxygen" ,doxygen)))
349 ("freetype" ,freetype)
352 ("jpeg" ,libjpeg-turbo)
356 ("xcursor" ,libxcursor)
358 ("xfixes" ,libxfixes)
361 ("xrandr" ,libxrandr)
362 ("xrender" ,libxrender)
363 ("xshm" ,libxshmfence)
365 (synopsis "Widget Toolkit for building GUI")
366 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
367 Graphical User Interfaces easily and effectively. It offers a wide, and
368 growing, collection of Controls, and provides state of the art facilities such
369 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
370 manipulation. FOX also implements icons, images, and user-convenience features
371 such as status line help, and tooltips. Tooltips may even be used for 3D
373 (home-page "http://www.fox-toolkit.org")
374 (license license:lgpl2.1+)))
376 (define-public autotrace
377 (let ((commit "travis-20190624.59")
378 (version-base "0.40.0"))
381 (version (string-append version-base "-"
382 (if (string-prefix? "travis-" commit)
383 (string-drop commit 7)
388 (url "https://github.com/autotrace/autotrace")
390 (file-name (git-file-name name version))
393 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
394 (build-system gnu-build-system)
396 `(#:phases (modify-phases %standard-phases
397 ;; See: https://github.com/autotrace/autotrace/issues/27.
398 (add-after 'unpack 'include-spline.h-header
400 (substitute* "Makefile.am"
401 ((".*src/types.h.*" all)
402 (string-append all "\t\tsrc/spline.h \\\n")))
404 ;; See: https://github.com/autotrace/autotrace/issues/26.
407 (invoke "sh" "tests/runtests.sh"))))))
410 ("pkg-config" ,pkg-config)
411 ("autoconf" ,autoconf)
412 ("automake" ,automake)
413 ("intltool" ,intltool)
415 ("gettext" ,gettext-minimal)))
418 ("libjpeg" ,libjpeg-turbo)
420 ("imagemagick" ,imagemagick)
421 ("pstoedit" ,pstoedit)))
422 (home-page "https://github.com/autotrace/autotrace")
423 (synopsis "Bitmap to vector graphics converter")
424 (description "AutoTrace is a utility for converting bitmap into vector
425 graphics. It can trace outlines and midlines, effect color reduction or
426 despeckling and has support for many input and output formats. It can be used
427 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
428 (license (list license:gpl2+ ;for the utility itself
429 license:lgpl2.1+))))) ;for use as a library
431 (define-public blender
437 (uri (string-append "https://download.blender.org/source/"
438 "blender-" version ".tar.xz"))
441 "0xyawly00a59hfdb6b7va84k5fhcv2mxnzd77vs22bzi9y7sap43"))))
442 (build-system cmake-build-system)
444 (let ((python-version (version-major+minor (package-version python))))
445 `(;; Test files are very large and not included in the release tarball.
448 (list "-DWITH_CODEC_FFMPEG=ON"
449 "-DWITH_CODEC_SNDFILE=ON"
451 "-DWITH_DOC_MANPAGE=ON"
453 "-DWITH_IMAGE_OPENJPEG=ON"
454 "-DWITH_INPUT_NDOF=ON"
455 "-DWITH_INSTALL_PORTABLE=OFF"
457 "-DWITH_MOD_OCEANSIM=ON"
458 "-DWITH_OPENSUBDIV=ON"
459 "-DWITH_PYTHON_INSTALL=OFF"
460 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
461 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
463 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
464 "/include/python" ,python-version)
465 (string-append "-DPYTHON_VERSION=" ,python-version)
466 (string-append "-DPYTHON_NUMPY_PATH="
467 (assoc-ref %build-inputs "python-numpy")
468 "/lib/python" ,python-version "/site-packages/"))
470 (modify-phases %standard-phases
471 ;; XXX This file doesn't exist in the Git sources but will probably
472 ;; exist in the eventual 2.80 source tarball.
473 (add-after 'unpack 'fix-broken-import
475 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
476 (("import encode_bin") "from . import encode_bin"))
478 (add-after 'set-paths 'add-ilmbase-include-path
479 (lambda* (#:key inputs #:allow-other-keys)
480 ;; OpenEXR propagates ilmbase, but its include files do not appear
481 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
482 ;; the CPATH to satisfy the dependency on "half.h".
484 (string-append (assoc-ref inputs "ilmbase")
486 ":" (or (getenv "CPATH") "")))
490 ("jemalloc" ,jemalloc)
493 ("libxrender" ,libxrender)
494 ("opencolorio" ,opencolorio)
495 ("openimageio" ,openimageio)
497 ("opensubdiv" ,opensubdiv)
499 ("openjpeg" ,openjpeg)
500 ("libjpeg" ,libjpeg-turbo)
506 ("libsndfile" ,libsndfile)
507 ("freetype" ,freetype)
511 ("python-numpy" ,python-numpy)
514 (home-page "https://blender.org/")
515 (synopsis "3D graphics creation suite")
517 "Blender is a 3D graphics creation suite. It supports the entirety of
518 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
519 compositing and motion tracking, even video editing and game creation. The
520 application can be customized via its API for Python scripting.")
521 (license license:gpl2+)))
523 (define-public blender-2.79
529 (uri (string-append "https://download.blender.org/source/"
530 "blender-" version ".tar.gz"))
533 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
534 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
535 "blender-2.79-oiio2.patch"
536 ;; The following patches may be
537 ;; needed when the default GCC is
539 ;; "blender-2.79-gcc8.patch"
540 ;; "blender-2.79-gcc9.patch"
541 "blender-2.79-python-3.7-fix.patch"
542 "blender-2.79-python-3.8-fix.patch"))))
543 (build-system cmake-build-system)
545 (let ((python-version (version-major+minor (package-version python))))
546 `(;; Test files are very large and not included in the release tarball.
549 (list "-DWITH_CODEC_FFMPEG=ON"
550 "-DWITH_CODEC_SNDFILE=ON"
552 "-DWITH_DOC_MANPAGE=ON"
554 "-DWITH_GAMEENGINE=ON"
555 "-DWITH_IMAGE_OPENJPEG=ON"
556 "-DWITH_INPUT_NDOF=ON"
557 "-DWITH_INSTALL_PORTABLE=OFF"
559 "-DWITH_MOD_OCEANSIM=ON"
561 "-DWITH_PYTHON_INSTALL=OFF"
562 "-DWITH_PYTHON_INSTALL=OFF"
563 "-DWITH_SYSTEM_OPENJPEG=ON"
564 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
565 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
567 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
568 "/include/python" ,python-version)
569 (string-append "-DPYTHON_VERSION=" ,python-version))
571 (modify-phases %standard-phases
572 (add-after 'unpack 'fix-broken-import
574 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
575 (("import encode_bin") "from . import encode_bin"))
577 (add-after 'set-paths 'add-ilmbase-include-path
578 (lambda* (#:key inputs #:allow-other-keys)
579 ;; OpenEXR propagates ilmbase, but its include files do not appear
580 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
581 ;; the CPATH to satisfy the dependency on "half.h".
583 (string-append (assoc-ref inputs "ilmbase")
585 ":" (or (getenv "CPATH") "")))
589 ("jemalloc" ,jemalloc)
591 ("openimageio" ,openimageio)
594 ("openjpeg" ,openjpeg)
595 ("libjpeg" ,libjpeg-turbo)
601 ("libsndfile" ,libsndfile)
602 ("freetype" ,freetype)
607 (home-page "https://blender.org/")
608 (synopsis "3D graphics creation suite")
610 "Blender is a 3D graphics creation suite. It supports the entirety of
611 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
612 compositing and motion tracking, even video editing and game creation. The
613 application can be customized via its API for Python scripting.
615 NOTE: This older version of Blender is the last release that does not require
616 OpenGL 3. It is retained for use with older computers.")
617 (license license:gpl2+)))
626 (url "https://github.com/guillaumechereau/goxel")
627 (commit (string-append "v" version))))
628 (file-name (git-file-name name version))
631 "1wmxy5wfk1xrqgz0y0zcr4vkddylqc70cv4vzk117x6whjnldsm3"))))
632 (build-system gnu-build-system)
635 #:phases (modify-phases %standard-phases (delete 'configure))
636 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
639 `(("pkg-config" ,pkg-config)))
644 (home-page "https://goxel.xyz/")
645 (synopsis "Voxel editor")
647 "Goxel is a voxel editor that features unlimited scene size, unlimited
648 history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
649 and export to various formats including the format used by Magicavoxel.")
650 (license license:gpl3+)))
652 (define-public assimp
659 (url "https://github.com/assimp/assimp")
660 (commit (string-append "v" version))))
661 (file-name (git-file-name name version))
664 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
665 (build-system cmake-build-system)
668 (home-page "http://www.assimp.org/")
669 (synopsis "Asset import library")
671 "The Open Asset Import Library loads more than 40 3D file formats into
672 one unified data structure. Additionally, assimp features various mesh post
673 processing tools: normals and tangent space generation, triangulation, vertex
674 cache locality optimization, removal of degenerate primitives and duplicate
675 vertices, sorting by primitive type, merging of redundant materials and many
677 (license license:bsd-3)))
686 "https://github.com/CGAL/cgal/releases/download/releases/"
687 "CGAL-" version "/CGAL-" version ".tar.xz"))
690 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
691 (build-system cmake-build-system)
693 '(#:tests? #f)) ; no test target
698 (home-page "https://www.cgal.org/")
699 (synopsis "Computational geometry algorithms library")
701 "CGAL provides easy access to efficient and reliable geometric algorithms
702 in the form of a C++ library. CGAL is used in various areas needing geometric
703 computation, such as: computer graphics, scientific visualization, computer
704 aided design and modeling, geographic information systems, molecular biology,
705 medical imaging, robotics and motion planning, mesh generation, numerical
706 methods, etc. It provides data structures and algorithms such as
707 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
710 ;; The 'LICENSE' file explains that a subset is available under more
711 ;; permissive licenses.
712 (license license:gpl3+)))
714 (define-public ilmbase
721 (url "https://github.com/openexr/openexr")
722 (commit (string-append "v" version))))
723 (file-name (git-file-name "ilmbase" version))
726 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
727 (patches (search-patches "ilmbase-fix-tests.patch"))))
728 (build-system cmake-build-system)
730 `(#:phases (modify-phases %standard-phases
731 (add-after 'unpack 'change-directory
735 (home-page "https://www.openexr.com/")
736 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
738 "IlmBase provides several utility libraries for C++. Half is a class
739 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
740 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
741 quaternions and other useful 2D and 3D math functions. Iex is an
742 exception-handling library.")
743 (license license:bsd-3)))
745 (define-public lib2geom
746 ;; Use the latest master commit, as the 1.0 release suffer build problems.
748 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
751 (version (git-version "1.0" revision commit))
755 (url "https://gitlab.com/inkscape/lib2geom.git")
757 (file-name (git-file-name name version))
760 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
762 ;; Patch submitted to upstream (see:
763 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
764 (search-patches "lib2geom-fix-tests.patch"))
765 (modules '((guix build utils)))
768 ;; Fix py2geom module initialization (see:
769 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
770 (substitute* "src/py2geom/__init__.py"
771 (("_py2geom") "py2geom._py2geom"))
773 (build-system cmake-build-system)
775 `(#:imported-modules ((guix build python-build-system)
776 ,@%cmake-build-system-modules)
777 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
778 "-D2GEOM_BOOST_PYTHON=ON"
779 ;; Compiling the Cython bindings fail (see:
780 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
781 "-D2GEOM_CYTHON_BINDINGS=OFF")
783 (modify-phases %standard-phases
784 (add-after 'unpack 'patch-python-lib-install-path
785 (lambda* (#:key inputs outputs #:allow-other-keys)
786 (let* ((python-version (@ (guix build python-build-system)
788 (python-maj-min-version (python-version
789 (assoc-ref inputs "python")))
790 (site-package (string-append
791 (assoc-ref outputs "out")
792 "/lib/python" python-maj-min-version
794 (substitute* '("src/cython/CMakeLists.txt"
795 "src/py2geom/CMakeLists.txt")
796 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
797 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
799 (native-inputs `(("python" ,python-wrapper)
800 ("googletest" ,googletest)
801 ("pkg-config" ,pkg-config)))
802 (inputs `(("cairo" ,cairo)
803 ("pycairo" ,python-pycairo)
804 ("double-conversion" ,double-conversion)
808 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
809 (home-page "https://gitlab.com/inkscape/lib2geom/")
810 (synopsis "C++ 2D graphics library")
811 (description "2geom is a C++ library of mathematics for paths, curves,
812 and other geometric calculations. Designed for vector graphics, it tackles
813 Bézier curves, conic sections, paths, intersections, transformations, and
815 ;; Because the library is linked with the GNU Scientific Library
816 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
817 ;; https://gitlab.com/inkscape/inkscape/issues/784).
818 (license license:gpl3+))))
820 (define-public pstoedit
826 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
827 version "/pstoedit-" version ".tar.gz"))
830 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
831 (build-system gnu-build-system)
833 `(("pkg-config" ,pkg-config)))
835 `(("ghostscript" ,ghostscript)
836 ("imagemagick" ,imagemagick)
837 ("libplot" ,plotutils)
838 ("libjpeg" ,libjpeg-turbo)
839 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
840 (home-page "http://www.pstoedit.net/")
841 (synopsis "Converter for PostScript and PDF graphics")
842 (description "The @code{pstoedit} utility allows translating graphics
843 in the PostScript or PDF (Portable Document Format) formats to various
844 other vector formats such as:
849 @item Flattened PostScript
850 @item DXF, a CAD (Computed-Aided Design) exchange format
851 @item PIC (for troff/groff)
852 @item MetaPost (for usage with TeX/LaTeX)
853 @item LaTeX2e picture
854 @item GNU Metafile (for use with plotutils/libplot)
855 @item Any format supported by ImageMagick
857 (license license:gpl2+)))
859 (define-public dear-imgui
867 (url "https://github.com/ocornut/imgui")
868 (commit (string-append "v" version))))
869 (file-name (git-file-name name version))
871 (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
872 (build-system gnu-build-system)
875 (list (string-append "CC=" ,(cc-for-target))
876 (string-append "PREFIX=" (assoc-ref %outputs "out"))
877 (string-append "VERSION=" ,version))
878 #:tests? #f ; no test suite
880 (modify-phases %standard-phases
881 (add-after 'unpack 'unpack-debian-files
882 (lambda* (#:key inputs #:allow-other-keys)
883 (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
884 (apply invoke "patch" "-Np1" "-i"
885 (find-files "debian/patches" "\\.patch$"))
886 (substitute* "Makefile"
887 (("<stb/") "<") ; Guix doesn't use this subdirectory
888 ;; Don't build or install the static library.
889 (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
890 (substitute* (list "imgui.pc.in"
892 ;; Don't link against a non-existent library.
895 (delete 'configure) ; no configure script
897 ;; The default ‘install’ target installs the static library. Don't.
898 (lambda* (#:key make-flags #:allow-other-keys)
899 (apply invoke "make" "install-shared" "install-header"
903 ;; Upstream doesn't provide a build system. Use Debian's.
906 (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
907 version "+ds-1.debian.tar.xz"))
909 (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
910 ("pkg-config" ,pkg-config)))
912 `(("freetype" ,freetype)
913 ("stb-rect-pack" ,stb-rect-pack)
914 ("stb-truetype" ,stb-truetype)))
915 (home-page "https://github.com/ocornut/imgui")
916 (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
918 "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
919 It creates optimized vertex buffers that you can render anytime in your
920 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
921 self-contained, without external dependencies.
923 Dear ImGui is aimed at content creation, visualization, and debugging tools as
924 opposed to average end-user interfaces. Hence it favors simplicity and
925 productivity but lacks certain features often found in higher-level libraries.
926 It is particularly suited to integration in game engine tooling, real-time 3D
927 applications, full-screen applications, and embedded platforms without standard
928 operating system features.")
929 (license license:expat))) ; some examples/ use the zlib licence
939 (url "https://github.com/OGRECave/ogre")
940 (commit (string-append "v" version))))
941 (file-name (git-file-name name version))
943 (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
944 (build-system cmake-build-system)
947 (modify-phases %standard-phases
948 (add-before 'configure 'unpack-dear-imgui
949 (lambda* (#:key inputs #:allow-other-keys)
950 (copy-recursively (assoc-ref inputs "dear-imgui-source")
951 "../dear-imgui-source")
953 (add-before 'configure 'pre-configure
954 ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
955 ;; a consequence, we cannot suggest ours in configure flags. Fix
957 (lambda* (#:key inputs outputs #:allow-other-keys)
958 (substitute* "CMakeLists.txt"
959 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
962 (let* ((out (assoc-ref %outputs "out"))
964 (string-join (list (string-append out "/lib")
965 (string-append out "/lib/OGRE"))
967 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
968 "-DIMGUI_DIR=../dear-imgui-source"
969 "-DOGRE_BUILD_DEPENDENCIES=OFF"
970 "-DOGRE_BUILD_TESTS=TRUE"
971 "-DOGRE_INSTALL_DOCS=TRUE"
972 "-DOGRE_INSTALL_SAMPLES=TRUE"
973 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
976 ("dear-imgui-source" ,(package-source dear-imgui))
978 ("googletest" ,googletest-1.8)
979 ("pkg-config" ,pkg-config)))
981 `(("font-dejavu" ,font-dejavu)
982 ("freeimage" ,freeimage)
983 ("freetype" ,freetype)
986 ("libxrandr" ,libxrandr)
990 ("zziplib" ,zziplib)))
991 (synopsis "Scene-oriented, flexible 3D engine written in C++")
993 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
994 flexible 3D engine written in C++ designed to make it easier and more intuitive
995 for developers to produce applications utilising hardware-accelerated 3D
997 (home-page "https://www.ogre3d.org/")
998 (license license:expat)))
1000 (define-public openexr
1003 (version (package-version ilmbase))
1005 (inherit (package-source ilmbase))
1006 (file-name (git-file-name "openexr" version))
1007 (modules '((guix build utils)))
1010 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
1014 (build-system cmake-build-system)
1017 (modify-phases %standard-phases
1018 (add-after 'unpack 'change-directory
1022 (add-after 'change-directory 'increase-test-timeout
1024 ;; On armhf-linux, we need to override the CTest default
1025 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
1026 (substitute* "IlmImfTest/CMakeLists.txt"
1027 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
1030 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
1032 ,@(if (not (target-64bit?))
1033 `((add-after 'change-directory 'disable-broken-test
1034 ;; This test fails on i686. Upstream developers suggest that
1035 ;; this test is broken on i686 and can be safely disabled:
1036 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
1038 (substitute* "IlmImfTest/main.cpp"
1039 ((".*testOptimizedInterleavePatterns.*") ""))
1043 `(("pkg-config" ,pkg-config)))
1045 `(("ilmbase" ,ilmbase) ;used in public headers
1046 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
1047 (home-page "https://www.openexr.com/")
1048 (synopsis "High-dynamic range file format library")
1050 "OpenEXR is a high dynamic-range (HDR) image file format developed for
1051 use in computer imaging applications. The IlmImf C++ libraries support
1052 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
1053 (license license:bsd-3)))
1055 (define-public openimageio
1057 (name "openimageio")
1062 (url "https://github.com/OpenImageIO/oiio")
1063 (commit (string-append "Release-" version))))
1064 (file-name (git-file-name name version))
1067 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
1068 (build-system cmake-build-system)
1069 ;; FIXME: To run all tests successfully, test image sets from multiple
1070 ;; third party sources have to be present. For details see
1071 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
1075 `(("pkg-config" ,pkg-config)))
1079 ("libjpeg" ,libjpeg-turbo)
1080 ("libtiff" ,libtiff)
1082 ("openexr" ,openexr)
1083 ("ilmbase" ,ilmbase)
1084 ("python" ,python-wrapper)
1085 ("pybind11" ,pybind11)
1086 ("robin-map" ,robin-map)
1088 (synopsis "C++ library for reading and writing images")
1090 "OpenImageIO is a library for reading and writing images, and a bunch of
1091 related classes, utilities, and applications. There is a particular emphasis
1092 on formats and functionality used in professional, large-scale animation and
1093 visual effects work for film.")
1094 (home-page "https://www.openimageio.org")
1095 (license license:bsd-3)))
1097 (define-public openscenegraph
1099 (name "openscenegraph")
1105 (url "https://github.com/openscenegraph/OpenSceneGraph")
1106 (commit (string-append "OpenSceneGraph-" version))))
1108 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
1109 (file-name (git-file-name name version))))
1111 `((upstream-name . "OpenSceneGraph")))
1112 (build-system cmake-build-system)
1114 `(#:tests? #f ; no test target available
1115 ;; Without this flag, 'rd' will be added to the name of the
1116 ;; library binaries and break linking with other programs.
1117 #:build-type "Release"
1119 (list (string-append "-DCMAKE_INSTALL_RPATH="
1120 (assoc-ref %outputs "out") "/lib:"
1121 (assoc-ref %outputs "out") "/lib64"))))
1123 `(("pkg-config" ,pkg-config)
1126 `(("giflib" ,giflib)
1127 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1129 ("librsvg" ,librsvg)
1130 ("libxrandr" ,libxrandr)
1133 (synopsis "High-performance real-time graphics toolkit")
1135 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1136 used by application developers in fields such as visual simulation, games,
1137 virtual reality, scientific visualization and modeling.")
1138 (home-page "http://www.openscenegraph.org")
1139 ;; The 'LICENSE' file explains that the source is licensed under
1140 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1141 (license license:lgpl2.1)))
1143 ;; We need this for simgear
1144 (define-public openscenegraph-3.4
1145 (package (inherit openscenegraph)
1146 (name "openscenegraph")
1152 (url "https://github.com/openscenegraph/OpenSceneGraph")
1153 (commit (string-append "OpenSceneGraph-" version))))
1154 (file-name (git-file-name name version))
1157 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1159 (substitute-keyword-arguments (package-arguments openscenegraph)
1160 ((#:configure-flags flags)
1162 ;; The jpeg plugin requires conversion between integers and booleans
1163 "-DCMAKE_CXX_FLAGS=-fpermissive"
1166 `(("libjpeg" ,libjpeg-turbo)
1167 ,@(package-inputs openscenegraph)))))
1170 (define-public openmw-openscenegraph
1171 ;; OpenMW prefers its own fork of openscenegraph:
1172 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1173 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1176 (inherit openscenegraph)
1177 (version (git-version "3.6" "1" commit))
1182 (url "https://github.com/OpenMW/osg/")
1184 (file-name (git-file-name (package-name openscenegraph) version))
1187 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1189 (substitute-keyword-arguments (package-arguments openscenegraph)
1190 ((#:configure-flags flags)
1191 ;; As per the above wiki link, the following plugins are enough:
1193 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1194 "-DBUILD_OSG_PLUGIN_OSG=1"
1195 "-DBUILD_OSG_PLUGIN_DDS=1"
1196 "-DBUILD_OSG_PLUGIN_TGA=1"
1197 "-DBUILD_OSG_PLUGIN_BMP=1"
1198 "-DBUILD_OSG_PLUGIN_JPEG=1"
1199 "-DBUILD_OSG_PLUGIN_PNG=1"
1200 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1201 ;; The jpeg plugin requires conversion between integers and booleans
1202 "-DCMAKE_CXX_FLAGS=-fpermissive")
1205 (define-public povray
1212 (url "https://github.com/POV-Ray/povray")
1213 (commit (string-append "v" version))))
1214 (file-name (git-file-name name version))
1217 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1218 (modules '((guix build utils)))
1221 ;; Delete bundled libraries.
1222 (delete-file-recursively "libraries")
1224 (build-system gnu-build-system)
1226 `(("autoconf" ,autoconf)
1227 ("automake" ,automake)
1228 ("pkg-config" ,pkg-config)))
1231 ("libjpeg" ,libjpeg-turbo)
1233 ("libtiff" ,libtiff)
1234 ("openexr" ,openexr)
1239 (list "COMPILED_BY=Guix"
1240 (string-append "--with-boost-libdir="
1241 (assoc-ref %build-inputs "boost") "/lib")
1242 "--disable-optimiz-arch")
1244 (modify-phases %standard-phases
1245 (add-after 'unpack 'run-prebuild
1247 (setenv "HOME" (getcwd))
1248 (with-directory-excursion "unix"
1249 (substitute* "prebuild.sh"
1250 (("/bin/sh") (which "sh")))
1251 (invoke "sh" "prebuild.sh"))
1253 ;; The bootstrap script is run by the prebuild script in the
1254 ;; "run-prebuild" phase.
1255 (delete 'bootstrap))))
1256 (synopsis "Tool for creating three-dimensional graphics")
1258 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1259 for producing high-quality computer graphics. @code{POV-Ray} creates
1260 three-dimensional, photo-realistic images using a rendering technique called
1261 ray-tracing. It reads in a text file containing information describing the
1262 objects and lighting in a scene and generates an image of that scene from the
1263 view point of a camera also described in the text file. Ray-tracing is not a
1264 fast process by any means, but it produces very high quality images with
1265 realistic reflections, shading, perspective and other effects.")
1266 (home-page "http://www.povray.org/")
1267 (license license:agpl3+)))
1269 (define-public rapicorn
1275 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1276 "rapicorn-" version ".tar.xz"))
1279 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1280 (patches (search-patches "rapicorn-isnan.patch"))))
1281 (build-system gnu-build-system)
1284 (modify-phases %standard-phases
1285 (add-after 'unpack 'fix-tests
1287 ;; Our grep does not support perl regular expressions.
1288 (substitute* "taptool.sh"
1289 (("grep -P") "grep -E"))
1290 ;; Disable path tests because we cannot access /bin or /sbin.
1291 (substitute* "rcore/tests/multitest.cc"
1292 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1294 (add-before 'check 'pre-check
1296 ;; The test suite requires a running X server (with DISPLAY
1297 ;; number 99 or higher).
1298 (system "Xvfb :99 &")
1299 (setenv "DISPLAY" ":99")
1301 (add-after 'unpack 'replace-fhs-paths
1303 (substitute* (cons "Makefile.decl"
1304 (find-files "." "^Makefile\\.in$"))
1305 (("/bin/ls") (which "ls"))
1306 (("/usr/bin/env") (which "env")))
1308 ;; These libraries are listed in the "Required" section of the pkg-config
1311 `(("librsvg" ,librsvg)
1314 ("libxml2" ,libxml2)
1315 ("python2-enum34" ,python2-enum34)))
1317 `(("gdk-pixbuf" ,gdk-pixbuf)
1318 ("libpng" ,libpng-1.2)
1319 ("readline" ,readline)
1320 ("libcroco" ,libcroco)
1321 ("python" ,python-2)
1322 ("cython" ,python2-cython)))
1324 `(("pandoc" ,pandoc)
1327 ("doxygen" ,doxygen)
1328 ("graphviz" ,graphviz)
1329 ("intltool" ,intltool)
1330 ("pkg-config" ,pkg-config)
1331 ("xvfb" ,xorg-server-for-tests)))
1332 (home-page "https://rapicorn.testbit.org/")
1333 (synopsis "Toolkit for rapid development of user interfaces")
1335 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1336 and Python. The user interface is designed in a declarative markup language
1337 and is connected to the programming logic using data bindings and commands.")
1338 (license license:mpl2.0)))
1346 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1350 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1351 (build-system cmake-build-system)
1352 (arguments '(#:tests? #f)) ;no 'test' target
1354 ;; Headers include OpenEXR and IlmBase headers.
1355 (propagated-inputs `(("openexr" ,openexr)))
1357 (home-page "http://ampasctl.sourceforge.net")
1358 (synopsis "Color Transformation Language")
1360 "The Color Transformation Language, or CTL, is a small programming
1361 language that was designed to serve as a building block for digital color
1362 management systems. CTL allows users to describe color transforms in a
1363 concise and unambiguous way by expressing them as programs. In order to apply
1364 a given transform to an image, the color management system instructs a CTL
1365 interpreter to load and run the CTL program that describes the transform. The
1366 original and the transformed image constitute the CTL program's input and
1369 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1370 ;; and headers use different wording.
1371 (license (license:non-copyleft "file://LICENSE"))))
1373 (define-public brdf-explorer
1374 ;; There are no release tarballs, and not even tags in the repo,
1375 ;; so use the latest revision.
1376 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1379 (name "brdf-explorer")
1380 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1384 (url "https://github.com/wdas/brdf")
1388 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1389 (file-name (string-append name "-" version "-checkout"))))
1390 (build-system gnu-build-system)
1392 `(#:phases (modify-phases %standard-phases
1394 (lambda* (#:key outputs #:allow-other-keys)
1395 (let ((out (assoc-ref outputs "out")))
1397 (string-append "prefix=" out)))))
1398 (add-after 'install 'wrap-program
1399 (lambda* (#:key outputs #:allow-other-keys)
1400 (let* ((out (assoc-ref outputs "out"))
1401 (bin (string-append out "/bin"))
1402 (data (string-append
1403 out "/share/brdf")))
1404 (with-directory-excursion bin
1405 (rename-file "brdf" ".brdf-real")
1406 (call-with-output-file "brdf"
1408 (format port "#!/bin/sh
1409 # Run the thing from its home, otherwise it just bails out.
1411 exec -a \"$0\" ~a/.brdf-real~%"
1413 (chmod "brdf" #o555)))
1416 `(("qttools" ,qttools))) ;for 'qmake'
1418 `(("qtbase" ,qtbase)
1421 ("freeglut" ,freeglut)
1423 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1425 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1427 "BRDF Explorer is an application that allows the development and analysis
1428 of bidirectional reflectance distribution functions (BRDFs). It can load and
1429 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1430 language), measured material data from the MERL database, and anisotropic
1431 measured material data from MIT CSAIL. Graphs and visualizations update in
1432 real time as parameters are changed, making it a useful tool for evaluating
1433 and understanding different BRDFs (and other component functions).")
1434 (license license:ms-pl))))
1442 (uri (list (string-append
1443 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1446 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1449 ;; Site was discontinued.
1450 (string-append "http://www.antigrain.com/agg-"
1451 version ".tar.gz")))
1453 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1454 (patches (search-patches "agg-am_c_prototype.patch"))))
1455 (build-system gnu-build-system)
1458 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1460 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1462 "--disable-examples")
1464 (modify-phases %standard-phases
1467 ;; let's call configure from configure phase and not now
1468 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1469 (invoke "sh" "autogen.sh"))))))
1471 `(("pkg-config" ,pkg-config)
1472 ("libtool" ,libtool)
1473 ("autoconf" ,autoconf)
1474 ("automake" ,automake)))
1476 `(("libx11" ,libx11)
1477 ("freetype" ,freetype)
1480 ;; Antigrain.com was discontinued.
1481 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1482 (synopsis "High-quality 2D graphics rendering engine for C++")
1484 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1485 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1486 rendering SVG graphics.")
1487 (license license:gpl2+)))
1489 (define-public python-pastel
1491 (name "python-pastel")
1496 (uri (pypi-uri "pastel" version))
1499 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1500 (build-system python-build-system)
1502 `(#:phases (modify-phases %standard-phases
1504 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1506 `(("python-pytest" ,python-pytest)))
1507 (home-page "https://github.com/sdispater/pastel")
1508 (synopsis "Library to colorize strings in your terminal")
1509 (description "Pastel is a simple library to help you colorize strings in
1511 (license license:expat)))
1513 (define-public python2-pastel
1514 (package-with-python2 python-pastel))
1516 (define-public fgallery
1524 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1525 "fgallery-" version ".zip"))
1528 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1529 (build-system gnu-build-system)
1531 `(#:tests? #f ; no tests
1533 (modify-phases %standard-phases
1537 (lambda* (#:key inputs outputs #:allow-other-keys)
1538 (let* ((out (assoc-ref outputs "out"))
1539 (bin (string-append out "/bin/"))
1540 (share (string-append out "/share/fgallery"))
1541 (man (string-append out "/share/man/man1"))
1542 (perl5lib (getenv "PERL5LIB"))
1543 (script (string-append share "/fgallery")))
1544 (define (bin-directory input-name)
1545 (string-append (assoc-ref inputs input-name) "/bin"))
1548 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1551 (copy-recursively "." share)
1553 ;; fgallery copies files from store when it is run. The
1554 ;; read-only permissions from the store directories will cause
1555 ;; fgallery to fail. Do not preserve file attributes when
1556 ;; copying files to prevent it.
1559 "'cp', '--no-preserve=all'"))
1562 (symlink script (string-append out "/bin/fgallery"))
1564 (wrap-program script
1566 ,(map bin-directory '("imagemagick"
1574 `("PERL5LIB" ":" prefix (,perl5lib)))
1577 `(("unzip" ,unzip)))
1578 ;; TODO: Add missing optional dependency: facedetect.
1580 `(("imagemagick" ,imagemagick)
1583 ("libjpeg" ,libjpeg-turbo)
1586 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1587 ("perl-image-exiftool" ,perl-image-exiftool)
1588 ("jpegoptim" ,jpegoptim)
1589 ("pngcrush" ,pngcrush)
1591 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1592 (synopsis "Static photo gallery generator")
1594 "FGallery is a static, JavaScript photo gallery generator with minimalist
1595 look. The result can be uploaded on any web server without additional
1597 (license license:gpl2+)))
1599 (define-public opensubdiv
1606 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1607 (commit (string-append "v" (string-join (string-split version #\.)
1609 (file-name (git-file-name name version))
1612 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1613 (build-system cmake-build-system)
1615 `(#:phases (modify-phases %standard-phases
1616 (add-before 'configure 'set-glew-location
1617 (lambda* (#:key inputs #:allow-other-keys)
1618 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1620 (add-before 'check 'start-xorg-server
1621 (lambda* (#:key inputs #:allow-other-keys)
1622 ;; The test suite requires a running X server.
1623 (system (string-append (assoc-ref inputs "xorg-server")
1625 (setenv "DISPLAY" ":1")
1628 `(("xorg-server" ,xorg-server-for-tests)))
1631 ("libxrandr" ,libxrandr)
1632 ("libxcursor" ,libxcursor)
1633 ("libxinerama" ,libxinerama)
1637 (home-page "https://graphics.pixar.com/opensubdiv/")
1638 (synopsis "High performance subdivision surface evaluation")
1639 (description "OpenSubdiv is a set of libraries that implement high
1640 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1641 and GPU architectures.")
1642 (license license:asl2.0)))
1644 (define-public opencsg
1645 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1653 (url "https://github.com/floriankirsch/OpenCSG")
1654 (commit (string-append "opencsg-"
1655 (string-map dot-to-dash version)
1657 (file-name (git-file-name name version))
1660 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1661 (build-system gnu-build-system)
1664 (modify-phases %standard-phases
1666 (lambda* (#:key outputs #:allow-other-keys)
1667 (substitute* "src/Makefile"
1668 (("/usr/local") (assoc-ref outputs "out")))
1670 (add-before 'build 'skip-example
1671 (lambda _ (chdir "src") #t)))))
1674 ("freeglut" ,freeglut)))
1675 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1677 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1678 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1679 For example, two shapes can be combined by uniting them, by intersecting them,
1680 or by subtracting one shape from the other.")
1681 (home-page "http://www.opencsg.org/")
1682 (license license:gpl2))))
1684 (define-public coin3D
1685 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1686 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1688 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1692 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1697 (url "https://bitbucket.org/Coin3D/coin")
1698 (changeset changeset)))
1699 (file-name (git-file-name name version))
1701 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1702 (modules '((guix build utils)))
1705 (for-each delete-file
1707 "cfg/wrapmsvc.exe"))
1709 (build-system cmake-build-system)
1711 `(("doxygen" ,doxygen)
1712 ("graphviz" ,graphviz)))
1715 ("freeglut" ,freeglut)
1720 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1721 (string-append "-DBOOST_ROOT="
1722 (assoc-ref %build-inputs "boost")))))
1723 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1725 "High-level 3D visualization library with Open Inventor 2.1 API")
1727 "Coin is a 3D graphics library with an Application Programming Interface
1728 based on the Open Inventor 2.1 API. For those who are not familiar with
1729 Open Inventor, it is a scene-graph based retain-mode rendering and model
1730 interaction library, written in C++, which has become the de facto
1731 standard graphics library for 3D visualization and visual simulation
1732 software in the scientific and engineering community.")
1733 (license license:bsd-3))))
1735 (define-public superfamiconv
1737 (name "superfamiconv")
1743 (url "https://github.com/Optiroc/SuperFamiconv")
1744 (commit (string-append "v" version))))
1745 (file-name (git-file-name name version))
1748 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1749 (build-system gnu-build-system)
1751 `(#:tests? #f ; no tests
1753 (modify-phases %standard-phases
1756 (lambda* (#:key outputs #:allow-other-keys)
1757 (let* ((outdir (assoc-ref outputs "out"))
1758 (bindir (string-append outdir "/bin")))
1759 (install-file "bin/superfamiconv" bindir)
1761 (home-page "https://github.com/Optiroc/SuperFamiconv")
1762 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1763 and PC Engine formats")
1764 (description "SuperFamiconv is a converter for tiled graphics, supporting
1765 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1766 Automated palette selection is supported.")
1767 (license license:expat)))
1769 (define-public drawpile
1770 ;; This commit fix building with libmicrohttpd>=0.71.
1771 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1775 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1779 (url "https://github.com/drawpile/Drawpile")
1781 (file-name (git-file-name name version))
1784 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1785 (build-system qt-build-system)
1788 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1790 `(("extra-cmake-modules" ,extra-cmake-modules)
1791 ("pkg-config" ,pkg-config)))
1793 `(("giflib" ,giflib)
1794 ("karchive" ,karchive)
1796 ("libmicrohttpd" ,libmicrohttpd)
1797 ("libsodium" ,libsodium)
1800 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1802 ("qtkeychain" ,qtkeychain)
1803 ("qtmultimedia" ,qtmultimedia)
1805 ("qtx11extras" ,qtx11extras)))
1806 (home-page "https://drawpile.net")
1807 (synopsis "Collaborative drawing program")
1808 (description "Drawpile is a drawing program that allows share the canvas
1809 with other users in real time.
1811 Some feature highlights:
1813 @item Shared canvas using the built-in server or a dedicated server
1814 @item Record, play back and export drawing sessions
1815 @item Simple animation support
1816 @item Layers and blending modes
1818 @item Supports pressure sensitive Wacom tablets
1820 @item Supports OpenRaster file format
1821 @item Encrypted connections using SSL
1822 @item Automatic port forwarding with UPnP
1824 (license license:gpl3+))))