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>
26 ;;; This file is part of GNU Guix.
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.
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.
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/>.
41 (define-module (gnu packages graphics)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages algebra)
44 #:use-module (gnu packages audio)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages bash)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages cdrom)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages crypto)
54 #:use-module (gnu packages datastructures)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages flex)
57 #:use-module (gnu packages fonts)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages freedesktop)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages ghostscript)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages gnunet)
66 #:use-module (gnu packages graphviz)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages haskell-xyz)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages image-processing)
72 #:use-module (gnu packages imagemagick)
73 #:use-module (gnu packages jemalloc)
74 #:use-module (gnu packages kde-frameworks)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages lua)
77 #:use-module (gnu packages maths)
78 #:use-module (gnu packages mp3)
79 #:use-module (gnu packages multiprecision)
80 #:use-module (gnu packages pdf)
81 #:use-module (gnu packages perl)
82 #:use-module (gnu packages photo)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages plotutils)
85 #:use-module (gnu packages pth)
86 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
87 #:use-module (gnu packages python)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages qt)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages sdl)
92 #:use-module (gnu packages swig)
93 #:use-module (gnu packages tbb)
94 #:use-module (gnu packages upnp)
95 #:use-module (gnu packages video)
96 #:use-module (gnu packages xiph)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages xorg)
99 #:use-module (gnu packages xdisorg)
100 #:use-module (guix build-system copy)
101 #:use-module (guix build-system cmake)
102 #:use-module (guix build-system gnu)
103 #:use-module (guix build-system meson)
104 #:use-module (guix build-system python)
105 #:use-module (guix build-system qt)
106 #:use-module (guix download)
107 #:use-module (guix git-download)
108 #:use-module (guix hg-download)
109 #:use-module ((guix licenses) #:prefix license:)
110 #:use-module (guix packages)
111 #:use-module (guix utils))
113 (define-public eglexternalplatform
115 (name "eglexternalplatform")
122 (url "https://github.com/NVIDIA/eglexternalplatform.git")
125 (git-file-name name version))
127 (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
128 (build-system copy-build-system)
131 (modify-phases %standard-phases
132 (add-after 'unpack 'patch-pkgconfig
133 (lambda* (#:key outputs #:allow-other-keys)
134 (substitute* "eglexternalplatform.pc"
136 (assoc-ref outputs "out")))
138 (add-after 'install 'revise
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let* ((out (assoc-ref outputs "out")))
141 (mkdir-p (string-append out "/include/EGL"))
143 (string-append out "/interface")
144 (string-append out "/include/EGL"))
145 (mkdir-p (string-append out "/share/pkgconfig"))
147 (string-append out "/eglexternalplatform.pc")
148 (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
149 (for-each delete-file-recursively
151 (string-append out "/samples")
152 (string-append out "/COPYING")
153 (string-append out "/README.md"))))
155 (synopsis "EGL External Platform interface")
156 (description "EGLExternalPlatform is an specification of the EGL External
157 Platform interface for writing EGL platforms and their interactions with modern
158 window systems on top of existing low-level EGL platform implementations. This
159 keeps window system implementation specifics out of EGL drivers by using
160 application-facing EGL functions.")
161 (home-page "https://github.com/NVIDIA/eglexternalplatform")
162 (license license:expat)))
164 (define-public egl-wayland
173 (url "https://github.com/NVIDIA/egl-wayland.git")
176 (git-file-name name version))
178 (base32 "09r6a69z75j3hb9751g3ap4gm1xn71aw3j7z0c7jns292cnaa76n"))))
179 (build-system meson-build-system)
181 `(("pkg-config" ,pkg-config)))
184 ("wayland" ,wayland)))
186 `(("eglexternalplatform" ,eglexternalplatform)))
187 (synopsis "EGLStream-based Wayland external platform")
188 (description "EGL-Wayland is an implementation of a EGL External Platform
189 library to add client-side Wayland support to EGL on top of EGLDevice and
190 EGLStream families of extensions.")
191 (home-page "https://github.com/NVIDIA/egl-wayland")
192 (license license:expat)))
203 (url "https://github.com/hodefoting/mmm.git")
206 (git-file-name name version))
208 (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
209 (build-system meson-build-system)
212 ("pkg-config" ,pkg-config)))
217 (synopsis "Memory Mapped Machine")
218 (description "MMM is a shared memory protocol for virtualising access to
219 framebuffer graphics, audio output and input event.")
220 (home-page "https://github.com/hodefoting/mrg")
221 (license license:isc)))
223 (define-public directfb
232 (url "https://github.com/deniskropp/DirectFB.git")
233 (commit "DIRECTFB_1_7_7")))
234 (file-name (git-file-name name version))
236 (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
237 (build-system gnu-build-system)
240 (modify-phases %standard-phases
241 (add-after 'unpack 'disable-configure-during-bootstrap
243 (substitute* "autogen.sh"
244 (("^.*\\$srcdir/configure.*") ""))
247 `(("autoconf" ,autoconf)
248 ("automake" ,automake)
251 ("pkg-config" ,pkg-config)))
255 ("freetype" ,freetype)
257 ("gstreamer" ,gstreamer)
260 ("jpeg" ,libjpeg-turbo)
263 ("libtimidity" ,libtimidity)
264 ("linux-headers" ,linux-libre-headers)
276 ("vorbisfile" ,libvorbis)
280 ("xcomposite" ,libxcomposite)
282 ("xproto" ,xorgproto)
286 (synopsis "DFB Graphics Library")
287 (description "DirectFB is a graphics library which was designed with embedded
288 systems in mind. It offers maximum hardware accelerated performance at a
289 minimum of resource usage and overhead.")
290 (home-page "http://www.directfb.org/")
291 (license license:lgpl2.1+)))
302 (url "https://github.com/deniskropp/flux.git")
304 (file-name (git-file-name name version))
306 (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
307 (build-system gnu-build-system)
309 `(("autoconf" ,autoconf)
310 ("automake" ,automake)
312 ("pkg-config" ,pkg-config)))
313 (synopsis "Interface description language")
314 (description "Flux is an interface description language used by DirectFB.
315 Fluxcomp compiles .flux files to .cpp or .c files.")
316 (home-page "http://www.directfb.org/")
317 (license license:lgpl2.1+))) ; Same as DirectFB
327 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
329 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
330 (build-system gnu-build-system)
333 (modify-phases %standard-phases
334 (add-after 'unpack 'patch
336 (substitute* "configure"
337 (("-I/usr/include/freetype2")
340 (assoc-ref %build-inputs "freetype")
341 "/include/freetype2"))))
344 `(("doxygen" ,doxygen)))
347 ("freetype" ,freetype)
350 ("jpeg" ,libjpeg-turbo)
354 ("xcursor" ,libxcursor)
356 ("xfixes" ,libxfixes)
359 ("xrandr" ,libxrandr)
360 ("xrender" ,libxrender)
361 ("xshm" ,libxshmfence)
363 (synopsis "Widget Toolkit for building GUI")
364 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
365 Graphical User Interfaces easily and effectively. It offers a wide, and
366 growing, collection of Controls, and provides state of the art facilities such
367 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
368 manipulation. FOX also implements icons, images, and user-convenience features
369 such as status line help, and tooltips. Tooltips may even be used for 3D
371 (home-page "http://www.fox-toolkit.org")
372 (license license:lgpl2.1+)))
374 (define-public autotrace
375 (let ((commit "travis-20190624.59")
376 (version-base "0.40.0"))
379 (version (string-append version-base "-"
380 (if (string-prefix? "travis-" commit)
381 (string-drop commit 7)
386 (url "https://github.com/autotrace/autotrace")
388 (file-name (git-file-name name version))
391 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
392 (build-system gnu-build-system)
394 `(#:phases (modify-phases %standard-phases
395 ;; See: https://github.com/autotrace/autotrace/issues/27.
396 (add-after 'unpack 'include-spline.h-header
398 (substitute* "Makefile.am"
399 ((".*src/types.h.*" all)
400 (string-append all "\t\tsrc/spline.h \\\n")))
402 ;; See: https://github.com/autotrace/autotrace/issues/26.
405 (invoke "sh" "tests/runtests.sh"))))))
408 ("pkg-config" ,pkg-config)
409 ("autoconf" ,autoconf)
410 ("automake" ,automake)
411 ("intltool" ,intltool)
413 ("gettext" ,gettext-minimal)))
416 ("libjpeg" ,libjpeg-turbo)
418 ("imagemagick" ,imagemagick)
419 ("pstoedit" ,pstoedit)))
420 (home-page "https://github.com/autotrace/autotrace")
421 (synopsis "Bitmap to vector graphics converter")
422 (description "AutoTrace is a utility for converting bitmap into vector
423 graphics. It can trace outlines and midlines, effect color reduction or
424 despeckling and has support for many input and output formats. It can be used
425 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
426 (license (list license:gpl2+ ;for the utility itself
427 license:lgpl2.1+))))) ;for use as a library
429 (define-public blender
435 (uri (string-append "https://download.blender.org/source/"
436 "blender-" version ".tar.xz"))
439 "0xyawly00a59hfdb6b7va84k5fhcv2mxnzd77vs22bzi9y7sap43"))))
440 (build-system cmake-build-system)
442 (let ((python-version (version-major+minor (package-version python))))
443 `(;; Test files are very large and not included in the release tarball.
446 (list "-DWITH_CODEC_FFMPEG=ON"
447 "-DWITH_CODEC_SNDFILE=ON"
449 "-DWITH_DOC_MANPAGE=ON"
451 "-DWITH_IMAGE_OPENJPEG=ON"
452 "-DWITH_INPUT_NDOF=ON"
453 "-DWITH_INSTALL_PORTABLE=OFF"
455 "-DWITH_MOD_OCEANSIM=ON"
456 "-DWITH_OPENSUBDIV=ON"
457 "-DWITH_PYTHON_INSTALL=OFF"
458 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
459 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
461 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
462 "/include/python" ,python-version)
463 (string-append "-DPYTHON_VERSION=" ,python-version)
464 (string-append "-DPYTHON_NUMPY_PATH="
465 (assoc-ref %build-inputs "python-numpy")
466 "/lib/python" ,python-version "/site-packages/"))
468 (modify-phases %standard-phases
469 ;; XXX This file doesn't exist in the Git sources but will probably
470 ;; exist in the eventual 2.80 source tarball.
471 (add-after 'unpack 'fix-broken-import
473 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
474 (("import encode_bin") "from . import encode_bin"))
476 (add-after 'set-paths 'add-ilmbase-include-path
477 (lambda* (#:key inputs #:allow-other-keys)
478 ;; OpenEXR propagates ilmbase, but its include files do not appear
479 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
480 ;; the CPATH to satisfy the dependency on "half.h".
482 (string-append (assoc-ref inputs "ilmbase")
484 ":" (or (getenv "CPATH") "")))
488 ("jemalloc" ,jemalloc)
491 ("libxrender" ,libxrender)
492 ("opencolorio" ,opencolorio)
493 ("openimageio" ,openimageio)
495 ("opensubdiv" ,opensubdiv)
497 ("openjpeg" ,openjpeg)
498 ("libjpeg" ,libjpeg-turbo)
504 ("libsndfile" ,libsndfile)
505 ("freetype" ,freetype)
509 ("python-numpy" ,python-numpy)
512 (home-page "https://blender.org/")
513 (synopsis "3D graphics creation suite")
515 "Blender is a 3D graphics creation suite. It supports the entirety of
516 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
517 compositing and motion tracking, even video editing and game creation. The
518 application can be customized via its API for Python scripting.")
519 (license license:gpl2+)))
521 (define-public blender-2.79
527 (uri (string-append "https://download.blender.org/source/"
528 "blender-" version ".tar.gz"))
531 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
532 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
533 "blender-2.79-oiio2.patch"
534 ;; The following patches may be
535 ;; needed when the default GCC is
537 ;; "blender-2.79-gcc8.patch"
538 ;; "blender-2.79-gcc9.patch"
539 "blender-2.79-python-3.7-fix.patch"
540 "blender-2.79-python-3.8-fix.patch"))))
541 (build-system cmake-build-system)
543 (let ((python-version (version-major+minor (package-version python))))
544 `(;; Test files are very large and not included in the release tarball.
547 (list "-DWITH_CODEC_FFMPEG=ON"
548 "-DWITH_CODEC_SNDFILE=ON"
550 "-DWITH_DOC_MANPAGE=ON"
552 "-DWITH_GAMEENGINE=ON"
553 "-DWITH_IMAGE_OPENJPEG=ON"
554 "-DWITH_INPUT_NDOF=ON"
555 "-DWITH_INSTALL_PORTABLE=OFF"
557 "-DWITH_MOD_OCEANSIM=ON"
559 "-DWITH_PYTHON_INSTALL=OFF"
560 "-DWITH_PYTHON_INSTALL=OFF"
561 "-DWITH_SYSTEM_OPENJPEG=ON"
562 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
563 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
565 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
566 "/include/python" ,python-version)
567 (string-append "-DPYTHON_VERSION=" ,python-version))
569 (modify-phases %standard-phases
570 (add-after 'unpack 'fix-broken-import
572 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
573 (("import encode_bin") "from . import encode_bin"))
575 (add-after 'set-paths 'add-ilmbase-include-path
576 (lambda* (#:key inputs #:allow-other-keys)
577 ;; OpenEXR propagates ilmbase, but its include files do not appear
578 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
579 ;; the CPATH to satisfy the dependency on "half.h".
581 (string-append (assoc-ref inputs "ilmbase")
583 ":" (or (getenv "CPATH") "")))
587 ("jemalloc" ,jemalloc)
589 ("openimageio" ,openimageio)
592 ("openjpeg" ,openjpeg)
593 ("libjpeg" ,libjpeg-turbo)
599 ("libsndfile" ,libsndfile)
600 ("freetype" ,freetype)
605 (home-page "https://blender.org/")
606 (synopsis "3D graphics creation suite")
608 "Blender is a 3D graphics creation suite. It supports the entirety of
609 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
610 compositing and motion tracking, even video editing and game creation. The
611 application can be customized via its API for Python scripting.
613 NOTE: This older version of Blender is the last release that does not require
614 OpenGL 3. It is retained for use with older computers.")
615 (license license:gpl2+)))
617 (define-public assimp
624 (url "https://github.com/assimp/assimp")
625 (commit (string-append "v" version))))
626 (file-name (git-file-name name version))
629 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
630 (build-system cmake-build-system)
633 (home-page "http://www.assimp.org/")
634 (synopsis "Asset import library")
636 "The Open Asset Import Library loads more than 40 3D file formats into
637 one unified data structure. Additionally, assimp features various mesh post
638 processing tools: normals and tangent space generation, triangulation, vertex
639 cache locality optimization, removal of degenerate primitives and duplicate
640 vertices, sorting by primitive type, merging of redundant materials and many
642 (license license:bsd-3)))
651 "https://github.com/CGAL/cgal/releases/download/releases/"
652 "CGAL-" version "/CGAL-" version ".tar.xz"))
655 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
656 (build-system cmake-build-system)
658 '(#:tests? #f)) ; no test target
663 (home-page "https://www.cgal.org/")
664 (synopsis "Computational geometry algorithms library")
666 "CGAL provides easy access to efficient and reliable geometric algorithms
667 in the form of a C++ library. CGAL is used in various areas needing geometric
668 computation, such as: computer graphics, scientific visualization, computer
669 aided design and modeling, geographic information systems, molecular biology,
670 medical imaging, robotics and motion planning, mesh generation, numerical
671 methods, etc. It provides data structures and algorithms such as
672 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
675 ;; The 'LICENSE' file explains that a subset is available under more
676 ;; permissive licenses.
677 (license license:gpl3+)))
679 (define-public ilmbase
686 (url "https://github.com/openexr/openexr")
687 (commit (string-append "v" version))))
688 (file-name (git-file-name "ilmbase" version))
691 "1vf8bqld2bpcdi99jbr043y6vp01cp3fvbiasrn66xn91mf6imbn"))
692 (patches (search-patches "ilmbase-fix-tests.patch"))))
693 (build-system cmake-build-system)
695 `(#:phases (modify-phases %standard-phases
696 (add-after 'unpack 'change-directory
700 (home-page "https://www.openexr.com/")
701 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
703 "IlmBase provides several utility libraries for C++. Half is a class
704 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
705 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
706 quaternions and other useful 2D and 3D math functions. Iex is an
707 exception-handling library.")
708 (license license:bsd-3)))
710 (define-public lib2geom
711 ;; Use the latest master commit, as the 1.0 release suffer build problems.
713 (commit "17e0d21f0afc8489656f9184bff7ad024a42394a"))
716 (version (git-version "1.0" revision commit))
720 (url "https://gitlab.com/inkscape/lib2geom.git")
722 (file-name (git-file-name name version))
725 "0waskrmdrrdjw8pr5cvlkrxywgf376viggpc2jzdqxxpy2k78fpr"))
727 ;; Patch submitted to upstream (see:
728 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
729 (search-patches "lib2geom-fix-tests.patch"))
730 (modules '((guix build utils)))
733 ;; Fix py2geom module initialization (see:
734 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
735 (substitute* "src/py2geom/__init__.py"
736 (("_py2geom") "py2geom._py2geom"))
738 (build-system cmake-build-system)
740 `(#:imported-modules ((guix build python-build-system)
741 ,@%cmake-build-system-modules)
742 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
743 "-D2GEOM_BOOST_PYTHON=ON"
744 ;; Compiling the Cython bindings fail (see:
745 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
746 "-D2GEOM_CYTHON_BINDINGS=OFF")
748 (modify-phases %standard-phases
749 (add-after 'unpack 'patch-python-lib-install-path
750 (lambda* (#:key inputs outputs #:allow-other-keys)
751 (let* ((python-version (@ (guix build python-build-system)
753 (python-maj-min-version (python-version
754 (assoc-ref inputs "python")))
755 (site-package (string-append
756 (assoc-ref outputs "out")
757 "/lib/python" python-maj-min-version
759 (substitute* '("src/cython/CMakeLists.txt"
760 "src/py2geom/CMakeLists.txt")
761 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
762 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
764 (native-inputs `(("python" ,python-wrapper)
765 ("googletest" ,googletest)
766 ("pkg-config" ,pkg-config)))
767 (inputs `(("cairo" ,cairo)
768 ("pycairo" ,python-pycairo)
769 ("double-conversion" ,double-conversion)
773 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
774 (home-page "https://gitlab.com/inkscape/lib2geom/")
775 (synopsis "C++ 2D graphics library")
776 (description "2geom is a C++ library of mathematics for paths, curves,
777 and other geometric calculations. Designed for vector graphics, it tackles
778 Bézier curves, conic sections, paths, intersections, transformations, and
780 ;; Because the library is linked with the GNU Scientific Library
781 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
782 ;; https://gitlab.com/inkscape/inkscape/issues/784).
783 (license license:gpl3+))))
785 (define-public pstoedit
791 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
792 version "/pstoedit-" version ".tar.gz"))
795 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
796 (build-system gnu-build-system)
798 `(("pkg-config" ,pkg-config)))
800 `(("ghostscript" ,ghostscript)
801 ("imagemagick" ,imagemagick)
802 ("libplot" ,plotutils)
803 ("libjpeg" ,libjpeg-turbo)
804 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
805 (home-page "http://www.pstoedit.net/")
806 (synopsis "Converter for PostScript and PDF graphics")
807 (description "The @code{pstoedit} utility allows translating graphics
808 in the PostScript or PDF (Portable Document Format) formats to various
809 other vector formats such as:
814 @item Flattened PostScript
815 @item DXF, a CAD (Computed-Aided Design) exchange format
816 @item PIC (for troff/groff)
817 @item MetaPost (for usage with TeX/LaTeX)
818 @item LaTeX2e picture
819 @item GNU Metafile (for use with plotutils/libplot)
820 @item Any format supported by ImageMagick
822 (license license:gpl2+)))
832 (url "https://github.com/OGRECave/ogre")
833 (commit (string-append "v" version))
834 (recursive? #t))) ;for Dear ImGui submodule
835 (file-name (git-file-name name version))
837 (base32 "1ap3krrl55hswv1n2r3ijf3xrb3kf9dnqvwyrc0fgnc7j7vd45sk"))))
838 (build-system cmake-build-system)
841 (modify-phases %standard-phases
842 (add-before 'configure 'pre-configure
843 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
844 ;; a consequence, we cannot suggest ours in configure flags. Fix
846 (lambda* (#:key inputs outputs #:allow-other-keys)
847 (substitute* "CMakeLists.txt"
848 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
851 (let* ((out (assoc-ref %outputs "out"))
853 (string-join (list (string-append out "/lib")
854 (string-append out "/lib/OGRE"))
856 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
857 "-DOGRE_BUILD_DEPENDENCIES=OFF"
858 "-DOGRE_BUILD_TESTS=TRUE"
859 "-DOGRE_INSTALL_DOCS=TRUE"
860 "-DOGRE_INSTALL_SAMPLES=TRUE"
861 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
865 ("googletest" ,googletest-1.8)
866 ("pkg-config" ,pkg-config)))
868 `(("font-dejavu" ,font-dejavu)
869 ("freeimage" ,freeimage)
870 ("freetype" ,freetype)
873 ("libxrandr" ,libxrandr)
877 ("zziplib" ,zziplib)))
878 (synopsis "Scene-oriented, flexible 3D engine written in C++")
880 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
881 flexible 3D engine written in C++ designed to make it easier and more intuitive
882 for developers to produce applications utilising hardware-accelerated 3D
884 (home-page "https://www.ogre3d.org/")
885 (license license:expat)))
887 (define-public openexr
890 (version (package-version ilmbase))
892 (inherit (package-source ilmbase))
893 (file-name (git-file-name "openexr" version))
894 (modules '((guix build utils)))
897 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
901 (build-system cmake-build-system)
904 (modify-phases %standard-phases
905 (add-after 'unpack 'change-directory
909 (add-after 'change-directory 'increase-test-timeout
911 ;; On armhf-linux, we need to override the CTest default
912 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
913 (substitute* "IlmImfTest/CMakeLists.txt"
914 (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
917 "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
919 ,@(if (not (target-64bit?))
920 `((add-after 'change-directory 'disable-broken-test
921 ;; This test fails on i686. Upstream developers suggest that
922 ;; this test is broken on i686 and can be safely disabled:
923 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
925 (substitute* "IlmImfTest/main.cpp"
926 ((".*testOptimizedInterleavePatterns.*") ""))
930 `(("pkg-config" ,pkg-config)))
932 `(("ilmbase" ,ilmbase) ;used in public headers
933 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
934 (home-page "https://www.openexr.com/")
935 (synopsis "High-dynamic range file format library")
937 "OpenEXR is a high dynamic-range (HDR) image file format developed for
938 use in computer imaging applications. The IlmImf C++ libraries support
939 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
940 (license license:bsd-3)))
942 (define-public openimageio
949 (url "https://github.com/OpenImageIO/oiio")
950 (commit (string-append "Release-" version))))
951 (file-name (git-file-name name version))
954 "0czcls82v71wkw1syib16ncg7463hx0py0xclycsiv4w6i3wlkzz"))))
955 (build-system cmake-build-system)
956 ;; FIXME: To run all tests successfully, test image sets from multiple
957 ;; third party sources have to be present. For details see
958 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
962 `(("pkg-config" ,pkg-config)))
966 ("libjpeg" ,libjpeg-turbo)
971 ("python" ,python-wrapper)
972 ("pybind11" ,pybind11)
973 ("robin-map" ,robin-map)
975 (synopsis "C++ library for reading and writing images")
977 "OpenImageIO is a library for reading and writing images, and a bunch of
978 related classes, utilities, and applications. There is a particular emphasis
979 on formats and functionality used in professional, large-scale animation and
980 visual effects work for film.")
981 (home-page "https://www.openimageio.org")
982 (license license:bsd-3)))
984 (define-public openscenegraph
986 (name "openscenegraph")
992 (url "https://github.com/openscenegraph/OpenSceneGraph")
993 (commit (string-append "OpenSceneGraph-" version))))
995 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
996 (file-name (git-file-name name version))))
998 `((upstream-name . "OpenSceneGraph")))
999 (build-system cmake-build-system)
1001 `(#:tests? #f ; no test target available
1002 ;; Without this flag, 'rd' will be added to the name of the
1003 ;; library binaries and break linking with other programs.
1004 #:build-type "Release"
1006 (list (string-append "-DCMAKE_INSTALL_RPATH="
1007 (assoc-ref %outputs "out") "/lib:"
1008 (assoc-ref %outputs "out") "/lib64"))))
1010 `(("pkg-config" ,pkg-config)
1013 `(("giflib" ,giflib)
1014 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
1016 ("librsvg" ,librsvg)
1017 ("libxrandr" ,libxrandr)
1020 (synopsis "High-performance real-time graphics toolkit")
1022 "The OpenSceneGraph is a high-performance 3D graphics toolkit
1023 used by application developers in fields such as visual simulation, games,
1024 virtual reality, scientific visualization and modeling.")
1025 (home-page "http://www.openscenegraph.org")
1026 ;; The 'LICENSE' file explains that the source is licensed under
1027 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
1028 (license license:lgpl2.1)))
1030 ;; We need this for simgear
1031 (define-public openscenegraph-3.4
1032 (package (inherit openscenegraph)
1033 (name "openscenegraph")
1039 (url "https://github.com/openscenegraph/OpenSceneGraph")
1040 (commit (string-append "OpenSceneGraph-" version))))
1041 (file-name (git-file-name name version))
1044 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
1046 (substitute-keyword-arguments (package-arguments openscenegraph)
1047 ((#:configure-flags flags)
1049 ;; The jpeg plugin requires conversion between integers and booleans
1050 "-DCMAKE_CXX_FLAGS=-fpermissive"
1053 `(("libjpeg" ,libjpeg-turbo)
1054 ,@(package-inputs openscenegraph)))))
1057 (define-public openmw-openscenegraph
1058 ;; OpenMW prefers its own fork of openscenegraph:
1059 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
1060 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
1063 (inherit openscenegraph)
1064 (version (git-version "3.6" "1" commit))
1069 (url "https://github.com/OpenMW/osg/")
1071 (file-name (git-file-name (package-name openscenegraph) version))
1074 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
1076 (substitute-keyword-arguments (package-arguments openscenegraph)
1077 ((#:configure-flags flags)
1078 ;; As per the above wiki link, the following plugins are enough:
1080 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
1081 "-DBUILD_OSG_PLUGIN_OSG=1"
1082 "-DBUILD_OSG_PLUGIN_DDS=1"
1083 "-DBUILD_OSG_PLUGIN_TGA=1"
1084 "-DBUILD_OSG_PLUGIN_BMP=1"
1085 "-DBUILD_OSG_PLUGIN_JPEG=1"
1086 "-DBUILD_OSG_PLUGIN_PNG=1"
1087 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
1088 ;; The jpeg plugin requires conversion between integers and booleans
1089 "-DCMAKE_CXX_FLAGS=-fpermissive")
1092 (define-public povray
1099 (url "https://github.com/POV-Ray/povray")
1100 (commit (string-append "v" version))))
1101 (file-name (git-file-name name version))
1104 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
1105 (modules '((guix build utils)))
1108 ;; Delete bundled libraries.
1109 (delete-file-recursively "libraries")
1111 (build-system gnu-build-system)
1113 `(("autoconf" ,autoconf)
1114 ("automake" ,automake)
1115 ("pkg-config" ,pkg-config)))
1118 ("libjpeg" ,libjpeg-turbo)
1120 ("libtiff" ,libtiff)
1121 ("openexr" ,openexr)
1126 (list "COMPILED_BY=Guix"
1127 (string-append "--with-boost-libdir="
1128 (assoc-ref %build-inputs "boost") "/lib")
1129 "--disable-optimiz-arch")
1131 (modify-phases %standard-phases
1132 (add-after 'unpack 'run-prebuild
1134 (setenv "HOME" (getcwd))
1135 (with-directory-excursion "unix"
1136 (substitute* "prebuild.sh"
1137 (("/bin/sh") (which "sh")))
1138 (invoke "sh" "prebuild.sh"))
1140 ;; The bootstrap script is run by the prebuild script in the
1141 ;; "run-prebuild" phase.
1142 (delete 'bootstrap))))
1143 (synopsis "Tool for creating three-dimensional graphics")
1145 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
1146 for producing high-quality computer graphics. @code{POV-Ray} creates
1147 three-dimensional, photo-realistic images using a rendering technique called
1148 ray-tracing. It reads in a text file containing information describing the
1149 objects and lighting in a scene and generates an image of that scene from the
1150 view point of a camera also described in the text file. Ray-tracing is not a
1151 fast process by any means, but it produces very high quality images with
1152 realistic reflections, shading, perspective and other effects.")
1153 (home-page "http://www.povray.org/")
1154 (license license:agpl3+)))
1156 (define-public rapicorn
1162 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
1163 "rapicorn-" version ".tar.xz"))
1166 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
1167 (patches (search-patches "rapicorn-isnan.patch"))))
1168 (build-system gnu-build-system)
1171 (modify-phases %standard-phases
1172 (add-after 'unpack 'fix-tests
1174 ;; Our grep does not support perl regular expressions.
1175 (substitute* "taptool.sh"
1176 (("grep -P") "grep -E"))
1177 ;; Disable path tests because we cannot access /bin or /sbin.
1178 (substitute* "rcore/tests/multitest.cc"
1179 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
1181 (add-before 'check 'pre-check
1183 ;; The test suite requires a running X server (with DISPLAY
1184 ;; number 99 or higher).
1185 (system "Xvfb :99 &")
1186 (setenv "DISPLAY" ":99")
1188 (add-after 'unpack 'replace-fhs-paths
1190 (substitute* (cons "Makefile.decl"
1191 (find-files "." "^Makefile\\.in$"))
1192 (("/bin/ls") (which "ls"))
1193 (("/usr/bin/env") (which "env")))
1195 ;; These libraries are listed in the "Required" section of the pkg-config
1198 `(("librsvg" ,librsvg)
1201 ("libxml2" ,libxml2)
1202 ("python2-enum34" ,python2-enum34)))
1204 `(("gdk-pixbuf" ,gdk-pixbuf)
1205 ("libpng" ,libpng-1.2)
1206 ("readline" ,readline)
1207 ("libcroco" ,libcroco)
1208 ("python" ,python-2)
1209 ("cython" ,python2-cython)))
1211 `(("pandoc" ,ghc-pandoc)
1214 ("doxygen" ,doxygen)
1215 ("graphviz" ,graphviz)
1216 ("intltool" ,intltool)
1217 ("pkg-config" ,pkg-config)
1218 ("xvfb" ,xorg-server-for-tests)))
1219 (home-page "https://rapicorn.testbit.org/")
1220 (synopsis "Toolkit for rapid development of user interfaces")
1222 "Rapicorn is a toolkit for rapid development of user interfaces in C++
1223 and Python. The user interface is designed in a declarative markup language
1224 and is connected to the programming logic using data bindings and commands.")
1225 (license license:mpl2.0)))
1233 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
1237 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
1238 (build-system cmake-build-system)
1239 (arguments '(#:tests? #f)) ;no 'test' target
1241 ;; Headers include OpenEXR and IlmBase headers.
1242 (propagated-inputs `(("openexr" ,openexr)))
1244 (home-page "http://ampasctl.sourceforge.net")
1245 (synopsis "Color Transformation Language")
1247 "The Color Transformation Language, or CTL, is a small programming
1248 language that was designed to serve as a building block for digital color
1249 management systems. CTL allows users to describe color transforms in a
1250 concise and unambiguous way by expressing them as programs. In order to apply
1251 a given transform to an image, the color management system instructs a CTL
1252 interpreter to load and run the CTL program that describes the transform. The
1253 original and the transformed image constitute the CTL program's input and
1256 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
1257 ;; and headers use different wording.
1258 (license (license:non-copyleft "file://LICENSE"))))
1260 (define-public brdf-explorer
1261 ;; There are no release tarballs, and not even tags in the repo,
1262 ;; so use the latest revision.
1263 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
1266 (name "brdf-explorer")
1267 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
1271 (url "https://github.com/wdas/brdf")
1275 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
1276 (file-name (string-append name "-" version "-checkout"))))
1277 (build-system gnu-build-system)
1279 `(#:phases (modify-phases %standard-phases
1281 (lambda* (#:key outputs #:allow-other-keys)
1282 (let ((out (assoc-ref outputs "out")))
1284 (string-append "prefix=" out)))))
1285 (add-after 'install 'wrap-program
1286 (lambda* (#:key outputs #:allow-other-keys)
1287 (let* ((out (assoc-ref outputs "out"))
1288 (bin (string-append out "/bin"))
1289 (data (string-append
1290 out "/share/brdf")))
1291 (with-directory-excursion bin
1292 (rename-file "brdf" ".brdf-real")
1293 (call-with-output-file "brdf"
1295 (format port "#!/bin/sh
1296 # Run the thing from its home, otherwise it just bails out.
1298 exec -a \"$0\" ~a/.brdf-real~%"
1300 (chmod "brdf" #o555)))
1303 `(("qttools" ,qttools))) ;for 'qmake'
1305 `(("qtbase" ,qtbase)
1308 ("freeglut" ,freeglut)
1310 (home-page "https://www.disneyanimation.com/technology/brdf.html")
1312 "Analyze bidirectional reflectance distribution functions (BRDFs)")
1314 "BRDF Explorer is an application that allows the development and analysis
1315 of bidirectional reflectance distribution functions (BRDFs). It can load and
1316 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
1317 language), measured material data from the MERL database, and anisotropic
1318 measured material data from MIT CSAIL. Graphs and visualizations update in
1319 real time as parameters are changed, making it a useful tool for evaluating
1320 and understanding different BRDFs (and other component functions).")
1321 (license license:ms-pl))))
1329 (uri (list (string-append
1330 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1333 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1336 ;; Site was discontinued.
1337 (string-append "http://www.antigrain.com/agg-"
1338 version ".tar.gz")))
1340 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1341 (patches (search-patches "agg-am_c_prototype.patch"))))
1342 (build-system gnu-build-system)
1345 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1347 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1349 "--disable-examples")
1351 (modify-phases %standard-phases
1354 ;; let's call configure from configure phase and not now
1355 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1356 (invoke "sh" "autogen.sh"))))))
1358 `(("pkg-config" ,pkg-config)
1359 ("libtool" ,libtool)
1360 ("autoconf" ,autoconf)
1361 ("automake" ,automake)))
1363 `(("libx11" ,libx11)
1364 ("freetype" ,freetype)
1367 ;; Antigrain.com was discontinued.
1368 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1369 (synopsis "High-quality 2D graphics rendering engine for C++")
1371 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1372 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1373 rendering SVG graphics.")
1374 (license license:gpl2+)))
1376 (define-public python-pastel
1378 (name "python-pastel")
1383 (uri (pypi-uri "pastel" version))
1386 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1387 (build-system python-build-system)
1389 `(#:phases (modify-phases %standard-phases
1391 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1393 `(("python-pytest" ,python-pytest)))
1394 (home-page "https://github.com/sdispater/pastel")
1395 (synopsis "Library to colorize strings in your terminal")
1396 (description "Pastel is a simple library to help you colorize strings in
1398 (license license:expat)))
1400 (define-public python2-pastel
1401 (package-with-python2 python-pastel))
1403 (define-public fgallery
1411 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1412 "fgallery-" version ".zip"))
1415 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1416 (build-system gnu-build-system)
1418 `(#:tests? #f ; no tests
1420 (modify-phases %standard-phases
1424 (lambda* (#:key inputs outputs #:allow-other-keys)
1425 (let* ((out (assoc-ref outputs "out"))
1426 (bin (string-append out "/bin/"))
1427 (share (string-append out "/share/fgallery"))
1428 (man (string-append out "/share/man/man1"))
1429 (perl5lib (getenv "PERL5LIB"))
1430 (script (string-append share "/fgallery")))
1431 (define (bin-directory input-name)
1432 (string-append (assoc-ref inputs input-name) "/bin"))
1435 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1438 (copy-recursively "." share)
1440 ;; fgallery copies files from store when it is run. The
1441 ;; read-only permissions from the store directories will cause
1442 ;; fgallery to fail. Do not preserve file attributes when
1443 ;; copying files to prevent it.
1446 "'cp', '--no-preserve=all'"))
1449 (symlink script (string-append out "/bin/fgallery"))
1451 (wrap-program script
1453 ,(map bin-directory '("imagemagick"
1461 `("PERL5LIB" ":" prefix (,perl5lib)))
1464 `(("unzip" ,unzip)))
1465 ;; TODO: Add missing optional dependency: facedetect.
1467 `(("imagemagick" ,imagemagick)
1470 ("libjpeg" ,libjpeg-turbo)
1473 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1474 ("perl-image-exiftool" ,perl-image-exiftool)
1475 ("jpegoptim" ,jpegoptim)
1476 ("pngcrush" ,pngcrush)
1478 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1479 (synopsis "Static photo gallery generator")
1481 "FGallery is a static, JavaScript photo gallery generator with minimalist
1482 look. The result can be uploaded on any web server without additional
1484 (license license:gpl2+)))
1486 (define-public opensubdiv
1493 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1494 (commit (string-append "v" (string-join (string-split version #\.)
1496 (file-name (git-file-name name version))
1499 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1500 (build-system cmake-build-system)
1502 `(#:phases (modify-phases %standard-phases
1503 (add-before 'configure 'set-glew-location
1504 (lambda* (#:key inputs #:allow-other-keys)
1505 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1507 (add-before 'check 'start-xorg-server
1508 (lambda* (#:key inputs #:allow-other-keys)
1509 ;; The test suite requires a running X server.
1510 (system (string-append (assoc-ref inputs "xorg-server")
1512 (setenv "DISPLAY" ":1")
1515 `(("xorg-server" ,xorg-server-for-tests)))
1518 ("libxrandr" ,libxrandr)
1519 ("libxcursor" ,libxcursor)
1520 ("libxinerama" ,libxinerama)
1524 (home-page "https://graphics.pixar.com/opensubdiv/")
1525 (synopsis "High performance subdivision surface evaluation")
1526 (description "OpenSubdiv is a set of libraries that implement high
1527 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1528 and GPU architectures.")
1529 (license license:asl2.0)))
1531 (define-public opencsg
1532 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1540 (url "https://github.com/floriankirsch/OpenCSG")
1541 (commit (string-append "opencsg-"
1542 (string-map dot-to-dash version)
1544 (file-name (git-file-name name version))
1547 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1548 (build-system gnu-build-system)
1551 (modify-phases %standard-phases
1553 (lambda* (#:key outputs #:allow-other-keys)
1554 (substitute* "src/Makefile"
1555 (("/usr/local") (assoc-ref outputs "out")))
1557 (add-before 'build 'skip-example
1558 (lambda _ (chdir "src") #t)))))
1561 ("freeglut" ,freeglut)))
1562 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1564 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1565 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1566 For example, two shapes can be combined by uniting them, by intersecting them,
1567 or by subtracting one shape from the other.")
1568 (home-page "http://www.opencsg.org/")
1569 (license license:gpl2))))
1571 (define-public coin3D
1572 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1573 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1575 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1579 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1584 (url "https://bitbucket.org/Coin3D/coin")
1585 (changeset changeset)))
1586 (file-name (git-file-name name version))
1588 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1589 (modules '((guix build utils)))
1592 (for-each delete-file
1594 "cfg/wrapmsvc.exe"))
1596 (build-system cmake-build-system)
1598 `(("doxygen" ,doxygen)
1599 ("graphviz" ,graphviz)))
1602 ("freeglut" ,freeglut)
1607 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1608 (string-append "-DBOOST_ROOT="
1609 (assoc-ref %build-inputs "boost")))))
1610 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1612 "High-level 3D visualization library with Open Inventor 2.1 API")
1614 "Coin is a 3D graphics library with an Application Programming Interface
1615 based on the Open Inventor 2.1 API. For those who are not familiar with
1616 Open Inventor, it is a scene-graph based retain-mode rendering and model
1617 interaction library, written in C++, which has become the de facto
1618 standard graphics library for 3D visualization and visual simulation
1619 software in the scientific and engineering community.")
1620 (license license:bsd-3))))
1622 (define-public superfamiconv
1624 (name "superfamiconv")
1630 (url "https://github.com/Optiroc/SuperFamiconv")
1631 (commit (string-append "v" version))))
1632 (file-name (git-file-name name version))
1635 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1636 (build-system gnu-build-system)
1638 `(#:tests? #f ; no tests
1640 (modify-phases %standard-phases
1643 (lambda* (#:key outputs #:allow-other-keys)
1644 (let* ((outdir (assoc-ref outputs "out"))
1645 (bindir (string-append outdir "/bin")))
1646 (install-file "bin/superfamiconv" bindir)
1648 (home-page "https://github.com/Optiroc/SuperFamiconv")
1649 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1650 and PC Engine formats")
1651 (description "SuperFamiconv is a converter for tiled graphics, supporting
1652 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1653 Automated palette selection is supported.")
1654 (license license:expat)))
1656 (define-public drawpile
1657 ;; This commit fix building with libmicrohttpd>=0.71.
1658 (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
1662 (version (string-append "2.1.17-" revision "." (string-take commit 9)))
1666 (url "https://github.com/drawpile/Drawpile")
1668 (file-name (git-file-name name version))
1671 "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
1672 (build-system qt-build-system)
1675 (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
1677 `(("extra-cmake-modules" ,extra-cmake-modules)
1678 ("pkg-config" ,pkg-config)))
1680 `(("giflib" ,giflib)
1681 ("karchive" ,karchive)
1683 ("libmicrohttpd" ,libmicrohttpd)
1684 ("libsodium" ,libsodium)
1687 ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
1689 ("qtkeychain" ,qtkeychain)
1690 ("qtmultimedia" ,qtmultimedia)
1692 ("qtx11extras" ,qtx11extras)))
1693 (home-page "https://drawpile.net")
1694 (synopsis "Collaborative drawing program")
1695 (description "Drawpile is a drawing program that allows share the canvas
1696 with other users in real time.
1698 Some feature highlights:
1700 @item Shared canvas using the built-in server or a dedicated server
1701 @item Record, play back and export drawing sessions
1702 @item Simple animation support
1703 @item Layers and blending modes
1705 @item Supports pressure sensitive Wacom tablets
1707 @item Supports OpenRaster file format
1708 @item Encrypted connections using SSL
1709 @item Automatic port forwarding with UPnP
1711 (license license:gpl3+))))