Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / gl.scm
CommitLineData
daca8666 1;;; GNU Guix --- Functional package management for GNU
187731a5 2;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
822efdff 3;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
7025a035 4;;; Copyright © 2014 David Thompson <davet@gnu.org>
9bbd52e5 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
daca8666
JG
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages gl)
b021a2ad 23 #:use-module (gnu packages autotools)
200726ed
JD
24 #:use-module (gnu packages bison)
25 #:use-module (gnu packages flex)
3a92a5b3
DC
26 #:use-module (gnu packages fontutils)
27 #:use-module (gnu packages freedesktop)
ce4d7abf 28 #:use-module (gnu packages gettext)
3a92a5b3 29 #:use-module (gnu packages guile)
ce4d7abf 30 #:use-module (gnu packages linux)
3a92a5b3 31 #:use-module (gnu packages pkg-config)
200726ed 32 #:use-module (gnu packages python)
7e31978b 33 #:use-module (gnu packages video)
2b226af1 34 #:use-module (gnu packages xdisorg)
3a92a5b3
DC
35 #:use-module (gnu packages xml)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages zip)
38 #:use-module (guix download)
39 #:use-module (guix build utils)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system cmake)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix utils)
45 #:use-module (ice-9 match))
daca8666
JG
46
47(define-public glu
48 (package
49 (name "glu")
50 (version "9.0.0")
51 (source (origin
a124bbd2
SB
52 (method url-fetch)
53 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-"
54 version ".tar.gz"))
55 (sha256
56 (base32
57 "0r72yyhj09x3krn3kn629jqbwyq50ji8w5ri2pn6zwrk35m4g1s3"))))
daca8666 58 (build-system gnu-build-system)
187731a5 59 (propagated-inputs
a124bbd2 60 `(("mesa" ,mesa))) ; according to glu.pc
daca8666
JG
61 (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm")
62 (synopsis "Mesa OpenGL Utility library")
63 (description
64 "GLU, or OpenGL Utility Library provides some higher-level functionality
35b9e423 65not provided by just OpenGL itself. Some of GLU's Features
daca8666
JG
66include: Scaling of 2D images and creation of mipmap pyramids,
67Transformation of object coordinates into device coordinates and
68vice versa, Support for NURBS surfaces, Support for tessellation
69of concave or bow tie polygonal primitives, Specialty transformation
70matrices for creating perspective and orthographic projections,
71positioning a camera, and selection/picking, Rendering of disk,
72cylinder, and sphere primitives, Interpreting OpenGL error values
73as ASCII text.")
584f2e1b 74 (license (license:x11-style "http://directory.fsf.org/wiki/License:SGIFreeBv2"))))
daca8666
JG
75
76(define-public freeglut
77 (package
78 (name "freeglut")
8ce36e81 79 (version "3.0.0")
daca8666 80 (source (origin
a124bbd2
SB
81 (method url-fetch)
82 (uri (string-append
0f971a04 83 "mirror://sourceforge/freeglut/freeglut/"
a124bbd2
SB
84 version "/freeglut-" version ".tar.gz"))
85 (sha256
86 (base32
87 "18knkyczzwbmyg8hr4zh8a1i5ga01np2jzd1rwmsh7mh2n2vwhra"))))
8ce36e81
SB
88 (build-system cmake-build-system)
89 (arguments '(#:tests? #f)) ; no test target
daca8666 90 (inputs `(("mesa" ,mesa)
a124bbd2
SB
91 ("libx11" ,libx11)
92 ("libxi" ,libxi)
93 ("libxrandr" ,libxrandr)
94 ("libxxf86vm" ,libxxf86vm)
95 ("inputproto" ,inputproto)
96 ("xinput" ,xinput)))
9b5db9be
TUBK
97 (propagated-inputs
98 ;; Headers from Mesa and GLU are needed.
99 `(("glu" ,glu)
100 ("mesa" ,mesa)))
daca8666
JG
101 (home-page "http://freeglut.sourceforge.net/")
102 (synopsis "Alternative to the OpenGL Utility Toolkit (GLUT)")
103 (description
104 "Freeglut is a completely Free/OpenSourced alternative to
35b9e423 105the OpenGL Utility Toolkit (GLUT) library. GLUT was originally
daca8666 106written by Mark Kilgard to support the sample programs in the
35b9e423 107second edition OpenGL 'RedBook'. Since then, GLUT has been used
daca8666
JG
108in a wide variety of practical applications because it is simple,
109widely available and highly portable.
110
111GLUT (and hence freeglut) allows the user to create and manage windows
112containing OpenGL contexts on a wide range of platforms and also read
35b9e423 113the mouse, keyboard and joystick functions. Freeglut is released under
daca8666 114the X-Consortium license.")
584f2e1b 115 (license license:x11)))
daca8666
JG
116
117(define-public ftgl
118 (package
119 (name "ftgl")
120 (version "2.1.3-rc5")
121 (source (origin
a124bbd2
SB
122 (method url-fetch)
123 (uri (string-append
0f971a04 124 "mirror://sourceforge/ftgl/FTGL%20Source/2.1.3~rc5/"
a124bbd2
SB
125 "ftgl-" version ".tar.gz"))
126 (sha256
127 (base32
128 "0nsn4s6vnv5xcgxcw6q031amvh2zfj2smy1r5mbnjj2548hxcn2l"))))
daca8666 129 (build-system gnu-build-system)
9e850534
RW
130 ;; The pkg-config file lists "freetype2" as Requires.private.
131 (propagated-inputs `(("freetype" ,freetype)))
132 (inputs `(("libx11" ,libx11)
a124bbd2
SB
133 ("mesa" ,mesa)
134 ("glu" ,glu)))
daca8666
JG
135 (home-page "http://ftgl.sourceforge.net")
136 (synopsis "Font rendering library for OpenGL applications")
137 (description
35b9e423 138 "FTGL is a font rendering library for OpenGL applications. Supported
daca8666 139rendering modes are: Bitmaps, Anti-aliased pixmaps, Texture maps, Outlines,
e881752c 140Polygon meshes, and Extruded polygon meshes.")
584f2e1b 141 (license license:x11)))
200726ed 142
b021a2ad
TUBK
143(define-public s2tc
144 (package
145 (name "s2tc")
146 (version "1.0")
147 (source
148 (origin
149 (method url-fetch)
150 (uri (string-append
151 "https://github.com/divVerent/s2tc/archive/v" version ".tar.gz"))
152 (sha256
153 (base32 "0ibfdib277fhbqvxzan0bmglwnsl1y1rw2g8skvz82l1sfmmn752"))
154 (file-name (string-append name "-" version ".tar.gz"))))
155 (build-system gnu-build-system)
156 (native-inputs
157 `(("autoconf" ,autoconf)
158 ("automake" ,automake)
159 ("libtool" ,libtool)))
160 (inputs
161 `(("mesa-headers" ,mesa-headers)))
162 (arguments
163 '(#:phases
164 (modify-phases %standard-phases
f8503e2b 165 (add-after 'unpack 'autogen
b021a2ad
TUBK
166 (lambda _
167 (zero? (system* "sh" "autogen.sh")))))))
168 (home-page "https://github.com/divVerent/s2tc")
169 (synopsis "S3 Texture Compression implementation")
170 (description
171 "S2TC is a patent-free implementation of S3 Texture Compression (S3TC,
172also known as DXTn or DXTC) for Mesa.")
584f2e1b 173 (license license:expat)))
b021a2ad 174
7e31978b
TUBK
175;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation;
176;;; LibVA itself depends on Mesa. We use the following to solve the circular
177;;; dependency.
178(define libva-without-mesa
179 ;; Delay to work around circular import problem.
180 (delay
181 (package
182 (inherit libva)
183 (name "libva-without-mesa")
184 (inputs (alist-delete "mesa" (package-inputs libva)))
185 (arguments
186 (strip-keyword-arguments
187 '(#:make-flags)
188 (substitute-keyword-arguments (package-arguments libva)
189 ((#:configure-flags flags)
190 '(list "--disable-glx" "--disable-egl"))))))))
191
200726ed
JD
192(define-public mesa
193 (package
194 (name "mesa")
ffc95993 195 (version "11.0.9")
200726ed
JD
196 (source
197 (origin
198 (method url-fetch)
ce4d7abf 199 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
0272ee49 200 version "/mesa-" version ".tar.xz"))
200726ed 201 (sha256
ce4d7abf 202 (base32
ffc95993 203 "009b3nq8ly5nzy9cxi9cxf4qasrhggjz0v0q87rwq5kaqvqjy9m1"))))
200726ed
JD
204 (build-system gnu-build-system)
205 (propagated-inputs
206 `(("glproto" ,glproto)
45191970 207 ;; The following are in the Requires.private field of gl.pc.
ce4d7abf 208 ("libdrm" ,libdrm)
8bb1699b 209 ("libx11" ,libx11)
200726ed 210 ("libxdamage" ,libxdamage)
45191970
TUBK
211 ("libxfixes" ,libxfixes)
212 ("libxshmfence" ,libxshmfence)
200726ed 213 ("libxxf86vm" ,libxxf86vm)))
0272ee49 214 ;; TODO: Add vdpau.
200726ed 215 (inputs
ce4d7abf
MW
216 `(("udev" ,eudev)
217 ("dri2proto" ,dri2proto)
218 ("dri3proto" ,dri3proto)
219 ("presentproto" ,presentproto)
200726ed 220 ("expat" ,expat)
7e31978b 221 ("libva" ,(force libva-without-mesa))
200726ed 222 ("libxml2" ,libxml2)
ce4d7abf 223 ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
0272ee49 224 ("libxvmc" ,libxvmc)
3e71b9ff
TUBK
225 ("makedepend" ,makedepend)
226 ("s2tc" ,s2tc)))
200726ed 227 (native-inputs
0272ee49 228 `(("pkg-config" ,pkg-config)))
200726ed 229 (arguments
ce4d7abf 230 `(#:configure-flags
0f481f06 231 '(;; drop r300 from default gallium drivers, as it requires llvm
f4d8f855 232 "--with-gallium-drivers=r600,svga,swrast,nouveau"
3e2570d8
TUBK
233 ;; Enable various optional features. TODO: opencl requires libclc,
234 ;; omx requires libomxil-bellagio
235 "--with-egl-platforms=x11,drm"
236 "--enable-glx-tls" ;Thread Local Storage, improves performance
237 ;; "--enable-opencl"
238 ;; "--enable-omx"
239 "--enable-osmesa"
0f481f06
MW
240 "--enable-xa"
241
242 ;; on non-intel systems, drop i915 and i965
243 ;; from the default dri drivers
244 ,@(match (%current-system)
245 ((or "x86_64-linux" "i686-linux")
246 '())
247 (_
248 '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
ce4d7abf 249 #:phases (alist-cons-after
0272ee49 250 'unpack 'patch-create_test_cases
ce4d7abf 251 (lambda _
0272ee49
TUBK
252 (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py"
253 (("/usr/bin/env bash") (which "bash"))))
254 (alist-cons-before
255 'build 'fix-dlopen-libnames
256 (lambda* (#:key inputs outputs #:allow-other-keys)
257 (let ((s2tc (assoc-ref inputs "s2tc"))
258 (udev (assoc-ref inputs "udev"))
259 (out (assoc-ref outputs "out")))
260 ;; Remain agnostic to .so.X.Y.Z versions while doing
261 ;; the substitutions so we're future-safe.
262 (substitute*
263 '("src/gallium/auxiliary/util/u_format_s3tc.c"
264 "src/mesa/main/texcompress_s3tc.c")
265 (("\"libtxc_dxtn\\.so")
266 (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
0272ee49 267 (substitute* "src/loader/loader.c"
20848f36
SB
268 (("udev_handle = dlopen\\(name")
269 (string-append "udev_handle = dlopen(\""
270 udev "/lib/libudev.so\"")))
0272ee49
TUBK
271 (substitute* "src/glx/dri_common.c"
272 (("dlopen\\(\"libGL\\.so")
273 (string-append "dlopen(\"" out "/lib/libGL.so")))
274 (substitute* "src/egl/drivers/dri2/egl_dri2.c"
275 (("\"libglapi\\.so")
276 (string-append "\"" out "/lib/libglapi.so")))
277 (substitute* "src/gbm/main/backend.c"
278 ;; No need to patch the gbm_gallium_drm.so reference;
279 ;; it's never installed since Mesa removed its
280 ;; egl_gallium support.
281 (("\"gbm_dri\\.so")
282 (string-append "\"" out "/lib/dri/gbm_dri.so")))))
283 %standard-phases))))
200726ed 284 (home-page "http://mesa3d.org/")
35b9e423 285 (synopsis "OpenGL implementation")
200726ed 286 (description "Mesa is a free implementation of the OpenGL specification -
35b9e423 287a system for rendering interactive 3D graphics. A variety of device drivers
200726ed
JD
288allows Mesa to be used in many different environments ranging from software
289emulation to complete hardware acceleration for modern GPUs.")
584f2e1b 290 (license license:x11)))
7025a035 291
b021a2ad
TUBK
292(define-public mesa-headers
293 (package
294 (inherit mesa)
295 (name "mesa-headers")
296 (propagated-inputs '())
297 (inputs '())
298 (native-inputs '())
299 (arguments
300 '(#:phases
301 (modify-phases %standard-phases
f8503e2b
LC
302 (delete 'configure)
303 (delete 'build)
304 (delete 'check)
305 (replace 'install
b021a2ad
TUBK
306 (lambda* (#:key outputs #:allow-other-keys)
307 (copy-recursively "include" (string-append
308 (assoc-ref outputs "out")
309 "/include")))))))))
310
c90a50eb
TUBK
311;;; The mesa-demos distribution contains non-free files, many files with no
312;;; clear license information, and many demos that aren't useful for most
313;;; people, so we just use this for the mesa-utils package below, and possibly
314;;; other packages in the future. This is modeled after Debian's solution.
315(define (mesa-demos-source version)
316 (origin
317 (method url-fetch)
318 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/demos/" version
319 "/mesa-demos-" version ".tar.bz2"))
7fe3f8cf 320 (sha256 (base32 "1vqb7s5m3fcg2csbiz45mha1pys2xx6rhw94fcyvapqdpm5iawy1"))))
c90a50eb
TUBK
321
322(define-public mesa-utils
323 (package
324 (name "mesa-utils")
7fe3f8cf 325 (version "8.3.0")
c90a50eb
TUBK
326 (source (mesa-demos-source version))
327 (build-system gnu-build-system)
328 (inputs
329 `(("mesa" ,mesa)
330 ("glut" ,freeglut)
331 ("glew" ,glew)))
332 (native-inputs
333 `(("pkg-config" ,pkg-config)))
334 (arguments
7fe3f8cf 335 '(#:phases
c90a50eb
TUBK
336 (modify-phases %standard-phases
337 (replace
f8503e2b 338 'install
c90a50eb
TUBK
339 (lambda* (#:key outputs #:allow-other-keys)
340 (let ((out (assoc-ref outputs "out")))
341 (mkdir-p (string-append out "/bin"))
342 (for-each
343 (lambda (file)
344 (copy-file file (string-append out "/bin/" (basename file))))
345 '("src/xdemos/glxdemo" "src/xdemos/glxgears"
346 "src/xdemos/glxinfo" "src/xdemos/glxheads"))))))))
347 (home-page "http://mesa3d.org/")
348 (synopsis "Utility tools for Mesa")
349 (description
350 "The mesa-utils package contains several utility tools for Mesa: glxdemo,
351glxgears, glxheads, and glxinfo.")
352 ;; glxdemo is public domain; others expat.
584f2e1b 353 (license (list license:expat license:public-domain))))
c90a50eb 354
524f4bec
LC
355(define-public glew
356 (package
357 (name "glew")
358 (version "1.11.0")
359 (source (origin
360 (method url-fetch)
de67e922
LF
361 (uri (string-append "mirror://sourceforge/glew/glew/" version
362 "/glew-" version ".tgz"))
524f4bec
LC
363 (sha256
364 (base32
365 "1mhkllxz49l1x680dmzrv2i82qjrq017sykah3xc90f2d8qcxfv9"))
366 (modules '((guix build utils)))
367 (snippet
368 '(substitute* "config/Makefile.linux"
369 (("= cc") "= gcc")
370 (("/lib64") "/lib")))))
371 (build-system gnu-build-system)
372 (arguments
373 '(#:phases (alist-delete 'configure %standard-phases)
374 #:make-flags (list (string-append "GLEW_PREFIX="
375 (assoc-ref %outputs "out"))
376 (string-append "GLEW_DEST="
377 (assoc-ref %outputs "out")))
378 #:tests? #f)) ;no 'check' target
379 (inputs
380 `(("libxi" ,libxi)
381 ("libxmu" ,libxmu)
382 ("libx11" ,libx11)
383 ("mesa" ,mesa)))
384
385 ;; <GL/glew.h> includes <GL/glu.h>.
386 (propagated-inputs `(("glu" ,glu)))
387
388 (home-page "http://glew.sourceforge.net/")
389 (synopsis "OpenGL extension loading library for C and C++")
390 (description
391 "The OpenGL Extension Wrangler Library (GLEW) is a C/C++ extension
392loading library. GLEW provides efficient run-time mechanisms for determining
393which OpenGL extensions are supported on the target platform. OpenGL core and
394extension functionality is exposed in a single header file.")
584f2e1b 395 (license license:bsd-3)))
524f4bec 396
7025a035
DT
397(define-public guile-opengl
398 (package
399 (name "guile-opengl")
400 (version "0.1.0")
401 (source (origin
402 (method url-fetch)
403 (uri (string-append "mirror://gnu/guile-opengl/guile-opengl-"
404 version ".tar.gz"))
405 (sha256
406 (base32
407 "13qfx4xh8baryxqrv986l848ygd0piqwm6s2s90pxk9c0m9vklim"))))
408 (build-system gnu-build-system)
409 (native-inputs `(("pkg-config" ,pkg-config)))
410 (inputs `(("guile" ,guile-2.0)
411 ("mesa" ,mesa)
4becc792 412 ("glu" ,glu)
7025a035
DT
413 ("freeglut" ,freeglut)))
414 (arguments
0e215f49
DT
415 '(#:phases (modify-phases %standard-phases
416 (add-after 'configure 'patch-makefile
417 (lambda _
418 ;; Install compiled Guile files in the expected place.
419 (substitute* '("Makefile")
420 (("^godir = .*$")
421 "godir = $(moddir)\n"))))
422 (add-before 'build 'patch-dynamic-link
423 (lambda* (#:key inputs outputs #:allow-other-keys)
424 (define (dynamic-link-substitute file lib input)
425 (substitute* file
426 (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib)
427 (string-append "dynamic-link \""
428 (assoc-ref inputs input)
429 "/lib/lib" lib "\""))))
430 ;; Replace dynamic-link calls for libGL, libGLU, and
431 ;; libglut with absolute paths to the store.
432 (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa")
433 (dynamic-link-substitute "glu/runtime.scm" "GLU" "glu")
434 (dynamic-link-substitute "glut/runtime.scm" "glut"
435 "freeglut"))))))
7025a035 436 (home-page "http://gnu.org/s/guile-opengl")
66672a45 437 (synopsis "Guile binding for the OpenGL graphics API")
7025a035 438 (description
66672a45
LC
439 "Guile-OpenGL is a library for Guile that provides bindings to the
440OpenGL graphics API.")
584f2e1b 441 (license license:lgpl3+)))
131ddf99
AW
442
443(define-public libepoxy
444 (package
445 (name "libepoxy")
f75f261f 446 (version "1.3.1")
131ddf99
AW
447 (source (origin
448 (method url-fetch)
449 (uri (string-append
450 "https://github.com/anholt/libepoxy/archive/v"
451 version
452 ".tar.gz"))
453 (file-name (string-append name "-" version ".tar.gz"))
454 (sha256
455 (base32
f75f261f 456 "1d1brhwfmlzgnphmdwlvn5wbcrxsdyzf1qfcf8nb89xqzznxs037"))))
131ddf99 457 (arguments
9bbd52e5 458 `(#:phases
131ddf99
AW
459 (alist-cons-after
460 'unpack 'autoreconf
461 (lambda _
462 (zero? (system* "autoreconf" "-vif")))
463 (alist-cons-before
464 'configure 'patch-paths
465 (lambda* (#:key inputs #:allow-other-keys)
466 (let ((python (assoc-ref inputs "python"))
467 (mesa (assoc-ref inputs "mesa")))
468 (substitute* "src/gen_dispatch.py"
469 (("/usr/bin/env python") python))
470 (substitute* (find-files "." "\\.[ch]$")
471 (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
472 (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
9bbd52e5
MW
473
474 ;; XXX On armhf systems, we must add "GLIBC_2.4" to the list of
475 ;; versions in test/dlwrap.c:dlwrap_real_dlsym. It would be
476 ;; better to make this a normal patch, but for now we do it here
477 ;; to prevent rebuilding on other platforms.
478 ,@(if (string-prefix? "arm" (or (%current-target-system)
479 (%current-system)))
480 '((substitute* '"test/dlwrap.c"
481 (("\"GLIBC_2\\.0\"") "\"GLIBC_2.0\", \"GLIBC_2.4\"")))
482 '())
131ddf99
AW
483 #t))
484 %standard-phases))))
485 (build-system gnu-build-system)
486 (native-inputs
487 `(("autoconf" ,autoconf)
488 ("automake" ,automake)
489 ("libtool" ,libtool)
490 ("pkg-config" ,pkg-config)
491 ("python" ,python)))
492 (inputs
493 `(("mesa" ,mesa)))
494 (home-page "http://github.com/anholt/libepoxy/")
495 (synopsis "A library for handling OpenGL function pointer management")
496 (description
497 "A library for handling OpenGL function pointer management.")
584f2e1b 498 (license license:x11)))
2b226af1
DT
499
500(define-public soil
501 (package
502 (name "soil")
503 (version "1.0.7")
504 (source (origin
505 (method url-fetch)
506 ;; No versioned archive available.
507 (uri "http://www.lonesock.net/files/soil.zip")
508 (sha256
509 (base32
510 "00gpwp9dldzhsdhksjvmbhsd2ialraqbv6v6dpikdmpncj6mnc52"))))
511 (build-system gnu-build-system)
512 (arguments
513 '(#:tests? #f ; no tests
514 #:phases (modify-phases %standard-phases
515 (delete 'configure)
516 (add-before 'build 'init-build
517 (lambda* (#:key outputs #:allow-other-keys)
518 (let ((out (assoc-ref outputs "out")))
519 (setenv "CFLAGS" "-fPIC") ; needed for shared library
520 ;; Use alternate Makefile
521 (copy-file "projects/makefile/alternate Makefile.txt"
522 "src/Makefile")
523 (chdir "src")
524 (substitute* '("Makefile")
525 (("INCLUDEDIR = /usr/include/SOIL")
526 (string-append "INCLUDEDIR = " out "/include/SOIL"))
527 (("LIBDIR = /usr/lib")
528 (string-append "LIBDIR = " out "/lib"))
529 ;; Remove these flags from 'install' commands.
530 (("-o root -g root") ""))))))))
531 (native-inputs
532 `(("unzip" ,unzip)))
533 (inputs
534 `(("mesa" ,mesa)))
535 (home-page "http://www.lonesock.net/soil.html")
536 (synopsis "OpenGL texture loading library")
537 (description
538 "SOIL is a tiny C library used primarily for uploading textures into
539OpenGL.")
584f2e1b 540 (license license:public-domain)))