diff options
Diffstat (limited to 'gnu/packages/sdl.scm')
-rw-r--r-- | gnu/packages/sdl.scm | 146 |
1 files changed, 72 insertions, 74 deletions
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index f2afe763c5..4c38e2f055 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015, 2017 Sou Bunnbu <iyzsong@member.fsf.org> ;;; Copyright © 2015 Alex Kost <alezost@gmail.com> -;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> @@ -34,7 +34,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (gnu packages) - #:use-module ((guix licenses) #:hide (freetype)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -43,6 +43,7 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) + #:use-module (gnu packages compression) #:use-module (gnu packages fcitx) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) @@ -93,24 +94,21 @@ #:tests? #f)) ; no check target (propagated-inputs ;; SDL headers include X11 headers. - `(("libx11" ,libx11) - ("libcap" ,libcap) ; 'libSDL.la' contain `-lcap'. - ;; TODO: Since building Mesa with Meson it is now necessary that Mesa is - ;; a propogated input. We still need to figure out why, possibly due to a - ;; change in pkg-config. - ("mesa" ,mesa))) - (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("libxrandr" ,libxrandr) - ("glu" ,glu) - ("alsa-lib" ,alsa-lib) - ("pulseaudio" ,pulseaudio))) + (list libx11 + libcap ; 'libSDL.la' contain `-lcap'. + ;; TODO: Since building Mesa with Meson it is now necessary that Mesa is + ;; a propogated input. We still need to figure out why, possibly due to a + ;; change in pkg-config. + mesa)) + (native-inputs (list pkg-config)) + (inputs (list libxrandr glu alsa-lib pulseaudio)) (outputs '("out" "debug")) (synopsis "Cross platform game development library") (description "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware.") (home-page "https://libsdl.org/") - (license lgpl2.1))) + (license license:lgpl2.1))) (define-public sdl2 (package (inherit sdl) @@ -153,7 +151,7 @@ joystick, and graphics hardware.") ("wayland" ,wayland) ("wayland-protocols" ,wayland-protocols)) (package-inputs sdl))) - (license bsd-3))) + (license license:bsd-3))) (define-public libmikmod (package @@ -182,7 +180,7 @@ joystick, and graphics hardware.") "MikMod is able to play a wide range of module formats, as well as digital sound files. It can take advantage of particular features of your system, such as sound redirection over the network.") - (license lgpl2.1) + (license license:lgpl2.1) (home-page "http://mikmod.sourceforge.net/"))) (define-public sdl-gfx @@ -206,12 +204,12 @@ system, such as sound redirection over the network.") ;; mmx is supported only on Intel processors. '() '(#:configure-flags '("--disable-mmx"))))) - (propagated-inputs `(("sdl" ,sdl))) + (propagated-inputs (list sdl)) (synopsis "SDL graphics primitives library") (description "SDL_gfx provides graphics drawing primitives, rotozoom and other supporting functions for SDL.") (home-page "http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx") - (license zlib))) + (license license:zlib))) (define-public sdl-image (package @@ -233,7 +231,7 @@ other supporting functions for SDL.") "--disable-png-shared" "--disable-tif-shared" "--disable-webp-shared"))) - (native-inputs `(("pkg-config" ,pkg-config))) + (native-inputs (list pkg-config)) ;; libjpeg, libpng, and libtiff are propagated inputs because the ;; SDL_image headers include the headers of these libraries. SDL is a ;; propagated input because the pkg-config file refers to SDL's pkg-config @@ -248,7 +246,7 @@ other supporting functions for SDL.") supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, and XV.") (home-page "https://www.libsdl.org/projects/SDL_image/") - (license zlib))) + (license license:zlib))) (define-public sdl-mixer (package @@ -290,7 +288,7 @@ WEBP, XCF, XPM, and XV.") ("libmad" ,libmad) ("libmikmod" ,libmikmod) ("libvorbis" ,libvorbis))) - (propagated-inputs `(("sdl" ,sdl))) + (propagated-inputs (list sdl)) (synopsis "SDL multi-channel audio mixer library") (description "SDL_mixer is a multi-channel audio mixer library for SDL. It supports any number of simultaneously playing channels of 16 bit stereo @@ -303,7 +301,7 @@ and specify it using the @code{SDL_SOUNDFONTS} environment variable. For the legacy @code{timidity} backend, install a patch set such as @code{freepats} and set the path to the configuration file with @code{TIMIDITY_CFG}.") (home-page "https://www.libsdl.org/projects/SDL_mixer/") - (license zlib))) + (license license:zlib))) (define-public sdl-net (package @@ -318,14 +316,14 @@ and set the path to the configuration file with @code{TIMIDITY_CFG}.") (base32 "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz")))) (build-system gnu-build-system) - (propagated-inputs `(("sdl" ,sdl))) - (native-inputs `(("pkg-config" ,pkg-config))) + (propagated-inputs (list sdl)) + (native-inputs (list pkg-config)) (outputs '("out" "debug")) (synopsis "SDL networking library") (description "SDL_net is a small, cross-platform networking library for SDL.") (home-page "https://www.libsdl.org/projects/SDL_net/") - (license zlib))) + (license license:zlib))) (define-public sdl-pango (package @@ -355,10 +353,7 @@ SDL.") ;; generates linking errors. (lambda _ (invoke "autoreconf" "-vif")))))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config))) + (list autoconf automake libtool pkg-config)) (inputs `(("fontconfig" ,fontconfig) ("freetype" ,freetype) @@ -371,30 +366,35 @@ SDL.") (description "This library is a wrapper around the Pango library. It allows you to use TrueType fonts to render internationalized and tagged text in SDL applications.") - (license lgpl2.1))) + (license license:lgpl2.1))) (define-public sdl-ttf (package (name "sdl-ttf") - (version "2.0.11") + (version "2.0.11.1") + ;; No release tarball for 2.0.11.1, changes: + ;; <https://github.com/libsdl-org/SDL_ttf/commit/e31d11a692> (source (origin - (method url-fetch) - (uri - (string-append "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-" - version ".tar.gz")) - (sha256 - (base32 - "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/libsdl-org/SDL_ttf") + (commit "e31d11a692e5b55e8e624ad766e4e44d655422c8"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1id1cdign615wd5rq0g4ppzwclvhkwd61yb5rwvvvakkpplp3lvd")) + ;; Remove bundled libraries. + (modules '((guix build utils))) + (snippet '(delete-file-recursively "external")))) (build-system gnu-build-system) - (propagated-inputs `(("sdl" ,sdl))) - (inputs `(("freetype" ,freetype) - ("mesa" ,mesa))) - (native-inputs `(("pkg-config" ,pkg-config))) + (propagated-inputs (list sdl)) + (inputs (list freetype mesa)) + (native-inputs (list pkg-config)) (outputs '("out" "debug")) (synopsis "SDL TrueType font library") (description "SDL_ttf is a TrueType font rendering library for SDL.") (home-page "https://www.libsdl.org/projects/SDL_ttf/") - (license zlib))) + (license license:zlib))) (define* (sdl-union #:optional (packages (list sdl sdl-gfx sdl-net sdl-ttf sdl-image sdl-mixer))) @@ -492,10 +492,11 @@ directory.") "--disable-music-midi-fluidsynth-shared" ,flags)))) (inputs - `(("opusfile" ,opusfile) - ;; The default MOD library changed in SDL2 mixer. - ("libmodplug" ,libmodplug) - ,@(alist-delete "libmikmod" (package-inputs sdl-mixer)))) + (modify-inputs (package-inputs sdl-mixer) + (delete "libmikmod") + (prepend opusfile + ;; The default MOD library changed in SDL2 mixer. + libmodplug))) (native-inputs `(("pkgconfig" ,pkg-config))) ; Needed to find the opus library. (propagated-inputs @@ -540,24 +541,25 @@ directory.") (define-public guile-sdl (package (name "guile-sdl") - (version "0.5.2") + (version "0.5.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/guile-sdl/guile-sdl-" - version ".tar.xz")) + version ".tar.lz")) (sha256 (base32 - "0cjgs012a9922hn6xqwj66w6qmfs3nycnm56hyykx5n3g5p7ag01")))) + "040gyk3n3yp8i30ngdg97n3083g8b6laky2nlh10jqcyjdd550d6")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config) + `(("lzip" ,lzip) + ("pkg-config" ,pkg-config) ;; Required by test suite. - ("xorg-server" ,xorg-server) - ("libjpeg" ,libjpeg-turbo))) + ("libjpeg" ,libjpeg-turbo) + ("xorg-server" ,xorg-server))) (inputs - `(("guile" ,guile-2.2) - ("sdl-union" ,(sdl-union)))) + (list guile-2.2 + (sdl-union))) (arguments '(#:configure-flags (list (string-append "--with-sdl-prefix=" @@ -615,45 +617,44 @@ directory.") Layer (SDL). With them, Guile programmers can have easy access to graphics, sound and device input (keyboards, joysticks, mice, etc.).") (home-page "https://www.gnu.org/software/guile-sdl/") - (license gpl3+))) + (license license:gpl3+))) (define-public guile-sdl2 (package (name "guile-sdl2") - (version "0.6.0") + (version "0.7.0") (source (origin (method url-fetch) (uri (string-append "https://files.dthompson.us/guile-sdl2/" "guile-sdl2-" version ".tar.gz")) (sha256 (base32 - "06vrknn4iz0ag932rb4almyhi9cvdkn081shvsi0h4skd6ry8bdl")))) + "197dzkxw8nv92da56iv2r8ih5r3pr4pd5c5j2q83aqb78h4jqjl7")))) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) (native-inputs - `(("guile" ,guile-2.2) - ("pkg-config" ,pkg-config))) + (list guile-3.0 pkg-config)) (inputs - `(("sdl2" ,sdl2) - ("sdl2-image" ,sdl2-image) - ("sdl2-mixer" ,sdl2-mixer) - ("sdl2-ttf" ,sdl2-ttf))) + (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)) (synopsis "Guile bindings for SDL2") (home-page "https://dthompson.us/projects/guile-sdl2.html") (description "Guile-SDL2 provides Guile Scheme bindings for the SDL2 C shared library. The bindings are written in pure Scheme using Guile's foreign function interface.") - (license lgpl3+))) + (license license:lgpl3+))) -(define-public guile3.0-sdl2 +(define-public guile2.2-sdl2 (package/inherit guile-sdl2 - (name "guile3.0-sdl2") + (name "guile2.2-sdl2") (native-inputs - `(("guile" ,guile-3.0) + `(("guile" ,guile-2.2) ("pkg-config" ,pkg-config))))) +(define-public guile3.0-sdl2 + (deprecated-package "guile3.0-sdl2" guile-sdl2)) + (define-public sdl2-cs (let ((commit "1a3556441e1394eb0b5d46aeb514b8d1090b93f8")) (package @@ -683,16 +684,13 @@ interface.") (install-file "bin/Release/SDL2-CS.dll" (string-append out "/lib")) #t)))))) (native-inputs - `(("mono" ,mono))) + (list mono)) (inputs - `(("sdl2" ,sdl2) - ("sdl2-image" ,sdl2-image) - ("sdl2-mixer" ,sdl2-mixer) - ("sdl2-ttf" ,sdl2-ttf))) + (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)) (home-page "https://dthompson.us/projects/guile-sdl2.html") (synopsis "C# wrapper for SDL2") (description "SDL2-CS provides C# bindings for the SDL2 C shared library. The C# wrapper was written to be used for FNA's platform support. However, this is written in a way that can be used for any general C# application.") - (license zlib)))) + (license license:zlib)))) |