summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/sdl.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 1b64be024d..63c1037fcb 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)
@@ -299,6 +300,29 @@ 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 guile-sdl
(package
(name "guile-sdl")