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 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 check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages flex)
54 #:use-module (gnu packages fonts)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages ghostscript)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages graphviz)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages haskell-xyz)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages imagemagick)
66 #:use-module (gnu packages jemalloc)
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages multiprecision)
69 #:use-module (gnu packages pdf)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages photo)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages plotutils)
74 #:use-module (gnu packages pth)
75 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages qt)
79 #:use-module (gnu packages readline)
80 #:use-module (gnu packages sdl)
81 #:use-module (gnu packages swig)
82 #:use-module (gnu packages tbb)
83 #:use-module (gnu packages video)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg)
86 #:use-module (guix build-system cmake)
87 #:use-module (guix build-system gnu)
88 #:use-module (guix build-system python)
89 #:use-module (guix download)
90 #:use-module (guix git-download)
91 #:use-module (guix hg-download)
92 #:use-module ((guix licenses) #:prefix license:)
93 #:use-module (guix packages)
94 #:use-module (guix utils))
104 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
106 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
107 (build-system gnu-build-system)
110 (modify-phases %standard-phases
111 (add-after 'unpack 'patch
113 (substitute* "configure"
114 (("-I/usr/include/freetype2")
117 (assoc-ref %build-inputs "freetype")
118 "/include/freetype2"))))
121 `(("doxygen" ,doxygen)))
124 ("freetype" ,freetype)
127 ("jpeg" ,libjpeg-turbo)
131 ("xcursor" ,libxcursor)
133 ("xfixes" ,libxfixes)
136 ("xrandr" ,libxrandr)
137 ("xrender" ,libxrender)
138 ("xshm" ,libxshmfence)
140 (synopsis "Widget Toolkit for building GUI")
141 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
142 Graphical User Interfaces easily and effectively. It offers a wide, and
143 growing, collection of Controls, and provides state of the art facilities such
144 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
145 manipulation. FOX also implements icons, images, and user-convenience features
146 such as status line help, and tooltips. Tooltips may even be used for 3D
148 (home-page "http://www.fox-toolkit.org")
149 (license license:lgpl2.1+)))
151 (define-public autotrace
152 (let ((commit "travis-20190624.59")
153 (version-base "0.40.0"))
156 (version (string-append version-base "-"
157 (if (string-prefix? "travis-" commit)
158 (string-drop commit 7)
163 (url "https://github.com/autotrace/autotrace.git")
165 (file-name (git-file-name name version))
168 "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
169 (build-system gnu-build-system)
171 `(#:phases (modify-phases %standard-phases
172 ;; See: https://github.com/autotrace/autotrace/issues/27.
173 (add-after 'unpack 'include-spline.h-header
175 (substitute* "Makefile.am"
176 ((".*src/types.h.*" all)
177 (string-append all "\t\tsrc/spline.h \\\n")))
179 ;; See: https://github.com/autotrace/autotrace/issues/26.
182 (invoke "sh" "tests/runtests.sh"))))))
185 ("pkg-config" ,pkg-config)
186 ("autoconf" ,autoconf)
187 ("automake" ,automake)
188 ("intltool" ,intltool)
190 ("gettext" ,gettext-minimal)))
193 ("libjpeg" ,libjpeg-turbo)
195 ("imagemagick" ,imagemagick)
196 ("pstoedit" ,pstoedit)))
197 (home-page "https://github.com/autotrace/autotrace")
198 (synopsis "Bitmap to vector graphics converter")
199 (description "AutoTrace is a utility for converting bitmap into vector
200 graphics. It can trace outlines and midlines, effect color reduction or
201 despeckling and has support for many input and output formats. It can be used
202 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
203 (license (list license:gpl2+ ;for the utility itself
204 license:lgpl2.1+))))) ;for use as a library
206 (define-public blender
212 (uri (string-append "https://download.blender.org/source/"
213 "blender-" version ".tar.xz"))
216 "07rzm4xaj94pjxy2vlqfhi1adsqpshfkrzrq8kljmcbnw22vrqhl"))))
217 (build-system cmake-build-system)
219 (let ((python-version (version-major+minor (package-version python))))
220 `(;; Test files are very large and not included in the release tarball.
223 (list "-DWITH_CODEC_FFMPEG=ON"
224 "-DWITH_CODEC_SNDFILE=ON"
226 "-DWITH_DOC_MANPAGE=ON"
228 "-DWITH_IMAGE_OPENJPEG=ON"
229 "-DWITH_INPUT_NDOF=ON"
230 "-DWITH_INSTALL_PORTABLE=OFF"
232 "-DWITH_MOD_OCEANSIM=ON"
233 "-DWITH_OPENSUBDIV=ON"
234 "-DWITH_PYTHON_INSTALL=OFF"
235 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
236 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
238 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
239 "/include/python" ,python-version)
240 (string-append "-DPYTHON_VERSION=" ,python-version)
241 (string-append "-DPYTHON_NUMPY_PATH="
242 (assoc-ref %build-inputs "python-numpy")
243 "/lib/python" ,python-version "/site-packages/"))
245 (modify-phases %standard-phases
246 ;; XXX This file doesn't exist in the Git sources but will probably
247 ;; exist in the eventual 2.80 source tarball.
248 (add-after 'unpack 'fix-broken-import
250 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
251 (("import encode_bin") "from . import encode_bin"))
253 (add-after 'set-paths 'add-ilmbase-include-path
254 (lambda* (#:key inputs #:allow-other-keys)
255 ;; OpenEXR propagates ilmbase, but its include files do not appear
256 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
257 ;; the CPATH to satisfy the dependency on "half.h".
259 (string-append (assoc-ref inputs "ilmbase")
261 ":" (or (getenv "CPATH") "")))
265 ("jemalloc" ,jemalloc)
268 ("libxrender" ,libxrender)
269 ("openimageio" ,openimageio)
271 ("opensubdiv" ,opensubdiv)
273 ("openjpeg" ,openjpeg)
274 ("libjpeg" ,libjpeg-turbo)
280 ("libsndfile" ,libsndfile)
281 ("freetype" ,freetype)
285 ("python-numpy" ,python-numpy)
288 (home-page "https://blender.org/")
289 (synopsis "3D graphics creation suite")
291 "Blender is a 3D graphics creation suite. It supports the entirety of
292 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
293 compositing and motion tracking, even video editing and game creation. The
294 application can be customized via its API for Python scripting.")
295 (license license:gpl2+)))
297 (define-public assimp
304 (url "https://github.com/assimp/assimp.git")
305 (commit (string-append "v" version))))
306 (file-name (git-file-name name version))
309 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
310 (build-system cmake-build-system)
313 (home-page "http://www.assimp.org/")
314 (synopsis "Asset import library")
316 "The Open Asset Import Library loads more than 40 3D file formats into
317 one unified data structure. Additionally, assimp features various mesh post
318 processing tools: normals and tangent space generation, triangulation, vertex
319 cache locality optimization, removal of degenerate primitives and duplicate
320 vertices, sorting by primitive type, merging of redundant materials and many
322 (license license:bsd-3)))
331 "https://github.com/CGAL/cgal/releases/download/releases/"
332 "CGAL-" version "/CGAL-" version ".tar.xz"))
335 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
336 (build-system cmake-build-system)
338 '(#:tests? #f)) ; no test target
343 (home-page "https://www.cgal.org/")
344 (synopsis "Computational geometry algorithms library")
346 "CGAL provides easy access to efficient and reliable geometric algorithms
347 in the form of a C++ library. CGAL is used in various areas needing geometric
348 computation, such as: computer graphics, scientific visualization, computer
349 aided design and modeling, geographic information systems, molecular biology,
350 medical imaging, robotics and motion planning, mesh generation, numerical
351 methods, etc. It provides data structures and algorithms such as
352 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
355 ;; The 'LICENSE' file explains that a subset is available under more
356 ;; permissive licenses.
357 (license license:gpl3+)))
359 (define-public ilmbase
366 (url "https://github.com/openexr/openexr")
367 (commit (string-append "v" version))))
368 (file-name (git-file-name "ilmbase" version))
371 "1k50cvi3sk6gf6w713lkk2gv5cvs74vkc7s7k4z6nmyhi4g89w4y"))
372 (patches (search-patches "ilmbase-fix-tests.patch"
373 "ilmbase-fix-test-arm.patch"))))
374 (build-system cmake-build-system)
376 `(#:phases (modify-phases %standard-phases
377 (add-after 'unpack 'change-directory
381 (home-page "https://www.openexr.com/")
382 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
384 "IlmBase provides several utility libraries for C++. Half is a class
385 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
386 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
387 quaternions and other useful 2D and 3D math functions. Iex is an
388 exception-handling library.")
389 (license license:bsd-3)))
391 (define-public lib2geom
392 ;; Use the latest master commit, as the 1.0 release suffer build problems.
394 (commit "42e119d94934a9514c61571cfb6b4af503ece082"))
397 (version (git-version "1.0" revision commit))
401 (url "https://gitlab.com/inkscape/lib2geom.git")
403 (file-name (git-file-name name version))
406 "195rs0kdbs8w62irha1nwy83bccz04wglmk578qrj1mky7fc4rjv"))
408 ;; Patch submitted to upstream (see:
409 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/17).
410 (search-patches "lib2geom-enable-assertions.patch"))
411 (modules '((guix build utils)))
414 ;; Fix py2geom module initialization (see:
415 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
416 (substitute* "src/py2geom/__init__.py"
417 (("_py2geom") "py2geom._py2geom"))
419 (build-system cmake-build-system)
421 `(#:imported-modules ((guix build python-build-system)
422 ,@%cmake-build-system-modules)
423 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
424 "-D2GEOM_BOOST_PYTHON=ON"
425 ;; Compiling the Cython bindings fail (see:
426 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
427 "-D2GEOM_CYTHON_BINDINGS=OFF")
429 (modify-phases %standard-phases
430 (add-after 'unpack 'patch-python-lib-install-path
431 (lambda* (#:key inputs outputs #:allow-other-keys)
432 (let* ((python-version (@ (guix build python-build-system)
434 (python-maj-min-version (python-version
435 (assoc-ref inputs "python")))
436 (site-package (string-append
437 (assoc-ref outputs "out")
438 "/lib/python" python-maj-min-version
440 (substitute* '("src/cython/CMakeLists.txt"
441 "src/py2geom/CMakeLists.txt")
442 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
443 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
445 (native-inputs `(("python" ,python-wrapper)
446 ("googletest" ,googletest)
447 ("pkg-config" ,pkg-config)))
448 (inputs `(("cairo" ,cairo)
449 ("pycairo" ,python-pycairo)
450 ("double-conversion" ,double-conversion)
454 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
455 (home-page "https://gitlab.com/inkscape/lib2geom/")
456 (synopsis "C++ 2D graphics library")
457 (description "2geom is a C++ library of mathematics for paths, curves,
458 and other geometric calculations. Designed for vector graphics, it tackles
459 Bézier curves, conic sections, paths, intersections, transformations, and
461 ;; Because the library is linked with the GNU Scientific Library
462 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
463 ;; https://gitlab.com/inkscape/inkscape/issues/784).
464 (license license:gpl3+))))
466 (define-public pstoedit
472 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
473 version "/pstoedit-" version ".tar.gz"))
476 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
477 (build-system gnu-build-system)
479 `(("pkg-config" ,pkg-config)))
481 `(("ghostscript" ,ghostscript)
482 ("imagemagick" ,imagemagick)
483 ("libplot" ,plotutils)
484 ("libjpeg" ,libjpeg-turbo)
485 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
486 (home-page "http://www.pstoedit.net/")
487 (synopsis "Converter for PostScript and PDF graphics")
488 (description "The @code{pstoedit} utility allows translating graphics
489 in the PostScript or PDF (Portable Document Format) formats to various
490 other vector formats such as:
495 @item Flattened PostScript
496 @item DXF, a CAD (Computed-Aided Design) exchange format
497 @item PIC (for troff/groff)
498 @item MetaPost (for usage with TeX/LaTeX)
499 @item LaTeX2e picture
500 @item GNU Metafile (for use with plotutils/libplot)
501 @item Any format supported by ImageMagick
503 (license license:gpl2+)))
513 (url "https://github.com/OGRECave/ogre.git")
514 (commit (string-append "v" version))
515 (recursive? #t))) ;for Dear ImGui submodule
516 (file-name (git-file-name name version))
518 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
519 (build-system cmake-build-system)
522 (modify-phases %standard-phases
523 (add-before 'configure 'pre-configure
524 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
525 ;; a consequence, we cannot suggest ours in configure flags. Fix
527 (lambda* (#:key inputs outputs #:allow-other-keys)
528 (substitute* "CMakeLists.txt"
529 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
532 (let* ((out (assoc-ref %outputs "out"))
534 (string-join (list (string-append out "/lib")
535 (string-append out "/lib/OGRE"))
537 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
538 "-DOGRE_BUILD_DEPENDENCIES=OFF"
539 "-DOGRE_BUILD_TESTS=TRUE"
540 "-DOGRE_INSTALL_DOCS=TRUE"
541 "-DOGRE_INSTALL_SAMPLES=TRUE"
542 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
546 ("googletest" ,googletest-1.8)
547 ("pkg-config" ,pkg-config)))
549 `(("font-dejavu" ,font-dejavu)
550 ("freeimage" ,freeimage)
551 ("freetype" ,freetype)
554 ("libxrandr" ,libxrandr)
558 ("zziplib" ,zziplib)))
559 (synopsis "Scene-oriented, flexible 3D engine written in C++")
561 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
562 flexible 3D engine written in C++ designed to make it easier and more intuitive
563 for developers to produce applications utilising hardware-accelerated 3D
565 (home-page "https://www.ogre3d.org/")
566 (license license:expat)))
568 (define-public openexr
571 (version (package-version ilmbase))
573 (inherit (package-source ilmbase))
574 (file-name (git-file-name "openexr" version))
575 (modules '((guix build utils)))
578 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
582 (build-system cmake-build-system)
585 (modify-phases %standard-phases
586 (add-after 'unpack 'change-directory
590 (add-before 'check 'increase-test-timeout
592 ;; On armhf-linux, we need to override the CTest default
593 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
594 (setenv "CTEST_TEST_TIMEOUT" "2000")
596 ,@(if (not (target-64bit?))
597 `((add-after 'change-directory 'disable-broken-test
598 ;; This test fails on i686. Upstream developers suggest that
599 ;; this test is broken on i686 and can be safely disabled:
600 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
602 (substitute* "IlmImfTest/main.cpp"
603 ((".*testOptimizedInterleavePatterns.*") ""))
607 `(("pkg-config" ,pkg-config)))
609 `(("ilmbase" ,ilmbase) ;used in public headers
610 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
611 (home-page "https://www.openexr.com/")
612 (synopsis "High-dynamic range file format library")
614 "OpenEXR is a high dynamic-range (HDR) image file format developed for
615 use in computer imaging applications. The IlmImf C++ libraries support
616 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
617 (license license:bsd-3)))
619 (define-public openimageio
626 (url "https://github.com/OpenImageIO/oiio.git")
627 (commit (string-append "Release-" version))))
628 (file-name (git-file-name name version))
631 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
632 (build-system cmake-build-system)
633 ;; FIXME: To run all tests successfully, test image sets from multiple
634 ;; third party sources have to be present. For details see
635 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
639 `(("pkg-config" ,pkg-config)))
643 ("libjpeg" ,libjpeg-turbo)
650 (synopsis "C++ library for reading and writing images")
652 "OpenImageIO is a library for reading and writing images, and a bunch of
653 related classes, utilities, and applications. There is a particular emphasis
654 on formats and functionality used in professional, large-scale animation and
655 visual effects work for film.")
656 (home-page "https://www.openimageio.org")
657 (license license:bsd-3)))
659 (define-public openscenegraph
661 (name "openscenegraph")
667 (url "https://github.com/openscenegraph/OpenSceneGraph")
668 (commit (string-append "OpenSceneGraph-" version))))
670 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
671 (file-name (git-file-name name version))))
673 `((upstream-name . "OpenSceneGraph")))
674 (build-system cmake-build-system)
676 `(#:tests? #f ; no test target available
677 ;; Without this flag, 'rd' will be added to the name of the
678 ;; library binaries and break linking with other programs.
679 #:build-type "Release"
681 (list (string-append "-DCMAKE_INSTALL_RPATH="
682 (assoc-ref %outputs "out") "/lib:"
683 (assoc-ref %outputs "out") "/lib64"))))
685 `(("pkg-config" ,pkg-config)
689 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
692 ("libxrandr" ,libxrandr)
695 (synopsis "High-performance real-time graphics toolkit")
697 "The OpenSceneGraph is a high-performance 3D graphics toolkit
698 used by application developers in fields such as visual simulation, games,
699 virtual reality, scientific visualization and modeling.")
700 (home-page "http://www.openscenegraph.org")
701 ;; The 'LICENSE' file explains that the source is licensed under
702 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
703 (license license:lgpl2.1)))
705 ;; We need this for simgear
706 (define-public openscenegraph-3.4
707 (package (inherit openscenegraph)
708 (name "openscenegraph")
714 (url "https://github.com/openscenegraph/OpenSceneGraph")
715 (commit (string-append "OpenSceneGraph-" version))))
716 (file-name (git-file-name name version))
719 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
721 (substitute-keyword-arguments (package-arguments openscenegraph)
722 ((#:configure-flags flags)
724 ;; The jpeg plugin requires conversion between integers and booleans
725 "-DCMAKE_CXX_FLAGS=-fpermissive"
728 `(("libjpeg" ,libjpeg-turbo)
729 ,@(package-inputs openscenegraph)))))
732 (define-public openmw-openscenegraph
733 ;; OpenMW prefers its own fork of openscenegraph:
734 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
735 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
738 (inherit openscenegraph)
739 (version (git-version "3.6" "1" commit))
744 (url "https://github.com/OpenMW/osg/")
746 (file-name (git-file-name (package-name openscenegraph) version))
749 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
751 (substitute-keyword-arguments (package-arguments openscenegraph)
752 ((#:configure-flags flags)
753 ;; As per the above wiki link, the following plugins are enough:
755 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
756 "-DBUILD_OSG_PLUGIN_OSG=1"
757 "-DBUILD_OSG_PLUGIN_DDS=1"
758 "-DBUILD_OSG_PLUGIN_TGA=1"
759 "-DBUILD_OSG_PLUGIN_BMP=1"
760 "-DBUILD_OSG_PLUGIN_JPEG=1"
761 "-DBUILD_OSG_PLUGIN_PNG=1"
762 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
763 ;; The jpeg plugin requires conversion between integers and booleans
764 "-DCMAKE_CXX_FLAGS=-fpermissive")
767 (define-public povray
774 (url "https://github.com/POV-Ray/povray")
775 (commit (string-append "v" version))))
776 (file-name (git-file-name name version))
779 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
780 (modules '((guix build utils)))
783 ;; Delete bundled libraries.
784 (delete-file-recursively "libraries")
786 (build-system gnu-build-system)
788 `(("autoconf" ,autoconf)
789 ("automake" ,automake)
790 ("pkg-config" ,pkg-config)))
793 ("libjpeg" ,libjpeg-turbo)
801 (list "COMPILED_BY=Guix"
802 (string-append "--with-boost-libdir="
803 (assoc-ref %build-inputs "boost") "/lib")
804 "--disable-optimiz-arch")
806 (modify-phases %standard-phases
807 (add-after 'unpack 'run-prebuild
809 (setenv "HOME" (getcwd))
810 (with-directory-excursion "unix"
811 (substitute* "prebuild.sh"
812 (("/bin/sh") (which "sh")))
813 (invoke "sh" "prebuild.sh"))
815 ;; The bootstrap script is run by the prebuild script in the
816 ;; "run-prebuild" phase.
817 (delete 'bootstrap))))
818 (synopsis "Tool for creating three-dimensional graphics")
820 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
821 for producing high-quality computer graphics. @code{POV-Ray} creates
822 three-dimensional, photo-realistic images using a rendering technique called
823 ray-tracing. It reads in a text file containing information describing the
824 objects and lighting in a scene and generates an image of that scene from the
825 view point of a camera also described in the text file. Ray-tracing is not a
826 fast process by any means, but it produces very high quality images with
827 realistic reflections, shading, perspective and other effects.")
828 (home-page "http://www.povray.org/")
829 (license license:agpl3+)))
831 (define-public rapicorn
837 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
838 "rapicorn-" version ".tar.xz"))
841 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
842 (patches (search-patches "rapicorn-isnan.patch"))))
843 (build-system gnu-build-system)
846 (modify-phases %standard-phases
847 (add-after 'unpack 'fix-tests
849 ;; Our grep does not support perl regular expressions.
850 (substitute* "taptool.sh"
851 (("grep -P") "grep -E"))
852 ;; Disable path tests because we cannot access /bin or /sbin.
853 (substitute* "rcore/tests/multitest.cc"
854 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
856 (add-before 'check 'pre-check
858 ;; The test suite requires a running X server (with DISPLAY
859 ;; number 99 or higher).
860 (system "Xvfb :99 &")
861 (setenv "DISPLAY" ":99")
863 (add-after 'unpack 'replace-fhs-paths
865 (substitute* (cons "Makefile.decl"
866 (find-files "." "^Makefile\\.in$"))
867 (("/bin/ls") (which "ls"))
868 (("/usr/bin/env") (which "env")))
870 ;; These libraries are listed in the "Required" section of the pkg-config
873 `(("librsvg" ,librsvg)
877 ("python2-enum34" ,python2-enum34)))
879 `(("gdk-pixbuf" ,gdk-pixbuf)
880 ("libpng" ,libpng-1.2)
881 ("readline" ,readline)
882 ("libcroco" ,libcroco)
884 ("cython" ,python2-cython)))
886 `(("pandoc" ,ghc-pandoc)
890 ("graphviz" ,graphviz)
891 ("intltool" ,intltool)
892 ("pkg-config" ,pkg-config)
893 ("xvfb" ,xorg-server-for-tests)))
894 (home-page "https://rapicorn.testbit.org/")
895 (synopsis "Toolkit for rapid development of user interfaces")
897 "Rapicorn is a toolkit for rapid development of user interfaces in C++
898 and Python. The user interface is designed in a declarative markup language
899 and is connected to the programming logic using data bindings and commands.")
900 (license license:mpl2.0)))
908 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
912 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
913 (build-system cmake-build-system)
914 (arguments '(#:tests? #f)) ;no 'test' target
916 ;; Headers include OpenEXR and IlmBase headers.
917 (propagated-inputs `(("openexr" ,openexr)))
919 (home-page "http://ampasctl.sourceforge.net")
920 (synopsis "Color Transformation Language")
922 "The Color Transformation Language, or CTL, is a small programming
923 language that was designed to serve as a building block for digital color
924 management systems. CTL allows users to describe color transforms in a
925 concise and unambiguous way by expressing them as programs. In order to apply
926 a given transform to an image, the color management system instructs a CTL
927 interpreter to load and run the CTL program that describes the transform. The
928 original and the transformed image constitute the CTL program's input and
931 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
932 ;; and headers use different wording.
933 (license (license:non-copyleft "file://LICENSE"))))
935 (define-public brdf-explorer
936 ;; There are no release tarballs, and not even tags in the repo,
937 ;; so use the latest revision.
938 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
941 (name "brdf-explorer")
942 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
946 (url "https://github.com/wdas/brdf.git")
950 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
951 (file-name (string-append name "-" version "-checkout"))))
952 (build-system gnu-build-system)
954 `(#:phases (modify-phases %standard-phases
956 (lambda* (#:key outputs #:allow-other-keys)
957 (let ((out (assoc-ref outputs "out")))
959 (string-append "prefix=" out)))))
960 (add-after 'install 'wrap-program
961 (lambda* (#:key outputs #:allow-other-keys)
962 (let* ((out (assoc-ref outputs "out"))
963 (bin (string-append out "/bin"))
966 (with-directory-excursion bin
967 (rename-file "brdf" ".brdf-real")
968 (call-with-output-file "brdf"
970 (format port "#!/bin/sh
971 # Run the thing from its home, otherwise it just bails out.
973 exec -a \"$0\" ~a/.brdf-real~%"
975 (chmod "brdf" #o555)))
978 `(("qttools" ,qttools))) ;for 'qmake'
983 ("freeglut" ,freeglut)
985 (home-page "https://www.disneyanimation.com/technology/brdf.html")
987 "Analyze bidirectional reflectance distribution functions (BRDFs)")
989 "BRDF Explorer is an application that allows the development and analysis
990 of bidirectional reflectance distribution functions (BRDFs). It can load and
991 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
992 language), measured material data from the MERL database, and anisotropic
993 measured material data from MIT CSAIL. Graphs and visualizations update in
994 real time as parameters are changed, making it a useful tool for evaluating
995 and understanding different BRDFs (and other component functions).")
996 (license license:ms-pl))))
1004 (uri (list (string-append
1005 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1008 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1011 ;; Site was discontinued.
1012 (string-append "http://www.antigrain.com/agg-"
1013 version ".tar.gz")))
1015 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1016 (patches (search-patches "agg-am_c_prototype.patch"))))
1017 (build-system gnu-build-system)
1020 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1022 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1024 "--disable-examples")
1026 (modify-phases %standard-phases
1029 ;; let's call configure from configure phase and not now
1030 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1031 (invoke "sh" "autogen.sh"))))))
1033 `(("pkg-config" ,pkg-config)
1034 ("libtool" ,libtool)
1035 ("autoconf" ,autoconf)
1036 ("automake" ,automake)))
1038 `(("libx11" ,libx11)
1039 ("freetype" ,freetype)
1042 ;; Antigrain.com was discontinued.
1043 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1044 (synopsis "High-quality 2D graphics rendering engine for C++")
1046 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1047 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1048 rendering SVG graphics.")
1049 (license license:gpl2+)))
1051 (define-public python-pastel
1053 (name "python-pastel")
1058 (uri (pypi-uri "pastel" version))
1061 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1062 (build-system python-build-system)
1064 `(#:phases (modify-phases %standard-phases
1066 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1068 `(("python-pytest" ,python-pytest)))
1069 (home-page "https://github.com/sdispater/pastel")
1070 (synopsis "Library to colorize strings in your terminal")
1071 (description "Pastel is a simple library to help you colorize strings in
1073 (license license:expat)))
1075 (define-public python2-pastel
1076 (package-with-python2 python-pastel))
1078 (define-public fgallery
1086 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1087 "fgallery-" version ".zip"))
1090 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1091 (build-system gnu-build-system)
1093 `(#:tests? #f ; no tests
1095 (modify-phases %standard-phases
1099 (lambda* (#:key inputs outputs #:allow-other-keys)
1100 (let* ((out (assoc-ref outputs "out"))
1101 (bin (string-append out "/bin/"))
1102 (share (string-append out "/share/fgallery"))
1103 (man (string-append out "/share/man/man1"))
1104 (perl5lib (getenv "PERL5LIB"))
1105 (script (string-append share "/fgallery")))
1106 (define (bin-directory input-name)
1107 (string-append (assoc-ref inputs input-name) "/bin"))
1110 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1113 (copy-recursively "." share)
1115 ;; fgallery copies files from store when it is run. The
1116 ;; read-only permissions from the store directories will cause
1117 ;; fgallery to fail. Do not preserve file attributes when
1118 ;; copying files to prevent it.
1121 "'cp', '--no-preserve=all'"))
1124 (symlink script (string-append out "/bin/fgallery"))
1126 (wrap-program script
1128 ,(map bin-directory '("imagemagick"
1136 `("PERL5LIB" ":" prefix (,perl5lib)))
1139 `(("unzip" ,unzip)))
1140 ;; TODO: Add missing optional dependency: facedetect.
1142 `(("imagemagick" ,imagemagick)
1145 ("libjpeg" ,libjpeg-turbo)
1148 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1149 ("perl-image-exiftool" ,perl-image-exiftool)
1150 ("jpegoptim" ,jpegoptim)
1151 ("pngcrush" ,pngcrush)
1153 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1154 (synopsis "Static photo gallery generator")
1156 "FGallery is a static, JavaScript photo gallery generator with minimalist
1157 look. The result can be uploaded on any web server without additional
1159 (license license:gpl2+)))
1161 (define-public opensubdiv
1168 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1169 (commit (string-append "v" (string-join (string-split version #\.)
1171 (file-name (git-file-name name version))
1174 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1175 (build-system cmake-build-system)
1177 `(#:phases (modify-phases %standard-phases
1178 (add-before 'configure 'set-glew-location
1179 (lambda* (#:key inputs #:allow-other-keys)
1180 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1182 (add-before 'check 'start-xorg-server
1183 (lambda* (#:key inputs #:allow-other-keys)
1184 ;; The test suite requires a running X server.
1185 (system (string-append (assoc-ref inputs "xorg-server")
1187 (setenv "DISPLAY" ":1")
1190 `(("xorg-server" ,xorg-server-for-tests)))
1193 ("libxrandr" ,libxrandr)
1194 ("libxcursor" ,libxcursor)
1195 ("libxinerama" ,libxinerama)
1199 (home-page "https://graphics.pixar.com/opensubdiv/")
1200 (synopsis "High performance subdivision surface evaluation")
1201 (description "OpenSubdiv is a set of libraries that implement high
1202 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1203 and GPU architectures.")
1204 (license license:asl2.0)))
1206 (define-public opencsg
1207 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1215 (url "https://github.com/floriankirsch/OpenCSG.git")
1216 (commit (string-append "opencsg-"
1217 (string-map dot-to-dash version)
1219 (file-name (git-file-name name version))
1222 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1223 (build-system gnu-build-system)
1226 (modify-phases %standard-phases
1228 (lambda* (#:key outputs #:allow-other-keys)
1229 (substitute* "src/Makefile"
1230 (("/usr/local") (assoc-ref outputs "out")))
1232 (add-before 'build 'skip-example
1233 (lambda _ (chdir "src") #t)))))
1236 ("freeglut" ,freeglut)))
1237 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1239 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1240 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1241 For example, two shapes can be combined by uniting them, by intersecting them,
1242 or by subtracting one shape from the other.")
1243 (home-page "http://www.opencsg.org/")
1244 (license license:gpl2))))
1246 (define-public coin3D
1247 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1248 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1250 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1254 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1259 (url "https://bitbucket.org/Coin3D/coin")
1260 (changeset changeset)))
1261 (file-name (git-file-name name version))
1263 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1264 (modules '((guix build utils)))
1267 (for-each delete-file
1269 "cfg/wrapmsvc.exe"))
1271 (build-system cmake-build-system)
1273 `(("doxygen" ,doxygen)
1274 ("graphviz" ,graphviz)))
1277 ("freeglut" ,freeglut)
1282 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1283 (string-append "-DBOOST_ROOT="
1284 (assoc-ref %build-inputs "boost")))))
1285 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1287 "High-level 3D visualization library with Open Inventor 2.1 API")
1289 "Coin is a 3D graphics library with an Application Programming Interface
1290 based on the Open Inventor 2.1 API. For those who are not familiar with
1291 Open Inventor, it is a scene-graph based retain-mode rendering and model
1292 interaction library, written in C++, which has become the de facto
1293 standard graphics library for 3D visualization and visual simulation
1294 software in the scientific and engineering community.")
1295 (license license:bsd-3))))
1297 (define-public superfamiconv
1299 (name "superfamiconv")
1305 (url "https://github.com/Optiroc/SuperFamiconv")
1306 (commit (string-append "v" version))))
1307 (file-name (git-file-name name version))
1310 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1311 (build-system gnu-build-system)
1313 `(#:tests? #f ; no tests
1315 (modify-phases %standard-phases
1318 (lambda* (#:key outputs #:allow-other-keys)
1319 (let* ((outdir (assoc-ref outputs "out"))
1320 (bindir (string-append outdir "/bin")))
1321 (install-file "bin/superfamiconv" bindir)
1323 (home-page "https://github.com/Optiroc/SuperFamiconv")
1324 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1325 and PC Engine formats")
1326 (description "SuperFamiconv is a converter for tiled graphics, supporting
1327 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1328 Automated palette selection is supported.")
1329 (license license:expat)))