summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2015-12-15 13:30:11 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-12-17 22:01:48 -0500
commit6813f70a5c02eec999850603bd99b6df4fd41bec (patch)
tree7c4dfe8a274a00d76346e6124a9dfd445fd1f348
parent710964d1790e6e583a9564f398ac57d635225cb2 (diff)
gnu: Add sdl2-image.
* gnu/packages/sdl.scm (propagated-inputs-with-sdl2): New procedure. (sdl2-image): New variable.
-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")