aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/graphics.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/graphics.scm')
-rw-r--r--gnu/packages/graphics.scm119
1 files changed, 117 insertions, 2 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index c5ccfc271b..c92dd1b354 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -18,15 +18,24 @@
(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 boost)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages xorg))
(define-public cgal
(package
@@ -151,4 +160,110 @@ output.")
;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
;; and headers use different wording.
- (license (license:bsd-style "file://LICENSE"))))
+ (license (license:non-copyleft "file://LICENSE"))))
+
+(define-public brdf-explorer
+ (package
+ (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 "http://github.com/wdas/brdf")
+ (revision (string->number version))))
+ (sha256
+ (base32
+ "1458fwsqxramh0gpnp24x7brfpl9afhvr1wqg6c78xqwf32960m5"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (chdir "trunk")
+ (zero? (system* "qmake"
+ (string-append
+ "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))))))))
+ (native-inputs
+ `(("qt" ,qt-4))) ;for 'qmake'
+ (inputs
+ `(("qt" ,qt-4)
+ ("mesa" ,mesa)
+ ("glew" ,glew)
+ ("freeglut" ,freeglut)
+ ("zlib" ,zlib)))
+ (home-page "http://www.disneyanimation.com/technology/brdf.html")
+ (synopsis
+ "Analyze bidirectional reflectance distribution functions (BRDFs)")
+ (description
+ "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
+ (package
+ (name "agg")
+ (version "2.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.antigrain.com/agg-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
+ (patches (list (search-patch "agg-am_c_prototype.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags
+ (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
+ "/include")
+ (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
+ "/lib"))
+ #:phases
+ (alist-cons-after
+ 'unpack 'autoreconf
+ (lambda _
+ ;; let's call configure from configure phase and not now
+ (substitute* "autogen.sh" (("./configure") "# ./configure"))
+ (zero? (system* "sh" "autogen.sh")))
+ %standard-phases)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("libtool" ,libtool)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bash" ,bash)))
+ (inputs
+ `(("libx11" ,libx11)
+ ("freetype" ,freetype)
+ ("sdl" ,sdl)))
+ (home-page "http://antigrain.com")
+ (synopsis "High-quality 2D graphics rendering engine for C++")
+ (description
+ "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+)))