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 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 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
82 (commit "3c3d80ea22af15e13237f978181a881b90c41e7c"))
85 (version (git-version "2.80-beta" revision commit))
89 (url "https://git.blender.org/blender.git")
91 (file-name (git-file-name name version))
94 "1hhn8pf3a5556mxyrb2ggsiy6q0h75hnkdpcgq9b6vg284jl2l4q"))))
95 (build-system cmake-build-system)
97 (let ((python-version (version-major+minor (package-version python))))
98 `(;; Test files are very large and not included in the release tarball.
101 (list "-DWITH_CODEC_FFMPEG=ON"
102 "-DWITH_CODEC_SNDFILE=ON"
104 "-DWITH_DOC_MANPAGE=ON"
106 "-DWITH_IMAGE_OPENJPEG=ON"
107 "-DWITH_INPUT_NDOF=ON"
108 "-DWITH_INSTALL_PORTABLE=OFF"
110 "-DWITH_MOD_OCEANSIM=ON"
111 "-DWITH_PYTHON_INSTALL=OFF"
112 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
113 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
115 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
116 "/include/python" ,python-version "m")
117 (string-append "-DPYTHON_VERSION=" ,python-version)
118 (string-append "-DPYTHON_NUMPY_PATH="
119 (assoc-ref %build-inputs "python-numpy")
120 "/lib/python" ,python-version "/site-packages/"))
122 (modify-phases %standard-phases
123 ;; XXX This file doesn't exist in the Git sources but will probably
124 ;; exist in the eventual 2.80 source tarball.
125 ; (add-after 'unpack 'fix-broken-import
127 ; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
128 ; (("import encode_bin") "from . import encode_bin"))
130 (add-after 'set-paths 'add-ilmbase-include-path
131 (lambda* (#:key inputs #:allow-other-keys)
132 ;; OpenEXR propagates ilmbase, but its include files do not appear
133 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
134 ;; the CPATH to satisfy the dependency on "half.h".
136 (string-append (assoc-ref inputs "ilmbase")
138 ":" (or (getenv "CPATH") "")))
142 ("jemalloc" ,jemalloc)
144 ("openimageio" ,openimageio)
147 ("openjpeg" ,openjpeg)
154 ("libsndfile" ,libsndfile)
155 ("freetype" ,freetype)
159 ("python-numpy" ,python-numpy)
161 (home-page "https://blender.org/")
162 (synopsis "3D graphics creation suite")
164 "Blender is a 3D graphics creation suite. It supports the entirety of
165 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
166 compositing and motion tracking, even video editing and game creation. The
167 application can be customized via its API for Python scripting.
169 WARNING: This is a beta build of Blender.")
170 (license license:gpl2+))))
172 (define-public blender-2.79
178 (uri (string-append "https://download.blender.org/source/"
179 "blender-" version ".tar.gz"))
182 "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
183 (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
184 "blender-2.79-python-3.7-fix.patch"))))
185 (build-system cmake-build-system)
187 (let ((python-version (version-major+minor (package-version python))))
188 `(;; Test files are very large and not included in the release tarball.
191 (list "-DWITH_CODEC_FFMPEG=ON"
192 "-DWITH_CODEC_SNDFILE=ON"
194 "-DWITH_DOC_MANPAGE=ON"
196 "-DWITH_GAMEENGINE=ON"
197 "-DWITH_IMAGE_OPENJPEG=ON"
198 "-DWITH_INPUT_NDOF=ON"
199 "-DWITH_INSTALL_PORTABLE=OFF"
201 "-DWITH_MOD_OCEANSIM=ON"
203 "-DWITH_PYTHON_INSTALL=OFF"
204 "-DWITH_PYTHON_INSTALL=OFF"
205 "-DWITH_SYSTEM_OPENJPEG=ON"
206 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
207 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
209 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
210 "/include/python" ,python-version "m")
211 (string-append "-DPYTHON_VERSION=" ,python-version))
213 (modify-phases %standard-phases
214 (add-after 'unpack 'fix-broken-import
216 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
217 (("import encode_bin") "from . import encode_bin"))
219 (add-after 'set-paths 'add-ilmbase-include-path
220 (lambda* (#:key inputs #:allow-other-keys)
221 ;; OpenEXR propagates ilmbase, but its include files do not appear
222 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
223 ;; the CPATH to satisfy the dependency on "half.h".
225 (string-append (assoc-ref inputs "ilmbase")
227 ":" (or (getenv "CPATH") "")))
231 ("jemalloc" ,jemalloc)
233 ("openimageio" ,openimageio)
236 ("openjpeg" ,openjpeg-1)
243 ("libsndfile" ,libsndfile)
244 ("freetype" ,freetype)
249 (home-page "https://blender.org/")
250 (synopsis "3D graphics creation suite")
252 "Blender is a 3D graphics creation suite. It supports the entirety of
253 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
254 compositing and motion tracking, even video editing and game creation. The
255 application can be customized via its API for Python scripting.
257 NOTE: This older version of Blender is the last release that does not require
258 OpenGL 3. It is retained for use with older computers.")
259 (license license:gpl2+)))
261 (define-public assimp
268 (url "https://github.com/assimp/assimp.git")
269 (commit (string-append "v" version))))
270 (file-name (git-file-name name version))
273 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
274 (build-system cmake-build-system)
277 (home-page "http://www.assimp.org/")
278 (synopsis "Asset import library")
280 "The Open Asset Import Library loads more than 40 3D file formats into
281 one unified data structure. Additionally, assimp features various mesh post
282 processing tools: normals and tangent space generation, triangulation, vertex
283 cache locality optimization, removal of degenerate primitives and duplicate
284 vertices, sorting by primitive type, merging of redundant materials and many
286 (license license:bsd-3)))
295 "https://github.com/CGAL/cgal/releases/download/releases/"
296 "CGAL-" version "/CGAL-" version ".tar.xz"))
299 "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s"))))
300 (build-system cmake-build-system)
302 '(;; "RelWithDebInfo" is not supported.
303 #:build-type "Release"
311 (home-page "http://cgal.org/")
312 (synopsis "Computational geometry algorithms library")
314 "CGAL provides easy access to efficient and reliable geometric algorithms
315 in the form of a C++ library. CGAL is used in various areas needing geometric
316 computation, such as: computer graphics, scientific visualization, computer
317 aided design and modeling, geographic information systems, molecular biology,
318 medical imaging, robotics and motion planning, mesh generation, numerical
319 methods, etc. It provides data structures and algorithms such as
320 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
323 ;; The 'LICENSE' file explains that a subset is available under more
324 ;; permissive licenses.
325 (license license:gpl3+)))
327 (define-public ilmbase
333 (uri (string-append "https://github.com/openexr/openexr/releases"
334 "/download/v" version "/ilmbase-"
338 "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5"))
339 (patches (search-patches "ilmbase-fix-tests.patch"))))
340 (build-system gnu-build-system)
341 (home-page "http://www.openexr.com/")
342 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
344 "IlmBase provides several utility libraries for C++. Half is a class
345 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
346 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
347 quaternions and other useful 2D and 3D math functions. Iex is an
348 exception-handling library.")
349 (license license:bsd-3)))
359 (url "https://github.com/OGRECave/ogre.git")
360 (commit (string-append "v" version))))
361 (file-name (git-file-name name version))
364 "072rzw9mxymbiypgkrbkk9h10rgly6gczik4dlmssk6xkpqckaqr"))))
365 (build-system cmake-build-system)
368 (modify-phases %standard-phases
369 (add-before 'configure 'pre-configure
370 (lambda* (#:key inputs #:allow-other-keys)
371 (substitute* "Tests/CMakeLists.txt"
373 (string-append "URL " (assoc-ref inputs "googletest-source"))))
376 (list "-DOGRE_BUILD_TESTS=TRUE"
377 (string-append "-DCMAKE_INSTALL_RPATH="
378 (assoc-ref %outputs "out") "/lib:"
379 (assoc-ref %outputs "out") "/lib/OGRE:"
380 (assoc-ref %build-inputs "googletest") "/lib")
381 "-DOGRE_INSTALL_DOCS=TRUE"
382 "-DOGRE_INSTALL_SAMPLES=TRUE"
383 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
387 ("googletest-source" ,(package-source googletest))
388 ("pkg-config" ,pkg-config)))
390 `(("font-dejavu" ,font-dejavu)
391 ("freeimage" ,freeimage)
392 ("freetype" ,freetype)
394 ("googletest" ,googletest)
397 ("libxrandr" ,libxrandr)
399 ("zziplib" ,zziplib)))
400 (synopsis "Scene-oriented, flexible 3D engine written in C++")
402 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
403 flexible 3D engine written in C++ designed to make it easier and more intuitive
404 for developers to produce applications utilising hardware-accelerated 3D
406 (home-page "http://www.ogre3d.org/")
407 (license license:expat)))
409 (define-public openexr
415 (uri (string-append "https://github.com/openexr/openexr/releases"
416 "/download/v" version "/openexr-"
420 "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x"))
421 (modules '((guix build utils)))
424 (substitute* (find-files "." "tmpDir\\.h")
428 (build-system gnu-build-system)
431 (modify-phases %standard-phases
432 (add-after 'unpack 'disable-broken-test
433 ;; This test fails on i686. Upstream developers suggest that
434 ;; this test is broken on i686 and can be safely disabled:
435 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
437 (substitute* "IlmImfTest/main.cpp"
438 (("#include \"testOptimizedInterleavePatterns.h\"")
439 "//#include \"testOptimizedInterleavePatterns.h\"")
440 (("TEST \\(testOptimizedInterleavePatterns")
441 "//TEST (testOptimizedInterleavePatterns"))
444 `(("pkg-config" ,pkg-config)))
446 `(("ilmbase" ,ilmbase) ;used in public headers
447 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
448 (home-page "http://www.openexr.com")
449 (synopsis "High-dynamic range file format library")
451 "OpenEXR is a high dynamic-range (HDR) image file format developed for
452 use in computer imaging applications. The IlmImf C++ libraries support
453 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
454 (license license:bsd-3)))
456 (define-public openimageio
463 (url "https://github.com/OpenImageIO/oiio.git")
464 (commit (string-append "Release-" version))))
465 (file-name (git-file-name name version))
468 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))
469 (build-system cmake-build-system)
470 ;; FIXME: To run all tests successfully, test image sets from multiple
471 ;; third party sources have to be present. For details see
472 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
473 (arguments `(#:tests? #f))
475 `(("pkg-config" ,pkg-config)))
486 (synopsis "C++ library for reading and writing images")
488 "OpenImageIO is a library for reading and writing images, and a bunch of
489 related classes, utilities, and applications. There is a particular emphasis
490 on formats and functionality used in professional, large-scale animation and
491 visual effects work for film.")
492 (home-page "http://www.openimageio.org")
493 (license license:bsd-3)))
495 (define-public openscenegraph
497 (name "openscenegraph")
503 (url "https://github.com/openscenegraph/OpenSceneGraph")
504 (commit (string-append "OpenSceneGraph-" version))))
507 "0h32z15sa8sbq276j0iib0n707m8bs4p5ji9z2ah411446paad9q"))
508 (file-name (git-file-name name version))))
510 `((upstream-name . "OpenSceneGraph")))
511 (build-system cmake-build-system)
513 `(#:tests? #f ; no test target available
514 ;; Without this flag, 'rd' will be added to the name of the
515 ;; library binaries and break linking with other programs.
516 #:build-type "Release"
518 (list (string-append "-DCMAKE_INSTALL_RPATH="
519 (assoc-ref %outputs "out") "/lib:"
520 (assoc-ref %outputs "out") "/lib64"))))
522 `(("pkg-config" ,pkg-config)
528 ("libxrandr" ,libxrandr)
531 (synopsis "High performance real-time graphics toolkit")
533 "The OpenSceneGraph is a high performance 3D graphics toolkit
534 used by application developers in fields such as visual simulation, games,
535 virtual reality, scientific visualization and modeling.")
536 (home-page "http://www.openscenegraph.org")
537 ;; The 'LICENSE' file explains that the source is licensed under
538 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
539 (license license:lgpl2.1)))
541 (define-public povray
548 (url "https://github.com/POV-Ray/povray")
549 (commit (string-append "v" version))))
550 (file-name (git-file-name name version))
553 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
554 (modules '((guix build utils)))
557 ;; Delete bundled libraries.
558 (delete-file-recursively "libraries")
560 (build-system gnu-build-system)
562 `(("autoconf" ,autoconf)
563 ("automake" ,automake)
564 ("pkg-config" ,pkg-config)))
575 (list "COMPILED_BY=Guix"
576 (string-append "--with-boost-libdir="
577 (assoc-ref %build-inputs "boost") "/lib")
578 "CXXFLAGS=-std=c++11"
579 "--disable-optimiz-arch")
581 (modify-phases %standard-phases
582 (add-after 'unpack 'run-prebuild
584 (setenv "HOME" (getcwd))
585 (with-directory-excursion "unix"
586 (substitute* "prebuild.sh"
587 (("/bin/sh") (which "sh")))
588 (invoke "sh" "prebuild.sh"))
590 ;; The bootstrap script is run by the prebuild script in the
591 ;; "run-prebuild" phase.
592 (delete 'bootstrap))))
593 (synopsis "Tool for creating three-dimensional graphics")
595 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
596 for producing high-quality computer graphics. @code{POV-Ray} creates
597 three-dimensional, photo-realistic images using a rendering technique called
598 ray-tracing. It reads in a text file containing information describing the
599 objects and lighting in a scene and generates an image of that scene from the
600 view point of a camera also described in the text file. Ray-tracing is not a
601 fast process by any means, but it produces very high quality images with
602 realistic reflections, shading, perspective and other effects.")
603 (home-page "http://www.povray.org/")
604 (license license:agpl3+)))
606 (define-public rapicorn
612 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
613 "rapicorn-" version ".tar.xz"))
616 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
617 (patches (search-patches "rapicorn-isnan.patch"))))
618 (build-system gnu-build-system)
621 (modify-phases %standard-phases
622 (add-after 'unpack 'fix-tests
624 ;; Our grep does not support perl regular expressions.
625 (substitute* "taptool.sh"
626 (("grep -P") "grep -E"))
627 ;; Disable path tests because we cannot access /bin or /sbin.
628 (substitute* "rcore/tests/multitest.cc"
629 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
631 (add-before 'check 'pre-check
633 ;; The test suite requires a running X server (with DISPLAY
634 ;; number 99 or higher).
635 (system "Xvfb :99 &")
636 (setenv "DISPLAY" ":99")
638 (add-after 'unpack 'replace-fhs-paths
640 (substitute* (cons "Makefile.decl"
641 (find-files "." "^Makefile\\.in$"))
642 (("/bin/ls") (which "ls"))
643 (("/usr/bin/env") (which "env")))
645 ;; These libraries are listed in the "Required" section of the pkg-config
648 `(("librsvg" ,librsvg)
652 ("python2-enum34" ,python2-enum34)))
654 `(("gdk-pixbuf" ,gdk-pixbuf)
655 ("libpng" ,libpng-1.2)
656 ("readline" ,readline)
657 ("libcroco" ,libcroco)
659 ("cython" ,python2-cython)))
661 `(("pandoc" ,ghc-pandoc)
665 ("graphviz" ,graphviz)
666 ("intltool" ,intltool)
667 ("pkg-config" ,pkg-config)
668 ("xvfb" ,xorg-server)))
669 (home-page "https://rapicorn.testbit.org/")
670 (synopsis "Toolkit for rapid development of user interfaces")
672 "Rapicorn is a toolkit for rapid development of user interfaces in C++
673 and Python. The user interface is designed in a declarative markup language
674 and is connected to the programming logic using data bindings and commands.")
675 (license license:mpl2.0)))
683 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
687 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
688 (build-system cmake-build-system)
689 (arguments '(#:tests? #f)) ;no 'test' target
691 ;; Headers include OpenEXR and IlmBase headers.
692 (propagated-inputs `(("openexr" ,openexr)))
694 (home-page "http://ampasctl.sourceforge.net")
695 (synopsis "Color Transformation Language")
697 "The Color Transformation Language, or CTL, is a small programming
698 language that was designed to serve as a building block for digital color
699 management systems. CTL allows users to describe color transforms in a
700 concise and unambiguous way by expressing them as programs. In order to apply
701 a given transform to an image, the color management system instructs a CTL
702 interpreter to load and run the CTL program that describes the transform. The
703 original and the transformed image constitute the CTL program's input and
706 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
707 ;; and headers use different wording.
708 (license (license:non-copyleft "file://LICENSE"))))
710 (define-public brdf-explorer
711 ;; There are no release tarballs, and not even tags in the repo,
712 ;; so use the latest revision.
713 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
716 (name "brdf-explorer")
717 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
721 (url "https://github.com/wdas/brdf.git")
725 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
726 (file-name (string-append name "-" version "-checkout"))))
727 (build-system gnu-build-system)
729 `(#:phases (modify-phases %standard-phases
731 (lambda* (#:key outputs #:allow-other-keys)
732 (let ((out (assoc-ref outputs "out")))
734 (string-append "prefix=" out)))))
735 (add-after 'install 'wrap-program
736 (lambda* (#:key outputs #:allow-other-keys)
737 (let* ((out (assoc-ref outputs "out"))
738 (bin (string-append out "/bin"))
741 (with-directory-excursion bin
742 (rename-file "brdf" ".brdf-real")
743 (call-with-output-file "brdf"
745 (format port "#!/bin/sh
746 # Run the thing from its home, otherwise it just bails out.
748 exec -a \"$0\" ~a/.brdf-real~%"
750 (chmod "brdf" #o555)))
753 `(("qttools" ,qttools))) ;for 'qmake'
758 ("freeglut" ,freeglut)
760 (home-page "http://www.disneyanimation.com/technology/brdf.html")
762 "Analyze bidirectional reflectance distribution functions (BRDFs)")
764 "BRDF Explorer is an application that allows the development and analysis
765 of bidirectional reflectance distribution functions (BRDFs). It can load and
766 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
767 language), measured material data from the MERL database, and anisotropic
768 measured material data from MIT CSAIL. Graphs and visualizations update in
769 real time as parameters are changed, making it a useful tool for evaluating
770 and understanding different BRDFs (and other component functions).")
771 (license license:ms-pl))))
779 (uri (list (string-append
780 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
783 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
786 ;; Site was discontinued.
787 (string-append "http://www.antigrain.com/agg-"
790 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
791 (patches (search-patches "agg-am_c_prototype.patch"))))
792 (build-system gnu-build-system)
795 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
797 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
799 "--disable-examples")
801 (modify-phases %standard-phases
804 ;; let's call configure from configure phase and not now
805 (substitute* "autogen.sh" (("./configure") "# ./configure"))
806 (invoke "sh" "autogen.sh"))))))
808 `(("pkg-config" ,pkg-config)
810 ("autoconf" ,autoconf)
811 ("automake" ,automake)))
814 ("freetype" ,freetype)
817 ;; Antigrain.com was discontinued.
818 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
819 (synopsis "High-quality 2D graphics rendering engine for C++")
821 "Anti-Grain Geometry is a high quality rendering engine written in C++.
822 It supports sub-pixel resolutions and anti-aliasing. It is also library for
823 rendering SVG graphics.")
824 (license license:gpl2+)))
826 (define-public python-pastel
828 (name "python-pastel")
833 (uri (pypi-uri "pastel" version))
836 "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i"))))
837 (build-system python-build-system)
839 `(("python-pytest" ,python-pytest)))
840 (home-page "https://github.com/sdispater/pastel")
841 (synopsis "Library to colorize strings in your terminal")
842 (description "Pastel is a simple library to help you colorize strings in
843 your terminal. It comes bundled with predefined styles:
846 @item comment: yellow
847 @item question: black on cyan
848 @item error: white on red
851 (license license:expat)))
853 (define-public python2-pastel
854 (package-with-python2 python-pastel))
856 (define-public fgallery
864 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
865 "fgallery-" version ".zip"))
868 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
869 (build-system gnu-build-system)
871 `(#:tests? #f ; no tests
873 (modify-phases %standard-phases
877 (lambda* (#:key inputs outputs #:allow-other-keys)
878 (let* ((out (assoc-ref outputs "out"))
879 (bin (string-append out "/bin/"))
880 (share (string-append out "/share/fgallery"))
881 (man (string-append out "/share/man/man1"))
882 (perl5lib (getenv "PERL5LIB"))
883 (script (string-append share "/fgallery")))
884 (define (bin-directory input-name)
885 (string-append (assoc-ref inputs input-name) "/bin"))
888 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
891 (copy-recursively "." share)
893 ;; fgallery copies files from store when it is run. The
894 ;; read-only permissions from the store directories will cause
895 ;; fgallery to fail. Do not preserve file attributes when
896 ;; copying files to prevent it.
899 "'cp', '--no-preserve=all'"))
902 (symlink script (string-append out "/bin/fgallery"))
906 ,(map bin-directory '("imagemagick"
914 `("PERL5LIB" ":" prefix (,perl5lib)))
918 ;; TODO: Add missing optional dependency: facedetect.
920 `(("imagemagick" ,imagemagick)
926 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
927 ("perl-image-exiftool" ,perl-image-exiftool)
928 ("jpegoptim" ,jpegoptim)
929 ("pngcrush" ,pngcrush)
931 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
932 (synopsis "Static photo gallery generator")
934 "FGallery is a static, JavaScript photo gallery generator with minimalist
935 look. The result can be uploaded on any web server without additional
937 (license license:gpl2+)))