gnu: Add sdl2-image.

* gnu/packages/sdl.scm (propagated-inputs-with-sdl2): New procedure.
(sdl2-image): New variable.
This commit is contained in:
David Thompson 2015-12-15 13:30:11 -05:00 committed by David Thompson
parent 710964d179
commit 6813f70a5c
1 changed files with 25 additions and 1 deletions

View File

@ -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")