gnu: sdl2: Update to 2.24.0, use gexps and remove input labels.

* gnu/packages/sdl.scm (sdl2): Update to 2.24.0.
[arguments]: Use gexps.
[inputs]: Use modify-inputs and remove labels.
This commit is contained in:
Maxim Cournoyer 2022-08-22 17:16:51 -04:00
parent 3f25fcf84d
commit f24bf279d4
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -13,6 +13,7 @@
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si> ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -34,6 +35,7 @@ (define-module (gnu packages sdl)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
@ -110,46 +112,47 @@ (define-public sdl
(license license:lgpl2.1))) (license license:lgpl2.1)))
(define-public sdl2 (define-public sdl2
(package (inherit sdl) (package
(inherit sdl)
(name "sdl2") (name "sdl2")
(version "2.0.14") (version "2.24.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "https://libsdl.org/release/SDL2-" (string-append "https://libsdl.org/release/SDL2-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1g1jahknv5r4yhh1xq5sf0md20ybdw1zh1i15lry26sq39bmn8fq")))) "15vd9najhjh6s9z9hhx7zp51iby690a1g3h7kcwjvyb82x5w7r4i"))))
(arguments (arguments
(substitute-keyword-arguments (package-arguments sdl) (substitute-keyword-arguments (package-arguments sdl)
((#:configure-flags flags) ((#:configure-flags flags)
`(append '("--disable-wayland-shared" "--enable-video-kmsdrm" #~(append '("--disable-wayland-shared" "--enable-video-kmsdrm"
"--disable-kmsdrm-shared") "--disable-kmsdrm-shared")
,flags)) #$flags))
((#:make-flags flags ''()) ((#:make-flags flags ''())
`(cons* #~(cons*
;; SDL dlopens libudev, so make sure it is in rpath. This overrides ;; SDL dlopens libudev, so make sure it is in rpath. This overrides
;; the LDFLAG set in sdls configure-flags, which isnt necessary ;; the LDFLAG set in sdls configure-flags, which isnt necessary
;; as sdl2 includes Mesa by default. ;; as sdl2 includes Mesa by default.
(string-append "LDFLAGS=-Wl,-rpath," (string-append "LDFLAGS=-Wl,-rpath,"
(assoc-ref %build-inputs "eudev") "/lib") #$(this-package-input "eudev") "/lib")
,flags)))) #$flags))))
(inputs (inputs
;; SDL2 needs to be built with ibus support otherwise some systems ;; SDL2 needs to be built with ibus support otherwise some systems
;; experience a bug where input events are doubled. ;; experience a bug where input events are doubled.
;; ;;
;; For more information, see: https://dev.solus-project.com/T1721 ;; For more information, see: https://dev.solus-project.com/T1721
(append `(("dbus" ,dbus) (modify-inputs (package-inputs sdl)
("eudev" ,eudev) ; for discovering input devices (append dbus
("fcitx" ,fcitx) ; helps with CJK input eudev ;for discovering input devices
("glib" ,glib) fcitx ;helps with CJK input
("ibus" ,ibus) glib
("libxkbcommon" ,libxkbcommon) ibus
("libxcursor" ,libxcursor) ; enables X11 cursor support libxkbcommon
("wayland" ,wayland) libxcursor ;enables X11 cursor support
("wayland-protocols" ,wayland-protocols)) wayland
(package-inputs sdl))) wayland-protocols)))
(license license:bsd-3))) (license license:bsd-3)))
(define-public libmikmod (define-public libmikmod