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 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>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages graphics)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages algebra)
34 #:use-module (gnu packages audio)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages boost)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages fonts)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages ghostscript)
46 #:use-module (gnu packages gl)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages graphviz)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages haskell)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages imagemagick)
54 #:use-module (gnu packages jemalloc)
55 #:use-module (gnu packages multiprecision)
56 #:use-module (gnu packages pdf)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages photo)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages pth)
61 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages python-xyz)
64 #:use-module (gnu packages qt)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages sdl)
67 #:use-module (gnu packages swig)
68 #:use-module (gnu packages video)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system python)
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (guix packages)
78 #:use-module (guix utils))
80 (define-public blender
86 (uri (string-append "https://download.blender.org/source/"
87 "blender-" version ".tar.gz"))
90 "1h550jisdbis50hxwk5kxrvrk1a6sh2fsri3yyj66vhzbi87x7fd"))))
91 (build-system cmake-build-system)
93 (let ((python-version (version-major+minor (package-version python))))
94 `(;; Test files are very large and not included in the release tarball.
97 (list "-DWITH_CODEC_FFMPEG=ON"
98 "-DWITH_CODEC_SNDFILE=ON"
100 "-DWITH_DOC_MANPAGE=ON"
102 "-DWITH_IMAGE_OPENJPEG=ON"
103 "-DWITH_INPUT_NDOF=ON"
104 "-DWITH_INSTALL_PORTABLE=OFF"
106 "-DWITH_MOD_OCEANSIM=ON"
107 "-DWITH_PYTHON_INSTALL=OFF"
108 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
109 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
111 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
112 "/include/python" ,python-version "m")
113 (string-append "-DPYTHON_VERSION=" ,python-version)
114 (string-append "-DPYTHON_NUMPY_PATH="
115 (assoc-ref %build-inputs "python-numpy")
116 "/lib/python" ,python-version "/site-packages/"))
118 (modify-phases %standard-phases
119 ;; XXX This file doesn't exist in the Git sources but will probably
120 ;; exist in the eventual 2.80 source tarball.
121 ; (add-after 'unpack 'fix-broken-import
123 ; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
124 ; (("import encode_bin") "from . import encode_bin"))
126 (add-after 'set-paths 'add-ilmbase-include-path
127 (lambda* (#:key inputs #:allow-other-keys)
128 ;; OpenEXR propagates ilmbase, but its include files do not appear
129 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
130 ;; the CPATH to satisfy the dependency on "half.h".
132 (string-append (assoc-ref inputs "ilmbase")
134 ":" (or (getenv "CPATH") "")))
138 ("jemalloc" ,jemalloc)
140 ("openimageio" ,openimageio)
143 ("openjpeg" ,openjpeg)
150 ("libsndfile" ,libsndfile)
151 ("freetype" ,freetype)
155 ("python-numpy" ,python-numpy)
157 (home-page "https://blender.org/")
158 (synopsis "3D graphics creation suite")
160 "Blender is a 3D graphics creation suite. It supports the entirety of
161 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
162 compositing and motion tracking, even video editing and game creation. The
163 application can be customized via its API for Python scripting.
165 WARNING: This is a release candidate build of Blender.")
166 (license license:gpl2+)))
168 (define-public blender-2.79
174 (uri (string-append "https://download.blender.org/source/"
175 "blender-" version ".tar.gz"))
178 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
179 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
180 "blender-2.79-python-3.7-fix.patch"))))
181 (build-system cmake-build-system)
183 (let ((python-version (version-major+minor (package-version python))))
184 `(;; Test files are very large and not included in the release tarball.
187 (list "-DWITH_CODEC_FFMPEG=ON"
188 "-DWITH_CODEC_SNDFILE=ON"
190 "-DWITH_DOC_MANPAGE=ON"
192 "-DWITH_GAMEENGINE=ON"
193 "-DWITH_IMAGE_OPENJPEG=ON"
194 "-DWITH_INPUT_NDOF=ON"
195 "-DWITH_INSTALL_PORTABLE=OFF"
197 "-DWITH_MOD_OCEANSIM=ON"
199 "-DWITH_PYTHON_INSTALL=OFF"
200 "-DWITH_PYTHON_INSTALL=OFF"
201 "-DWITH_SYSTEM_OPENJPEG=ON"
202 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
203 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
205 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
206 "/include/python" ,python-version "m")
207 (string-append "-DPYTHON_VERSION=" ,python-version))
209 (modify-phases %standard-phases
210 (add-after 'unpack 'fix-broken-import
212 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
213 (("import encode_bin") "from . import encode_bin"))
215 (add-after 'set-paths 'add-ilmbase-include-path
216 (lambda* (#:key inputs #:allow-other-keys)
217 ;; OpenEXR propagates ilmbase, but its include files do not appear
218 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
219 ;; the CPATH to satisfy the dependency on "half.h".
221 (string-append (assoc-ref inputs "ilmbase")
223 ":" (or (getenv "CPATH") "")))
227 ("jemalloc" ,jemalloc)
229 ("openimageio" ,openimageio-1.7)
232 ("openjpeg" ,openjpeg-1)
239 ("libsndfile" ,libsndfile)
240 ("freetype" ,freetype)
245 (home-page "https://blender.org/")
246 (synopsis "3D graphics creation suite")
248 "Blender is a 3D graphics creation suite. It supports the entirety of
249 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
250 compositing and motion tracking, even video editing and game creation. The
251 application can be customized via its API for Python scripting.
253 NOTE: This older version of Blender is the last release that does not require
254 OpenGL 3. It is retained for use with older computers.")
255 (license license:gpl2+)))
257 (define-public assimp
264 (url "https://github.com/assimp/assimp.git")
265 (commit (string-append "v" version))))
266 (file-name (git-file-name name version))
269 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
270 (build-system cmake-build-system)
273 (home-page "http://www.assimp.org/")
274 (synopsis "Asset import library")
276 "The Open Asset Import Library loads more than 40 3D file formats into
277 one unified data structure. Additionally, assimp features various mesh post
278 processing tools: normals and tangent space generation, triangulation, vertex
279 cache locality optimization, removal of degenerate primitives and duplicate
280 vertices, sorting by primitive type, merging of redundant materials and many
282 (license license:bsd-3)))
291 "https://github.com/CGAL/cgal/releases/download/releases/"
292 "CGAL-" version "/CGAL-" version ".tar.xz"))
295 "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s"))))
296 (build-system cmake-build-system)
298 '(;; "RelWithDebInfo" is not supported.
299 #:build-type "Release"
307 (home-page "http://cgal.org/")
308 (synopsis "Computational geometry algorithms library")
310 "CGAL provides easy access to efficient and reliable geometric algorithms
311 in the form of a C++ library. CGAL is used in various areas needing geometric
312 computation, such as: computer graphics, scientific visualization, computer
313 aided design and modeling, geographic information systems, molecular biology,
314 medical imaging, robotics and motion planning, mesh generation, numerical
315 methods, etc. It provides data structures and algorithms such as
316 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
319 ;; The 'LICENSE' file explains that a subset is available under more
320 ;; permissive licenses.
321 (license license:gpl3+)))
323 (define-public ilmbase
329 (uri (string-append "https://github.com/openexr/openexr/releases"
330 "/download/v" version "/ilmbase-"
334 "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5"))
335 (patches (search-patches "ilmbase-fix-tests.patch"))))
336 (build-system gnu-build-system)
337 (home-page "http://www.openexr.com/")
338 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
340 "IlmBase provides several utility libraries for C++. Half is a class
341 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
342 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
343 quaternions and other useful 2D and 3D math functions. Iex is an
344 exception-handling library.")
345 (license license:bsd-3)))
355 (url "https://github.com/OGRECave/ogre.git")
356 (commit (string-append "v" version))))
357 (file-name (git-file-name name version))
360 "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr"))))
361 (build-system cmake-build-system)
364 (modify-phases %standard-phases
365 (add-before 'configure 'pre-configure
366 (lambda* (#:key inputs #:allow-other-keys)
367 (substitute* "Tests/CMakeLists.txt"
369 (string-append "URL " (assoc-ref inputs "googletest-source"))))
372 (list "-DOGRE_BUILD_TESTS=TRUE"
373 (string-append "-DCMAKE_INSTALL_RPATH="
374 (assoc-ref %outputs "out") "/lib:"
375 (assoc-ref %outputs "out") "/lib/OGRE:"
376 (assoc-ref %build-inputs "googletest") "/lib")
377 "-DOGRE_INSTALL_DOCS=TRUE"
378 "-DOGRE_INSTALL_SAMPLES=TRUE"
379 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
383 ("googletest-source" ,(package-source googletest))
384 ("pkg-config" ,pkg-config)))
386 `(("font-dejavu" ,font-dejavu)
387 ("freeimage" ,freeimage)
388 ("freetype" ,freetype)
390 ("googletest" ,googletest)
393 ("libxrandr" ,libxrandr)
395 ("zziplib" ,zziplib)))
396 (synopsis "Scene-oriented, flexible 3D engine written in C++")
398 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
399 flexible 3D engine written in C++ designed to make it easier and more intuitive
400 for developers to produce applications utilising hardware-accelerated 3D
402 (home-page "http://www.ogre3d.org/")
403 (license license:expat)))
405 (define-public openexr
411 (uri (string-append "https://github.com/openexr/openexr/releases"
412 "/download/v" version "/openexr-"
416 "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x"))
417 (modules '((guix build utils)))
420 (substitute* (find-files "." "tmpDir\\.h")
424 (build-system gnu-build-system)
427 (modify-phases %standard-phases
428 (add-after 'unpack 'disable-broken-test
429 ;; This test fails on i686. Upstream developers suggest that
430 ;; this test is broken on i686 and can be safely disabled:
431 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
433 (substitute* "IlmImfTest/main.cpp"
434 (("#include \"testOptimizedInterleavePatterns.h\"")
435 "//#include \"testOptimizedInterleavePatterns.h\"")
436 (("TEST \\(testOptimizedInterleavePatterns")
437 "//TEST (testOptimizedInterleavePatterns"))
440 `(("pkg-config" ,pkg-config)))
442 `(("ilmbase" ,ilmbase) ;used in public headers
443 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
444 (home-page "http://www.openexr.com")
445 (synopsis "High-dynamic range file format library")
447 "OpenEXR is a high dynamic-range (HDR) image file format developed for
448 use in computer imaging applications. The IlmImf C++ libraries support
449 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
450 (license license:bsd-3)))
452 (define-public openimageio
459 (url "https://github.com/OpenImageIO/oiio.git")
460 (commit (string-append "Release-" version))))
461 (file-name (git-file-name name version))
464 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
465 (build-system cmake-build-system)
466 ;; FIXME: To run all tests successfully, test image sets from multiple
467 ;; third party sources have to be present. For details see
468 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
469 (arguments `(#:tests? #f))
471 `(("pkg-config" ,pkg-config)))
482 (synopsis "C++ library for reading and writing images")
484 "OpenImageIO is a library for reading and writing images, and a bunch of
485 related classes, utilities, and applications. There is a particular emphasis
486 on formats and functionality used in professional, large-scale animation and
487 visual effects work for film.")
488 (home-page "http://www.openimageio.org")
489 (license license:bsd-3)))
491 ;; This older version of OpenImageIO is required for Blender 2.79.
492 (define-public openimageio-1.7
494 (inherit openimageio)
500 (url "https://github.com/OpenImageIO/oiio.git")
501 (commit (string-append "Release-" version))))
502 (file-name (git-file-name name version))
505 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))))
507 (define-public openscenegraph
509 (name "openscenegraph")
515 (url "https://github.com/openscenegraph/OpenSceneGraph")
516 (commit (string-append "OpenSceneGraph-" version))))
519 "0h32z15sa8sbq276j0iib0n707m8bs4p5ji9z2ah411446paad9q"))
520 (file-name (git-file-name name version))))
522 `((upstream-name . "OpenSceneGraph")))
523 (build-system cmake-build-system)
525 `(#:tests? #f ; no test target available
526 ;; Without this flag, 'rd' will be added to the name of the
527 ;; library binaries and break linking with other programs.
528 #:build-type "Release"
530 (list (string-append "-DCMAKE_INSTALL_RPATH="
531 (assoc-ref %outputs "out") "/lib:"
532 (assoc-ref %outputs "out") "/lib64"))))
534 `(("pkg-config" ,pkg-config)
540 ("libxrandr" ,libxrandr)
543 (synopsis "High performance real-time graphics toolkit")
545 "The OpenSceneGraph is a high performance 3D graphics toolkit
546 used by application developers in fields such as visual simulation, games,
547 virtual reality, scientific visualization and modeling.")
548 (home-page "http://www.openscenegraph.org")
549 ;; The 'LICENSE' file explains that the source is licensed under
550 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
551 (license license:lgpl2.1)))
553 ;; We need this for simgear
554 (define-public openscenegraph-3.4
555 (package (inherit openscenegraph)
556 (name "openscenegraph")
562 (url "https://github.com/openscenegraph/OpenSceneGraph")
563 (commit (string-append "OpenSceneGraph-" version))))
564 (file-name (git-file-name name version))
567 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
569 (substitute-keyword-arguments (package-arguments openscenegraph)
570 ((#:configure-flags flags)
572 ;; The jpeg plugin requires conversion between integers and booleans
573 "-DCMAKE_CXX_FLAGS=-fpermissive"
576 `(("libjpeg" ,libjpeg)
577 ,@(package-inputs openscenegraph)))))
579 (define-public povray
586 (url "https://github.com/POV-Ray/povray")
587 (commit (string-append "v" version))))
588 (file-name (git-file-name name version))
591 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
592 (modules '((guix build utils)))
595 ;; Delete bundled libraries.
596 (delete-file-recursively "libraries")
598 (build-system gnu-build-system)
600 `(("autoconf" ,autoconf)
601 ("automake" ,automake)
602 ("pkg-config" ,pkg-config)))
613 (list "COMPILED_BY=Guix"
614 (string-append "--with-boost-libdir="
615 (assoc-ref %build-inputs "boost") "/lib")
616 "CXXFLAGS=-std=c++11"
617 "--disable-optimiz-arch")
619 (modify-phases %standard-phases
620 (add-after 'unpack 'run-prebuild
622 (setenv "HOME" (getcwd))
623 (with-directory-excursion "unix"
624 (substitute* "prebuild.sh"
625 (("/bin/sh") (which "sh")))
626 (invoke "sh" "prebuild.sh"))
628 ;; The bootstrap script is run by the prebuild script in the
629 ;; "run-prebuild" phase.
630 (delete 'bootstrap))))
631 (synopsis "Tool for creating three-dimensional graphics")
633 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
634 for producing high-quality computer graphics. @code{POV-Ray} creates
635 three-dimensional, photo-realistic images using a rendering technique called
636 ray-tracing. It reads in a text file containing information describing the
637 objects and lighting in a scene and generates an image of that scene from the
638 view point of a camera also described in the text file. Ray-tracing is not a
639 fast process by any means, but it produces very high quality images with
640 realistic reflections, shading, perspective and other effects.")
641 (home-page "http://www.povray.org/")
642 (license license:agpl3+)))
644 (define-public rapicorn
650 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
651 "rapicorn-" version ".tar.xz"))
654 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
655 (patches (search-patches "rapicorn-isnan.patch"))))
656 (build-system gnu-build-system)
659 (modify-phases %standard-phases
660 (add-after 'unpack 'fix-tests
662 ;; Our grep does not support perl regular expressions.
663 (substitute* "taptool.sh"
664 (("grep -P") "grep -E"))
665 ;; Disable path tests because we cannot access /bin or /sbin.
666 (substitute* "rcore/tests/multitest.cc"
667 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
669 (add-before 'check 'pre-check
671 ;; The test suite requires a running X server (with DISPLAY
672 ;; number 99 or higher).
673 (system "Xvfb :99 &")
674 (setenv "DISPLAY" ":99")
676 (add-after 'unpack 'replace-fhs-paths
678 (substitute* (cons "Makefile.decl"
679 (find-files "." "^Makefile\\.in$"))
680 (("/bin/ls") (which "ls"))
681 (("/usr/bin/env") (which "env")))
683 ;; These libraries are listed in the "Required" section of the pkg-config
686 `(("librsvg" ,librsvg)
690 ("python2-enum34" ,python2-enum34)))
692 `(("gdk-pixbuf" ,gdk-pixbuf)
693 ("libpng" ,libpng-1.2)
694 ("readline" ,readline)
695 ("libcroco" ,libcroco)
697 ("cython" ,python2-cython)))
699 `(("pandoc" ,ghc-pandoc)
703 ("graphviz" ,graphviz)
704 ("intltool" ,intltool)
705 ("pkg-config" ,pkg-config)
706 ("xvfb" ,xorg-server)))
707 (home-page "https://rapicorn.testbit.org/")
708 (synopsis "Toolkit for rapid development of user interfaces")
710 "Rapicorn is a toolkit for rapid development of user interfaces in C++
711 and Python. The user interface is designed in a declarative markup language
712 and is connected to the programming logic using data bindings and commands.")
713 (license license:mpl2.0)))
721 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
725 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
726 (build-system cmake-build-system)
727 (arguments '(#:tests? #f)) ;no 'test' target
729 ;; Headers include OpenEXR and IlmBase headers.
730 (propagated-inputs `(("openexr" ,openexr)))
732 (home-page "http://ampasctl.sourceforge.net")
733 (synopsis "Color Transformation Language")
735 "The Color Transformation Language, or CTL, is a small programming
736 language that was designed to serve as a building block for digital color
737 management systems. CTL allows users to describe color transforms in a
738 concise and unambiguous way by expressing them as programs. In order to apply
739 a given transform to an image, the color management system instructs a CTL
740 interpreter to load and run the CTL program that describes the transform. The
741 original and the transformed image constitute the CTL program's input and
744 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
745 ;; and headers use different wording.
746 (license (license:non-copyleft "file://LICENSE"))))
748 (define-public brdf-explorer
749 ;; There are no release tarballs, and not even tags in the repo,
750 ;; so use the latest revision.
751 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
754 (name "brdf-explorer")
755 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
759 (url "https://github.com/wdas/brdf.git")
763 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
764 (file-name (string-append name "-" version "-checkout"))))
765 (build-system gnu-build-system)
767 `(#:phases (modify-phases %standard-phases
769 (lambda* (#:key outputs #:allow-other-keys)
770 (let ((out (assoc-ref outputs "out")))
772 (string-append "prefix=" out)))))
773 (add-after 'install 'wrap-program
774 (lambda* (#:key outputs #:allow-other-keys)
775 (let* ((out (assoc-ref outputs "out"))
776 (bin (string-append out "/bin"))
779 (with-directory-excursion bin
780 (rename-file "brdf" ".brdf-real")
781 (call-with-output-file "brdf"
783 (format port "#!/bin/sh
784 # Run the thing from its home, otherwise it just bails out.
786 exec -a \"$0\" ~a/.brdf-real~%"
788 (chmod "brdf" #o555)))
791 `(("qttools" ,qttools))) ;for 'qmake'
796 ("freeglut" ,freeglut)
798 (home-page "http://www.disneyanimation.com/technology/brdf.html")
800 "Analyze bidirectional reflectance distribution functions (BRDFs)")
802 "BRDF Explorer is an application that allows the development and analysis
803 of bidirectional reflectance distribution functions (BRDFs). It can load and
804 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
805 language), measured material data from the MERL database, and anisotropic
806 measured material data from MIT CSAIL. Graphs and visualizations update in
807 real time as parameters are changed, making it a useful tool for evaluating
808 and understanding different BRDFs (and other component functions).")
809 (license license:ms-pl))))
817 (uri (list (string-append
818 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
821 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
824 ;; Site was discontinued.
825 (string-append "http://www.antigrain.com/agg-"
828 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
829 (patches (search-patches "agg-am_c_prototype.patch"))))
830 (build-system gnu-build-system)
833 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
835 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
837 "--disable-examples")
839 (modify-phases %standard-phases
842 ;; let's call configure from configure phase and not now
843 (substitute* "autogen.sh" (("./configure") "# ./configure"))
844 (invoke "sh" "autogen.sh"))))))
846 `(("pkg-config" ,pkg-config)
848 ("autoconf" ,autoconf)
849 ("automake" ,automake)))
852 ("freetype" ,freetype)
855 ;; Antigrain.com was discontinued.
856 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
857 (synopsis "High-quality 2D graphics rendering engine for C++")
859 "Anti-Grain Geometry is a high quality rendering engine written in C++.
860 It supports sub-pixel resolutions and anti-aliasing. It is also library for
861 rendering SVG graphics.")
862 (license license:gpl2+)))
864 (define-public python-pastel
866 (name "python-pastel")
871 (uri (pypi-uri "pastel" version))
874 "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i"))))
875 (build-system python-build-system)
877 `(("python-pytest" ,python-pytest)))
878 (home-page "https://github.com/sdispater/pastel")
879 (synopsis "Library to colorize strings in your terminal")
880 (description "Pastel is a simple library to help you colorize strings in
881 your terminal. It comes bundled with predefined styles:
884 @item comment: yellow
885 @item question: black on cyan
886 @item error: white on red
889 (license license:expat)))
891 (define-public python2-pastel
892 (package-with-python2 python-pastel))
894 (define-public fgallery
902 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
903 "fgallery-" version ".zip"))
906 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
907 (build-system gnu-build-system)
909 `(#:tests? #f ; no tests
911 (modify-phases %standard-phases
915 (lambda* (#:key inputs outputs #:allow-other-keys)
916 (let* ((out (assoc-ref outputs "out"))
917 (bin (string-append out "/bin/"))
918 (share (string-append out "/share/fgallery"))
919 (man (string-append out "/share/man/man1"))
920 (perl5lib (getenv "PERL5LIB"))
921 (script (string-append share "/fgallery")))
922 (define (bin-directory input-name)
923 (string-append (assoc-ref inputs input-name) "/bin"))
926 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
929 (copy-recursively "." share)
931 ;; fgallery copies files from store when it is run. The
932 ;; read-only permissions from the store directories will cause
933 ;; fgallery to fail. Do not preserve file attributes when
934 ;; copying files to prevent it.
937 "'cp', '--no-preserve=all'"))
940 (symlink script (string-append out "/bin/fgallery"))
944 ,(map bin-directory '("imagemagick"
952 `("PERL5LIB" ":" prefix (,perl5lib)))
956 ;; TODO: Add missing optional dependency: facedetect.
958 `(("imagemagick" ,imagemagick)
964 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
965 ("perl-image-exiftool" ,perl-image-exiftool)
966 ("jpegoptim" ,jpegoptim)
967 ("pngcrush" ,pngcrush)
969 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
970 (synopsis "Static photo gallery generator")
972 "FGallery is a static, JavaScript photo gallery generator with minimalist
973 look. The result can be uploaded on any web server without additional
975 (license license:gpl2+)))