summaryrefslogtreecommitdiff
path: root/gnu/packages/gl.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/gl.scm')
-rw-r--r--gnu/packages/gl.scm55
1 files changed, 50 insertions, 5 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index afda76d792b..d1503e17307 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> 2;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
3;;; Copyright © 2013 Joshua Grant <tadni@riseup.net> 3;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
4;;; Copyright © 2014 David Thompson <davet@gnu.org> 4;;; Copyright © 2014 David Thompson <davet@gnu.org>
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
@@ -40,7 +40,8 @@
40 #:use-module (gnu packages fontutils) 40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages guile) 41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages video) 42 #:use-module (gnu packages video)
43 #:use-module (gnu packages xdisorg)) 43 #:use-module (gnu packages xdisorg)
44 #:use-module (gnu packages zip))
44 45
45(define-public glu 46(define-public glu
46 (package 47 (package
@@ -53,7 +54,8 @@
53 (sha256 54 (sha256
54 (base32 "0r72yyhj09x3krn3kn629jqbwyq50ji8w5ri2pn6zwrk35m4g1s3")))) 55 (base32 "0r72yyhj09x3krn3kn629jqbwyq50ji8w5ri2pn6zwrk35m4g1s3"))))
55 (build-system gnu-build-system) 56 (build-system gnu-build-system)
56 (inputs `(("mesa" ,mesa))) 57 (propagated-inputs
58 `(("mesa" ,mesa))) ; according to glu.pc
57 (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm") 59 (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm")
58 (synopsis "Mesa OpenGL Utility library") 60 (synopsis "Mesa OpenGL Utility library")
59 (description 61 (description
@@ -219,7 +221,7 @@ also known as DXTn or DXTC) for Mesa.")
219 (arguments 221 (arguments
220 `(#:configure-flags 222 `(#:configure-flags
221 '(;; drop r300 from default gallium drivers, as it requires llvm 223 '(;; drop r300 from default gallium drivers, as it requires llvm
222 "--with-gallium-drivers=r600,svga,swrast" 224 "--with-gallium-drivers=r600,svga,swrast,nouveau"
223 ;; Enable various optional features. TODO: opencl requires libclc, 225 ;; Enable various optional features. TODO: opencl requires libclc,
224 ;; omx requires libomxil-bellagio 226 ;; omx requires libomxil-bellagio
225 "--with-egl-platforms=x11,drm" 227 "--with-egl-platforms=x11,drm"
@@ -403,6 +405,7 @@ extension functionality is exposed in a single header file.")
403 (native-inputs `(("pkg-config" ,pkg-config))) 405 (native-inputs `(("pkg-config" ,pkg-config)))
404 (inputs `(("guile" ,guile-2.0) 406 (inputs `(("guile" ,guile-2.0)
405 ("mesa" ,mesa) 407 ("mesa" ,mesa)
408 ("glu" ,glu)
406 ("freeglut" ,freeglut))) 409 ("freeglut" ,freeglut)))
407 (arguments 410 (arguments
408 '(#:phases (alist-cons-before 411 '(#:phases (alist-cons-before
@@ -417,7 +420,7 @@ extension functionality is exposed in a single header file.")
417 ;; Replace dynamic-link calls for libGL, libGLU, and 420 ;; Replace dynamic-link calls for libGL, libGLU, and
418 ;; libglut with absolute paths to the store. 421 ;; libglut with absolute paths to the store.
419 (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa") 422 (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa")
420 (dynamic-link-substitute "glu/runtime.scm" "GLU" "mesa") 423 (dynamic-link-substitute "glu/runtime.scm" "GLU" "glu")
421 (dynamic-link-substitute "glut/runtime.scm" "glut" 424 (dynamic-link-substitute "glut/runtime.scm" "glut"
422 "freeglut")) 425 "freeglut"))
423 %standard-phases))) 426 %standard-phases)))
@@ -484,3 +487,45 @@ OpenGL graphics API.")
484 (description 487 (description
485 "A library for handling OpenGL function pointer management.") 488 "A library for handling OpenGL function pointer management.")
486 (license l:x11))) 489 (license l:x11)))
490
491(define-public soil
492 (package
493 (name "soil")
494 (version "1.0.7")
495 (source (origin
496 (method url-fetch)
497 ;; No versioned archive available.
498 (uri "http://www.lonesock.net/files/soil.zip")
499 (sha256
500 (base32
501 "00gpwp9dldzhsdhksjvmbhsd2ialraqbv6v6dpikdmpncj6mnc52"))))
502 (build-system gnu-build-system)
503 (arguments
504 '(#:tests? #f ; no tests
505 #:phases (modify-phases %standard-phases
506 (delete 'configure)
507 (add-before 'build 'init-build
508 (lambda* (#:key outputs #:allow-other-keys)
509 (let ((out (assoc-ref outputs "out")))
510 (setenv "CFLAGS" "-fPIC") ; needed for shared library
511 ;; Use alternate Makefile
512 (copy-file "projects/makefile/alternate Makefile.txt"
513 "src/Makefile")
514 (chdir "src")
515 (substitute* '("Makefile")
516 (("INCLUDEDIR = /usr/include/SOIL")
517 (string-append "INCLUDEDIR = " out "/include/SOIL"))
518 (("LIBDIR = /usr/lib")
519 (string-append "LIBDIR = " out "/lib"))
520 ;; Remove these flags from 'install' commands.
521 (("-o root -g root") ""))))))))
522 (native-inputs
523 `(("unzip" ,unzip)))
524 (inputs
525 `(("mesa" ,mesa)))
526 (home-page "http://www.lonesock.net/soil.html")
527 (synopsis "OpenGL texture loading library")
528 (description
529 "SOIL is a tiny C library used primarily for uploading textures into
530OpenGL.")
531 (license l:public-domain)))