surface: Add binding for SDL_ConvertSurfaceFormat.
[guile-sdl2.git] / guix.scm
CommitLineData
9ce20c40
DT
1;;; guile-sdl2 --- FFI bindings for SDL2
2;;; Copyright © 2015 David Thompson <davet@gnu.org>
3;;;
4;;; This file is part of guile-sdl2.
5;;;
6;;; Guile-sdl2 is free software; you can redistribute it and/or modify
7;;; it under the terms of the GNU Lesser General Public License as
8;;; published by the Free Software Foundation; either version 3 of the
9;;; License, or (at your option) any later version.
10;;;
11;;; Guile-sdl2 is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14;;; General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU Lesser General Public
17;;; License along with guile-sdl2. If not, see
18;;; <http://www.gnu.org/licenses/>.
19
20;;; Commentary:
21;;
22;; GNU Guix development package. To build and install, run:
23;;
24;; guix package -f guix.scm
25;;
26;; To use as the basis for a development environment, run:
27;;
28;; guix environment -l guix.scm
29;;
30;;; Code:
31
32(use-modules (guix packages)
33 (guix licenses)
34 (guix git-download)
35 (guix build-system gnu)
36 (gnu packages)
37 (gnu packages autotools)
38 (gnu packages guile)
39 (gnu packages pkg-config)
40 (gnu packages sdl))
41
42(package
43 (name "guile-sdl2")
44 (version "0.1")
254ea1ee
DT
45 (source (origin
46 (method git-fetch)
47 (uri (git-reference
48 (url "git://dthompson.us/guile-sdl2.git")
5db39e02 49 (commit "9bad448")))
254ea1ee
DT
50 (sha256
51 (base32
5db39e02 52 "00y9sh7ppsdcxm5bcxynqcbwinb8w1v7y8bgiprpf73gi6v4pipf"))))
9ce20c40
DT
53 (build-system gnu-build-system)
54 (arguments
254ea1ee
DT
55 '(#:configure-flags
56 (list (string-append "--with-libsdl2-prefix="
dd73061d
DT
57 (assoc-ref %build-inputs "sdl2"))
58 (string-append "--with-libsdl2-image-prefix="
59 (assoc-ref %build-inputs "sdl2-image"))
60 (string-append "--with-libsdl2-ttf-prefix="
61 (assoc-ref %build-inputs "sdl2-ttf"))
62 (string-append "--with-libsdl2-mixer-prefix="
63 (assoc-ref %build-inputs "sdl2-mixer")))
254ea1ee
DT
64 #:make-flags '("GUILE_AUTO_COMPILE=0")
65 #:phases
9ce20c40
DT
66 (modify-phases %standard-phases
67 (add-after 'unpack 'bootstrap
68 (lambda _ (zero? (system* "sh" "bootstrap")))))))
69 (native-inputs
70 `(("autoconf" ,autoconf)
71 ("automake" ,automake)
72 ("pkg-config" ,pkg-config)))
73 (inputs
74 `(("guile" ,guile-2.0)
dd73061d
DT
75 ("sdl2" ,sdl2)
76 ("sdl2-image" ,sdl2-image)
77 ("sdl2-mixer" ,sdl2-mixer)
78 ("sdl2-ttf" ,sdl2-ttf)))
9ce20c40
DT
79 (synopsis "Guile bindings for SDL2")
80 (description "Guile-sdl2 provides pure Guile Scheme bindings to the
81SDL2 C shared library via the foreign function interface.")
82 (home-page "https://git.dthompson.us/guile-sdl2.git")
83 (license lgpl3+))