summary refs log tree commit diff
path: root/gnu/packages/sdl.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-01-03 14:53:03 +0100
committerLudovic Courtès <ludo@gnu.org>2016-01-03 14:53:03 +0100
commit53334dd6e9e296e17110ebcd2b1f93f117ffe36a (patch)
tree2653db2eab9a204dab892ea8b6812cadf7209e84 /gnu/packages/sdl.scm
parent1575dcd134f4fae7255787293f4988bbd043de95 (diff)
parent51385362f76e2f823ac8d8cf720d06c386504069 (diff)
downloadguix-53334dd6e9e296e17110ebcd2b1f93f117ffe36a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/sdl.scm')
-rw-r--r--gnu/packages/sdl.scm61
1 files changed, 57 insertions, 4 deletions
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 1b64be024d..825e7db5d9 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2013, 2015 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
@@ -20,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages sdl)
+  #:use-module (ice-9 match)
   #:use-module (gnu packages)
   #:use-module ((guix licenses) #:hide (freetype))
   #:use-module (guix packages)
@@ -173,8 +174,6 @@ other supporting functions for SDL.")
                            "--disable-tif-shared"
                            "--disable-webp-shared")))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    ;; FIXME: Add webp
-    ;;
     ;; libjpeg, libpng, and libtiff are propagated inputs because the
     ;; SDL_image headers include the headers of these libraries.  SDL is a
     ;; propagated input because the pkg-config file refers to SDL's pkg-config
@@ -182,7 +181,8 @@ other supporting functions for SDL.")
     (propagated-inputs `(("sdl" ,sdl)
                          ("libjpeg" ,libjpeg)
                          ("libpng" ,libpng)
-                         ("libtiff" ,libtiff)))
+                         ("libtiff" ,libtiff)
+                         ("libwebp" ,libwebp)))
     (synopsis "SDL image loading library")
     (description "SDL_image is an image file loading library for SDL that
 supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF,
@@ -299,6 +299,59 @@ directory.")
     (home-page (package-home-page sdl))
     (license (package-license sdl))))
 
+(define (propagated-inputs-with-sdl2 package)
+  "Replace the \"sdl\" propagated input of PACKAGE with SDL2."
+  (map (match-lambda
+         (("sdl" _)
+          `("sdl2" ,sdl2))
+         (other other))
+       (package-propagated-inputs package)))
+
+(define-public sdl2-image
+  (package (inherit sdl-image)
+    (name "sdl2-image")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "http://www.libsdl.org/projects/SDL_image/release/SDL2_image-"
+                              version ".tar.gz"))
+              (sha256
+               (base32
+                "0d3jlhkmr0j5a2dd5h6y29jfcsj7mkl16wghm6n3nqqp7g3ib65j"))))
+    (propagated-inputs
+     (propagated-inputs-with-sdl2 sdl-image))))
+
+(define-public sdl2-mixer
+  (package (inherit sdl-mixer)
+    (name "sdl2-mixer")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-"
+                              version ".tar.gz"))
+              (sha256
+               (base32
+                "0nvjdxjchrajrn0jag877hdx9zb788hsd315zzg1lyck2wb0xkm8"))))
+    (propagated-inputs
+     (propagated-inputs-with-sdl2 sdl-mixer))))
+
+(define-public sdl2-ttf
+  (package (inherit sdl-ttf)
+    (name "sdl2-ttf")
+    (version "2.0.12")
+    (source (origin
+             (method url-fetch)
+             (uri
+              (string-append "http://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-"
+                             version ".tar.gz"))
+             (sha256
+              (base32
+               "0vkg6lyj278mdpd52map3rfi65fbq16w67ahmmfcl77a8da60a47"))))
+    (propagated-inputs
+     (propagated-inputs-with-sdl2 sdl-ttf))))
+
 (define-public guile-sdl
   (package
     (name "guile-sdl")