guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: Add sdl2-image.


From: David Thompson
Subject: 01/04: gnu: Add sdl2-image.
Date: Fri, 18 Dec 2015 03:47:02 +0000

davexunit pushed a commit to branch master
in repository guix.

commit 6813f70a5c02eec999850603bd99b6df4fd41bec
Author: David Thompson <address@hidden>
Date:   Tue Dec 15 13:30:11 2015 -0500

    gnu: Add sdl2-image.
    
    * gnu/packages/sdl.scm (propagated-inputs-with-sdl2): New procedure.
    (sdl2-image): New variable.
---
 gnu/packages/sdl.scm |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 1b64be0..63c1037 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 <address@hidden>
+;;; Copyright © 2013, 2015 David Thompson <address@hidden>
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Sou Bunnbu <address@hidden>
 ;;; Copyright © 2015 Alex Kost <address@hidden>
@@ -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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]