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 ;; Patches submitted to upstream (see:
409 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/17,
410 ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
411 (search-patches "lib2geom-enable-assertions.patch"
412 "lib2geom-fix-tests.patch"))
413 (modules '((guix build utils)))
416 ;; Fix py2geom module initialization (see:
417 ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
418 (substitute* "src/py2geom/__init__.py"
419 (("_py2geom") "py2geom._py2geom"))
421 (build-system cmake-build-system)
423 `(#:imported-modules ((guix build python-build-system)
424 ,@%cmake-build-system-modules)
425 #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
426 "-D2GEOM_BOOST_PYTHON=ON"
427 ;; Compiling the Cython bindings fail (see:
428 ;; https://gitlab.com/inkscape/lib2geom/issues/21).
429 "-D2GEOM_CYTHON_BINDINGS=OFF")
431 (modify-phases %standard-phases
432 (add-after 'unpack 'patch-python-lib-install-path
433 (lambda* (#:key inputs outputs #:allow-other-keys)
434 (let* ((python-version (@ (guix build python-build-system)
436 (python-maj-min-version (python-version
437 (assoc-ref inputs "python")))
438 (site-package (string-append
439 (assoc-ref outputs "out")
440 "/lib/python" python-maj-min-version
442 (substitute* '("src/cython/CMakeLists.txt"
443 "src/py2geom/CMakeLists.txt")
444 (("PYTHON_LIB_INSTALL \"[^\"]*\"")
445 (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
447 (native-inputs `(("python" ,python-wrapper)
448 ("googletest" ,googletest)
449 ("pkg-config" ,pkg-config)))
450 (inputs `(("cairo" ,cairo)
451 ("pycairo" ,python-pycairo)
452 ("double-conversion" ,double-conversion)
456 `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
457 (home-page "https://gitlab.com/inkscape/lib2geom/")
458 (synopsis "C++ 2D graphics library")
459 (description "2geom is a C++ library of mathematics for paths, curves,
460 and other geometric calculations. Designed for vector graphics, it tackles
461 Bézier curves, conic sections, paths, intersections, transformations, and
463 ;; Because the library is linked with the GNU Scientific Library
464 ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
465 ;; https://gitlab.com/inkscape/inkscape/issues/784).
466 (license license:gpl3+))))
468 (define-public pstoedit
474 (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
475 version "/pstoedit-" version ".tar.gz"))
478 "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
479 (build-system gnu-build-system)
481 `(("pkg-config" ,pkg-config)))
483 `(("ghostscript" ,ghostscript)
484 ("imagemagick" ,imagemagick)
485 ("libplot" ,plotutils)
486 ("libjpeg" ,libjpeg-turbo)
487 ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
488 (home-page "http://www.pstoedit.net/")
489 (synopsis "Converter for PostScript and PDF graphics")
490 (description "The @code{pstoedit} utility allows translating graphics
491 in the PostScript or PDF (Portable Document Format) formats to various
492 other vector formats such as:
497 @item Flattened PostScript
498 @item DXF, a CAD (Computed-Aided Design) exchange format
499 @item PIC (for troff/groff)
500 @item MetaPost (for usage with TeX/LaTeX)
501 @item LaTeX2e picture
502 @item GNU Metafile (for use with plotutils/libplot)
503 @item Any format supported by ImageMagick
505 (license license:gpl2+)))
515 (url "https://github.com/OGRECave/ogre.git")
516 (commit (string-append "v" version))
517 (recursive? #t))) ;for Dear ImGui submodule
518 (file-name (git-file-name name version))
520 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
521 (build-system cmake-build-system)
524 (modify-phases %standard-phases
525 (add-before 'configure 'pre-configure
526 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
527 ;; a consequence, we cannot suggest ours in configure flags. Fix
529 (lambda* (#:key inputs outputs #:allow-other-keys)
530 (substitute* "CMakeLists.txt"
531 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
534 (let* ((out (assoc-ref %outputs "out"))
536 (string-join (list (string-append out "/lib")
537 (string-append out "/lib/OGRE"))
539 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
540 "-DOGRE_BUILD_DEPENDENCIES=OFF"
541 "-DOGRE_BUILD_TESTS=TRUE"
542 "-DOGRE_INSTALL_DOCS=TRUE"
543 "-DOGRE_INSTALL_SAMPLES=TRUE"
544 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
548 ("googletest" ,googletest-1.8)
549 ("pkg-config" ,pkg-config)))
551 `(("font-dejavu" ,font-dejavu)
552 ("freeimage" ,freeimage)
553 ("freetype" ,freetype)
556 ("libxrandr" ,libxrandr)
560 ("zziplib" ,zziplib)))
561 (synopsis "Scene-oriented, flexible 3D engine written in C++")
563 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
564 flexible 3D engine written in C++ designed to make it easier and more intuitive
565 for developers to produce applications utilising hardware-accelerated 3D
567 (home-page "https://www.ogre3d.org/")
568 (license license:expat)))
570 (define-public openexr
573 (version (package-version ilmbase))
575 (inherit (package-source ilmbase))
576 (file-name (git-file-name "openexr" version))
577 (modules '((guix build utils)))
580 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
584 (build-system cmake-build-system)
587 (modify-phases %standard-phases
588 (add-after 'unpack 'change-directory
592 (add-before 'check 'increase-test-timeout
594 ;; On armhf-linux, we need to override the CTest default
595 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
596 (setenv "CTEST_TEST_TIMEOUT" "2000")
598 ,@(if (not (target-64bit?))
599 `((add-after 'change-directory 'disable-broken-test
600 ;; This test fails on i686. Upstream developers suggest that
601 ;; this test is broken on i686 and can be safely disabled:
602 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
604 (substitute* "IlmImfTest/main.cpp"
605 ((".*testOptimizedInterleavePatterns.*") ""))
609 `(("pkg-config" ,pkg-config)))
611 `(("ilmbase" ,ilmbase) ;used in public headers
612 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
613 (home-page "https://www.openexr.com/")
614 (synopsis "High-dynamic range file format library")
616 "OpenEXR is a high dynamic-range (HDR) image file format developed for
617 use in computer imaging applications. The IlmImf C++ libraries support
618 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
619 (license license:bsd-3)))
621 (define-public openimageio
628 (url "https://github.com/OpenImageIO/oiio.git")
629 (commit (string-append "Release-" version))))
630 (file-name (git-file-name name version))
633 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
634 (build-system cmake-build-system)
635 ;; FIXME: To run all tests successfully, test image sets from multiple
636 ;; third party sources have to be present. For details see
637 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
641 `(("pkg-config" ,pkg-config)))
645 ("libjpeg" ,libjpeg-turbo)
652 (synopsis "C++ library for reading and writing images")
654 "OpenImageIO is a library for reading and writing images, and a bunch of
655 related classes, utilities, and applications. There is a particular emphasis
656 on formats and functionality used in professional, large-scale animation and
657 visual effects work for film.")
658 (home-page "https://www.openimageio.org")
659 (license license:bsd-3)))
661 (define-public openscenegraph
663 (name "openscenegraph")
669 (url "https://github.com/openscenegraph/OpenSceneGraph")
670 (commit (string-append "OpenSceneGraph-" version))))
672 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
673 (file-name (git-file-name name version))))
675 `((upstream-name . "OpenSceneGraph")))
676 (build-system cmake-build-system)
678 `(#:tests? #f ; no test target available
679 ;; Without this flag, 'rd' will be added to the name of the
680 ;; library binaries and break linking with other programs.
681 #:build-type "Release"
683 (list (string-append "-DCMAKE_INSTALL_RPATH="
684 (assoc-ref %outputs "out") "/lib:"
685 (assoc-ref %outputs "out") "/lib64"))))
687 `(("pkg-config" ,pkg-config)
691 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
694 ("libxrandr" ,libxrandr)
697 (synopsis "High-performance real-time graphics toolkit")
699 "The OpenSceneGraph is a high-performance 3D graphics toolkit
700 used by application developers in fields such as visual simulation, games,
701 virtual reality, scientific visualization and modeling.")
702 (home-page "http://www.openscenegraph.org")
703 ;; The 'LICENSE' file explains that the source is licensed under
704 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
705 (license license:lgpl2.1)))
707 ;; We need this for simgear
708 (define-public openscenegraph-3.4
709 (package (inherit openscenegraph)
710 (name "openscenegraph")
716 (url "https://github.com/openscenegraph/OpenSceneGraph")
717 (commit (string-append "OpenSceneGraph-" version))))
718 (file-name (git-file-name name version))
721 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
723 (substitute-keyword-arguments (package-arguments openscenegraph)
724 ((#:configure-flags flags)
726 ;; The jpeg plugin requires conversion between integers and booleans
727 "-DCMAKE_CXX_FLAGS=-fpermissive"
730 `(("libjpeg" ,libjpeg-turbo)
731 ,@(package-inputs openscenegraph)))))
734 (define-public openmw-openscenegraph
735 ;; OpenMW prefers its own fork of openscenegraph:
736 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
737 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
740 (inherit openscenegraph)
741 (version (git-version "3.6" "1" commit))
746 (url "https://github.com/OpenMW/osg/")
748 (file-name (git-file-name (package-name openscenegraph) version))
751 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
753 (substitute-keyword-arguments (package-arguments openscenegraph)
754 ((#:configure-flags flags)
755 ;; As per the above wiki link, the following plugins are enough:
757 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
758 "-DBUILD_OSG_PLUGIN_OSG=1"
759 "-DBUILD_OSG_PLUGIN_DDS=1"
760 "-DBUILD_OSG_PLUGIN_TGA=1"
761 "-DBUILD_OSG_PLUGIN_BMP=1"
762 "-DBUILD_OSG_PLUGIN_JPEG=1"
763 "-DBUILD_OSG_PLUGIN_PNG=1"
764 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
765 ;; The jpeg plugin requires conversion between integers and booleans
766 "-DCMAKE_CXX_FLAGS=-fpermissive")
769 (define-public povray
776 (url "https://github.com/POV-Ray/povray")
777 (commit (string-append "v" version))))
778 (file-name (git-file-name name version))
781 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
782 (modules '((guix build utils)))
785 ;; Delete bundled libraries.
786 (delete-file-recursively "libraries")
788 (build-system gnu-build-system)
790 `(("autoconf" ,autoconf)
791 ("automake" ,automake)
792 ("pkg-config" ,pkg-config)))
795 ("libjpeg" ,libjpeg-turbo)
803 (list "COMPILED_BY=Guix"
804 (string-append "--with-boost-libdir="
805 (assoc-ref %build-inputs "boost") "/lib")
806 "--disable-optimiz-arch")
808 (modify-phases %standard-phases
809 (add-after 'unpack 'run-prebuild
811 (setenv "HOME" (getcwd))
812 (with-directory-excursion "unix"
813 (substitute* "prebuild.sh"
814 (("/bin/sh") (which "sh")))
815 (invoke "sh" "prebuild.sh"))
817 ;; The bootstrap script is run by the prebuild script in the
818 ;; "run-prebuild" phase.
819 (delete 'bootstrap))))
820 (synopsis "Tool for creating three-dimensional graphics")
822 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
823 for producing high-quality computer graphics. @code{POV-Ray} creates
824 three-dimensional, photo-realistic images using a rendering technique called
825 ray-tracing. It reads in a text file containing information describing the
826 objects and lighting in a scene and generates an image of that scene from the
827 view point of a camera also described in the text file. Ray-tracing is not a
828 fast process by any means, but it produces very high quality images with
829 realistic reflections, shading, perspective and other effects.")
830 (home-page "http://www.povray.org/")
831 (license license:agpl3+)))
833 (define-public rapicorn
839 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
840 "rapicorn-" version ".tar.xz"))
843 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
844 (patches (search-patches "rapicorn-isnan.patch"))))
845 (build-system gnu-build-system)
848 (modify-phases %standard-phases
849 (add-after 'unpack 'fix-tests
851 ;; Our grep does not support perl regular expressions.
852 (substitute* "taptool.sh"
853 (("grep -P") "grep -E"))
854 ;; Disable path tests because we cannot access /bin or /sbin.
855 (substitute* "rcore/tests/multitest.cc"
856 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
858 (add-before 'check 'pre-check
860 ;; The test suite requires a running X server (with DISPLAY
861 ;; number 99 or higher).
862 (system "Xvfb :99 &")
863 (setenv "DISPLAY" ":99")
865 (add-after 'unpack 'replace-fhs-paths
867 (substitute* (cons "Makefile.decl"
868 (find-files "." "^Makefile\\.in$"))
869 (("/bin/ls") (which "ls"))
870 (("/usr/bin/env") (which "env")))
872 ;; These libraries are listed in the "Required" section of the pkg-config
875 `(("librsvg" ,librsvg)
879 ("python2-enum34" ,python2-enum34)))
881 `(("gdk-pixbuf" ,gdk-pixbuf)
882 ("libpng" ,libpng-1.2)
883 ("readline" ,readline)
884 ("libcroco" ,libcroco)
886 ("cython" ,python2-cython)))
888 `(("pandoc" ,ghc-pandoc)
892 ("graphviz" ,graphviz)
893 ("intltool" ,intltool)
894 ("pkg-config" ,pkg-config)
895 ("xvfb" ,xorg-server-for-tests)))
896 (home-page "https://rapicorn.testbit.org/")
897 (synopsis "Toolkit for rapid development of user interfaces")
899 "Rapicorn is a toolkit for rapid development of user interfaces in C++
900 and Python. The user interface is designed in a declarative markup language
901 and is connected to the programming logic using data bindings and commands.")
902 (license license:mpl2.0)))
910 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
914 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
915 (build-system cmake-build-system)
916 (arguments '(#:tests? #f)) ;no 'test' target
918 ;; Headers include OpenEXR and IlmBase headers.
919 (propagated-inputs `(("openexr" ,openexr)))
921 (home-page "http://ampasctl.sourceforge.net")
922 (synopsis "Color Transformation Language")
924 "The Color Transformation Language, or CTL, is a small programming
925 language that was designed to serve as a building block for digital color
926 management systems. CTL allows users to describe color transforms in a
927 concise and unambiguous way by expressing them as programs. In order to apply
928 a given transform to an image, the color management system instructs a CTL
929 interpreter to load and run the CTL program that describes the transform. The
930 original and the transformed image constitute the CTL program's input and
933 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
934 ;; and headers use different wording.
935 (license (license:non-copyleft "file://LICENSE"))))
937 (define-public brdf-explorer
938 ;; There are no release tarballs, and not even tags in the repo,
939 ;; so use the latest revision.
940 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
943 (name "brdf-explorer")
944 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
948 (url "https://github.com/wdas/brdf.git")
952 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
953 (file-name (string-append name "-" version "-checkout"))))
954 (build-system gnu-build-system)
956 `(#:phases (modify-phases %standard-phases
958 (lambda* (#:key outputs #:allow-other-keys)
959 (let ((out (assoc-ref outputs "out")))
961 (string-append "prefix=" out)))))
962 (add-after 'install 'wrap-program
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let* ((out (assoc-ref outputs "out"))
965 (bin (string-append out "/bin"))
968 (with-directory-excursion bin
969 (rename-file "brdf" ".brdf-real")
970 (call-with-output-file "brdf"
972 (format port "#!/bin/sh
973 # Run the thing from its home, otherwise it just bails out.
975 exec -a \"$0\" ~a/.brdf-real~%"
977 (chmod "brdf" #o555)))
980 `(("qttools" ,qttools))) ;for 'qmake'
985 ("freeglut" ,freeglut)
987 (home-page "https://www.disneyanimation.com/technology/brdf.html")
989 "Analyze bidirectional reflectance distribution functions (BRDFs)")
991 "BRDF Explorer is an application that allows the development and analysis
992 of bidirectional reflectance distribution functions (BRDFs). It can load and
993 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
994 language), measured material data from the MERL database, and anisotropic
995 measured material data from MIT CSAIL. Graphs and visualizations update in
996 real time as parameters are changed, making it a useful tool for evaluating
997 and understanding different BRDFs (and other component functions).")
998 (license license:ms-pl))))
1006 (uri (list (string-append
1007 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
1010 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
1013 ;; Site was discontinued.
1014 (string-append "http://www.antigrain.com/agg-"
1015 version ".tar.gz")))
1017 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
1018 (patches (search-patches "agg-am_c_prototype.patch"))))
1019 (build-system gnu-build-system)
1022 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
1024 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
1026 "--disable-examples")
1028 (modify-phases %standard-phases
1031 ;; let's call configure from configure phase and not now
1032 (substitute* "autogen.sh" (("./configure") "# ./configure"))
1033 (invoke "sh" "autogen.sh"))))))
1035 `(("pkg-config" ,pkg-config)
1036 ("libtool" ,libtool)
1037 ("autoconf" ,autoconf)
1038 ("automake" ,automake)))
1040 `(("libx11" ,libx11)
1041 ("freetype" ,freetype)
1044 ;; Antigrain.com was discontinued.
1045 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
1046 (synopsis "High-quality 2D graphics rendering engine for C++")
1048 "Anti-Grain Geometry is a high quality rendering engine written in C++.
1049 It supports sub-pixel resolutions and anti-aliasing. It is also library for
1050 rendering SVG graphics.")
1051 (license license:gpl2+)))
1053 (define-public python-pastel
1055 (name "python-pastel")
1060 (uri (pypi-uri "pastel" version))
1063 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
1064 (build-system python-build-system)
1066 `(#:phases (modify-phases %standard-phases
1068 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
1070 `(("python-pytest" ,python-pytest)))
1071 (home-page "https://github.com/sdispater/pastel")
1072 (synopsis "Library to colorize strings in your terminal")
1073 (description "Pastel is a simple library to help you colorize strings in
1075 (license license:expat)))
1077 (define-public python2-pastel
1078 (package-with-python2 python-pastel))
1080 (define-public fgallery
1088 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
1089 "fgallery-" version ".zip"))
1092 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
1093 (build-system gnu-build-system)
1095 `(#:tests? #f ; no tests
1097 (modify-phases %standard-phases
1101 (lambda* (#:key inputs outputs #:allow-other-keys)
1102 (let* ((out (assoc-ref outputs "out"))
1103 (bin (string-append out "/bin/"))
1104 (share (string-append out "/share/fgallery"))
1105 (man (string-append out "/share/man/man1"))
1106 (perl5lib (getenv "PERL5LIB"))
1107 (script (string-append share "/fgallery")))
1108 (define (bin-directory input-name)
1109 (string-append (assoc-ref inputs input-name) "/bin"))
1112 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
1115 (copy-recursively "." share)
1117 ;; fgallery copies files from store when it is run. The
1118 ;; read-only permissions from the store directories will cause
1119 ;; fgallery to fail. Do not preserve file attributes when
1120 ;; copying files to prevent it.
1123 "'cp', '--no-preserve=all'"))
1126 (symlink script (string-append out "/bin/fgallery"))
1128 (wrap-program script
1130 ,(map bin-directory '("imagemagick"
1138 `("PERL5LIB" ":" prefix (,perl5lib)))
1141 `(("unzip" ,unzip)))
1142 ;; TODO: Add missing optional dependency: facedetect.
1144 `(("imagemagick" ,imagemagick)
1147 ("libjpeg" ,libjpeg-turbo)
1150 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
1151 ("perl-image-exiftool" ,perl-image-exiftool)
1152 ("jpegoptim" ,jpegoptim)
1153 ("pngcrush" ,pngcrush)
1155 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
1156 (synopsis "Static photo gallery generator")
1158 "FGallery is a static, JavaScript photo gallery generator with minimalist
1159 look. The result can be uploaded on any web server without additional
1161 (license license:gpl2+)))
1163 (define-public opensubdiv
1170 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1171 (commit (string-append "v" (string-join (string-split version #\.)
1173 (file-name (git-file-name name version))
1176 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1177 (build-system cmake-build-system)
1179 `(#:phases (modify-phases %standard-phases
1180 (add-before 'configure 'set-glew-location
1181 (lambda* (#:key inputs #:allow-other-keys)
1182 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1184 (add-before 'check 'start-xorg-server
1185 (lambda* (#:key inputs #:allow-other-keys)
1186 ;; The test suite requires a running X server.
1187 (system (string-append (assoc-ref inputs "xorg-server")
1189 (setenv "DISPLAY" ":1")
1192 `(("xorg-server" ,xorg-server-for-tests)))
1195 ("libxrandr" ,libxrandr)
1196 ("libxcursor" ,libxcursor)
1197 ("libxinerama" ,libxinerama)
1201 (home-page "https://graphics.pixar.com/opensubdiv/")
1202 (synopsis "High performance subdivision surface evaluation")
1203 (description "OpenSubdiv is a set of libraries that implement high
1204 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1205 and GPU architectures.")
1206 (license license:asl2.0)))
1208 (define-public opencsg
1209 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1217 (url "https://github.com/floriankirsch/OpenCSG.git")
1218 (commit (string-append "opencsg-"
1219 (string-map dot-to-dash version)
1221 (file-name (git-file-name name version))
1224 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1225 (build-system gnu-build-system)
1228 (modify-phases %standard-phases
1230 (lambda* (#:key outputs #:allow-other-keys)
1231 (substitute* "src/Makefile"
1232 (("/usr/local") (assoc-ref outputs "out")))
1234 (add-before 'build 'skip-example
1235 (lambda _ (chdir "src") #t)))))
1238 ("freeglut" ,freeglut)))
1239 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1241 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1242 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1243 For example, two shapes can be combined by uniting them, by intersecting them,
1244 or by subtracting one shape from the other.")
1245 (home-page "http://www.opencsg.org/")
1246 (license license:gpl2))))
1248 (define-public coin3D
1249 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1250 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1252 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1256 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1261 (url "https://bitbucket.org/Coin3D/coin")
1262 (changeset changeset)))
1263 (file-name (git-file-name name version))
1265 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1266 (modules '((guix build utils)))
1269 (for-each delete-file
1271 "cfg/wrapmsvc.exe"))
1273 (build-system cmake-build-system)
1275 `(("doxygen" ,doxygen)
1276 ("graphviz" ,graphviz)))
1279 ("freeglut" ,freeglut)
1284 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1285 (string-append "-DBOOST_ROOT="
1286 (assoc-ref %build-inputs "boost")))))
1287 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1289 "High-level 3D visualization library with Open Inventor 2.1 API")
1291 "Coin is a 3D graphics library with an Application Programming Interface
1292 based on the Open Inventor 2.1 API. For those who are not familiar with
1293 Open Inventor, it is a scene-graph based retain-mode rendering and model
1294 interaction library, written in C++, which has become the de facto
1295 standard graphics library for 3D visualization and visual simulation
1296 software in the scientific and engineering community.")
1297 (license license:bsd-3))))
1299 (define-public superfamiconv
1301 (name "superfamiconv")
1307 (url "https://github.com/Optiroc/SuperFamiconv")
1308 (commit (string-append "v" version))))
1309 (file-name (git-file-name name version))
1312 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1313 (build-system gnu-build-system)
1315 `(#:tests? #f ; no tests
1317 (modify-phases %standard-phases
1320 (lambda* (#:key outputs #:allow-other-keys)
1321 (let* ((outdir (assoc-ref outputs "out"))
1322 (bindir (string-append outdir "/bin")))
1323 (install-file "bin/superfamiconv" bindir)
1325 (home-page "https://github.com/Optiroc/SuperFamiconv")
1326 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1327 and PC Engine formats")
1328 (description "SuperFamiconv is a converter for tiled graphics, supporting
1329 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1330 Automated palette selection is supported.")
1331 (license license:expat)))