You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
11 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ludovic Courtès <>
;;; Copyright © 2015 Tomáš Čech <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages graphics)
#:use-module (guix download)
#:use-module (guix svn-download)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages compression)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages boost)
#:use-module (gnu packages gl)
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages xorg))
(define-public cgal
(name "cgal")
(version "4.5.1")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.xz"))
(build-system cmake-build-system)
'(;; "RelWithDebInfo" is not supported.
#:build-type "Release"
;; No 'test' target.
#:tests? #f))
`(("mpfr" ,mpfr)
("gmp" ,gmp)
("boost" ,boost)))
(home-page "")
(synopsis "Computational geometry algorithms library")
"CGAL provides easy access to efficient and reliable geometric algorithms
in the form of a C++ library. CGAL is used in various areas needing geometric
computation, such as: computer graphics, scientific visualization, computer
aided design and modeling, geographic information systems, molecular biology,
medical imaging, robotics and motion planning, mesh generation, numerical
methods, etc. It provides data structures and algorithms such as
triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
many more.")
;; The 'LICENSE' file explains that a subset is available under more
;; permissive licenses.
(license license:gpl3+)))
(define-public ilmbase
(name "ilmbase")
(version "2.2.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/openexr/ilmbase-"
version ".tar.gz"))
(build-system gnu-build-system)
(home-page "")
(synopsis "Utility C++ libraries for threads, maths, and exceptions")
"IlmBase provides several utility libraries for C++. Half is a class
that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
quaternions and other useful 2D and 3D math functions. Iex is an
exception-handling library.")
(license license:bsd-3)))
(define-public openexr
(name "openexr")
(version "2.2.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/openexr/openexr-"
version ".tar.gz"))
(modules '((guix build utils)))
'(substitute* (find-files "." "tmpDir\\.h")
(patches (list (search-patch "openexr-missing-samples.patch")))))
(build-system gnu-build-system)
`(("pkg-config" ,pkg-config)))
`(("ilmbase" ,ilmbase) ;used in public headers
("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
(home-page "")
(synopsis "High-dynamic range file format library")
"OpenEXR is a high dynamic-range (HDR) image file format developed for
use in computer imaging applications. The IlmImf C++ libraries support
storage of the \"EXR\" file format for storing 16-bit floating-point images.")
(license license:bsd-3)))
(define-public ctl
(name "ctl")
(version "1.5.2")
(source (origin
(method url-fetch)
(uri (string-append ""
version ".tar.gz"))
(build-system cmake-build-system)
(arguments '(#:tests? #f)) ;no 'test' target
;; Headers include OpenEXR and IlmBase headers.
(propagated-inputs `(("openexr" ,openexr)))
(home-page "")
(synopsis "Color Transformation Language")
"The Color Transformation Language, or CTL, is a small programming
language that was designed to serve as a building block for digital color
management systems. CTL allows users to describe color transforms in a
concise and unambiguous way by expressing them as programs. In order to apply
a given transform to an image, the color management system instructs a CTL
interpreter to load and run the CTL program that describes the transform. The
original and the transformed image constitute the CTL program's input and
;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
;; and headers use different wording.
(license (license:non-copyleft "file://LICENSE"))))
(define-public brdf-explorer
(name "brdf-explorer")
(version "17") ;svn revision
(source (origin
;; There are no release tarballs, and not even tags in the repo,
;; so use the latest revision.
(method svn-fetch)
(uri (svn-reference
(url "")
(revision (string->number version))))
(file-name (string-append name "-" version "-checkout"))))
(build-system gnu-build-system)
`(#:phases (modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(chdir "trunk")
(zero? (system* "qmake"
"prefix=" out))))))
(add-after 'install 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(data (string-append
out "/share/brdf")))
(with-directory-excursion bin
(rename-file "brdf" ".brdf-real")
(call-with-output-file "brdf"
(lambda (port)
(format port "#!/bin/sh
# Run the thing from its home, otherwise it just bails out.
cd \"~a\"
exec -a \"$0\" ~a/.brdf-real~%"
data bin)))
(chmod "brdf" #o555))))))))
`(("qt" ,qt-4))) ;for 'qmake'
`(("qt" ,qt-4)
("mesa" ,mesa)
("glew" ,glew)
("freeglut" ,freeglut)
("zlib" ,zlib)))
(home-page "")
"Analyze bidirectional reflectance distribution functions (BRDFs)")
"BRDF Explorer is an application that allows the development and analysis
of bidirectional reflectance distribution functions (BRDFs). It can load and
plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
language), measured material data from the MERL database, and anisotropic
measured material data from MIT CSAIL. Graphs and visualizations update in
real time as parameters are changed, making it a useful tool for evaluating
and understanding different BRDFs (and other component functions).")
(license license:ms-pl)))
(define-public agg
(name "agg")
(version "2.5")
(source (origin
(method url-fetch)
(uri (string-append ""
version ".tar.gz"))
(base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
(patches (list (search-patch "agg-am_c_prototype.patch")))))
(build-system gnu-build-system)
(list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
(string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
'unpack 'autoreconf
(lambda _
;; let's call configure from configure phase and not now
(substitute* "" (("./configure") "# ./configure"))
(zero? (system* "sh" "")))
`(("pkg-config" ,pkg-config)
("libtool" ,libtool)
("autoconf" ,autoconf)
("automake" ,automake)
("bash" ,bash)))
`(("libx11" ,libx11)
("freetype" ,freetype)
("sdl" ,sdl)))
(home-page "")
(synopsis "High-quality 2D graphics rendering engine for C++")
"Anti-Grain Geometry is a high quality rendering engine written in C++.
It supports sub-pixel resolutions and anti-aliasing. It is also library for
rendering SVG graphics.")
(license license:gpl2+)))