From 40e94665d41d737adb7162b26150d48b4079e073 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 10 Oct 2015 11:27:27 +0300 Subject: gnu: sdl-union: Wrap into a procedure and export it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Courtès . * gnu/packages/sdl.scm (sdl-union): Make it a procedure returning 'sdl-union' package. (guile-sdl): Use it. --- gnu/packages/sdl.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 50fe01074d..1b64be024d 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013 David Thompson ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu +;;; Copyright © 2015 Alex Kost ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,7 +43,8 @@ (define-module (gnu packages sdl) sdl-image sdl-mixer sdl-net - sdl-ttf)) + sdl-ttf + sdl-union)) (define sdl (package @@ -268,7 +270,10 @@ (define sdl-ttf (home-page "http://www.libsdl.org/projects/SDL_ttf/") (license zlib))) -(define sdl-union +(define* (sdl-union #:optional (packages (list sdl sdl-gfx sdl-net sdl-ttf + sdl-image sdl-mixer))) + "Return 'sdl-union' package which is a union of PACKAGES. +If PACKAGES are not specified, all SDL packages are used." (package (name "sdl-union") (version (package-version sdl)) @@ -283,12 +288,10 @@ (define sdl-union (((names . directories) ...) (union-build (assoc-ref %outputs "out") directories)))))) - (inputs `(("sdl" ,sdl) - ("sdl-gfx" ,sdl-gfx) - ("sdl-image" ,sdl-image) - ("sdl-mixer" ,sdl-mixer) - ("sdl-ttf" ,sdl-ttf))) - (synopsis "Union of all SDL libraries") + (inputs (map (lambda (package) + (list (package-name package) package)) + packages)) + (synopsis "Union of SDL libraries") (description "A union of SDL and its extension libraries. A union is required because sdl-config assumes that all of the headers and libraries are in the same @@ -316,7 +319,7 @@ (define-public guile-sdl ("libjpeg" ,libjpeg))) (inputs `(("guile" ,guile-2.0) - ("sdl-union" ,sdl-union))) + ("sdl-union" ,(sdl-union)))) (arguments '(#:configure-flags (list (string-append "--with-sdl-prefix=" -- cgit v1.2.3