* [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support.
2020-01-05 10:36 [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Timotej Lazar
@ 2020-01-05 10:45 ` Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 2/5] gnu: sdl-mixer: Remove unused configure flag Timotej Lazar
` (3 more replies)
2020-01-05 12:23 ` [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Danny Milosavljevic
2020-12-13 12:57 ` Christopher Baines
2 siblings, 4 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-05 10:45 UTC (permalink / raw)
To: 38941; +Cc: Timotej Lazar
Only one MOD backend is compiled, so specify (only) the correct inputs:
libmikmod for sdl-mixer and libmodplug for sdl2-mixer.
* gnu/packages/sdl.scm (sdl-mixer)[inputs]: Remove libmodplug.
* gnu/packages/sdl.scm (sdl2-mixer)[inputs]: Add libmodplug.
---
gnu/packages/sdl.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index f7a34003d1..beeec1b8ca 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -274,8 +275,7 @@ WEBP, XCF, XPM, and XV.")
(inputs `(("libvorbis" ,libvorbis)
("libflac" ,flac)
("libmad" ,libmad)
- ("libmikmod" ,libmikmod)
- ("libmodplug" ,libmodplug)))
+ ("libmikmod" ,libmikmod)))
;; FIXME: Add libfluidsynth
(propagated-inputs `(("sdl" ,sdl)))
(synopsis "SDL multi-channel audio mixer library")
@@ -416,6 +416,10 @@ directory.")
#t))
(sha256
(base32 "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl"))))
+ (inputs
+ ;; The default MOD library changed in SDL2 mixer.
+ `(("libmodplug" ,libmodplug)
+ ,@(alist-delete "libmikmod" (package-inputs sdl-mixer))))
(propagated-inputs
(propagated-inputs-with-sdl2 sdl-mixer))))
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 2/5] gnu: sdl-mixer: Remove unused configure flag.
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
@ 2020-01-05 10:45 ` Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 3/5] gnu: sdl2-mixer: Fix configure flags Timotej Lazar
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-05 10:45 UTC (permalink / raw)
To: 38941; +Cc: Timotej Lazar
The flag --disable-music-mp3-shared is only used when building with smpeg
instead of libmad, which is linked at build time by default.
* gnu/packages/sdl.scm (sdl-mixer)[arguments]: Remove unused configure flag.
---
gnu/packages/sdl.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index beeec1b8ca..92d8f9a922 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -270,8 +270,7 @@ WEBP, XCF, XPM, and XV.")
"--disable-music-mod-shared"
"--disable-music-fluidsynth-shared"
"--disable-music-ogg-shared"
- "--disable-music-flac-shared"
- "--disable-music-mp3-shared")))
+ "--disable-music-flac-shared")))
(inputs `(("libvorbis" ,libvorbis)
("libflac" ,flac)
("libmad" ,libmad)
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 3/5] gnu: sdl2-mixer: Fix configure flags.
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 2/5] gnu: sdl-mixer: Remove unused configure flag Timotej Lazar
@ 2020-01-05 10:45 ` Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 4/5] gnu: sdl-mixer: Enable fluidsynth MIDI backend Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 5/5] gnu: sdl2-mixer: Enable opus support Timotej Lazar
3 siblings, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-05 10:45 UTC (permalink / raw)
To: 38941; +Cc: Timotej Lazar
Some configure options were renamed between SDL / SDL2 mixer; add new variants
to the derived package.
* gnu/packages/sdl.scm (sdl2-mixer)[arguments]: Fix flags to disable dynamic
library loading.
---
gnu/packages/sdl.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 92d8f9a922..d441040cd6 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -415,6 +415,15 @@ directory.")
#t))
(sha256
(base32 "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments sdl-mixer)
+ ((#:configure-flags flags)
+ `(cons*
+ ;; These options were renamed in SDL2 mixer. Keeping the inherited
+ ;; variants produces a harmless warning.
+ "--disable-music-mod-modplug-shared"
+ "--disable-music-midi-fluidsynth-shared"
+ ,flags))))
(inputs
;; The default MOD library changed in SDL2 mixer.
`(("libmodplug" ,libmodplug)
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 4/5] gnu: sdl-mixer: Enable fluidsynth MIDI backend.
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 2/5] gnu: sdl-mixer: Remove unused configure flag Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 3/5] gnu: sdl2-mixer: Fix configure flags Timotej Lazar
@ 2020-01-05 10:45 ` Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 5/5] gnu: sdl2-mixer: Enable opus support Timotej Lazar
3 siblings, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-05 10:45 UTC (permalink / raw)
To: 38941; +Cc: Timotej Lazar
* gnu/packages/sdl.scm (sdl-mixer)[inputs]: Add fluidsynth and alphabetize.
[arguments]: Reformat.
---
gnu/packages/sdl.scm | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index d441040cd6..80f3da9327 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -262,20 +262,21 @@ WEBP, XCF, XPM, and XV.")
"0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
- ;; no check target
- ;; use libmad instead of smpeg
- ;; explicitly link against shared libraries instead of dlopening them
- (arguments `(#:tests? #f
- #:configure-flags '("--enable-music-mp3-mad-gpl"
- "--disable-music-mod-shared"
- "--disable-music-fluidsynth-shared"
- "--disable-music-ogg-shared"
- "--disable-music-flac-shared")))
- (inputs `(("libvorbis" ,libvorbis)
- ("libflac" ,flac)
- ("libmad" ,libmad)
- ("libmikmod" ,libmikmod)))
- ;; FIXME: Add libfluidsynth
+ (arguments
+ `(#:tests? #f ; No check target.
+ #:configure-flags
+ '("--enable-music-mp3-mad-gpl" ; Use libmad instead of smpeg.
+ ;; Explicitly link against shared libraries instead of dlopening them.
+ "--disable-music-flac-shared"
+ "--disable-music-fluidsynth-shared"
+ "--disable-music-mod-shared"
+ "--disable-music-ogg-shared")))
+ (inputs
+ `(("fluidsynth" ,fluidsynth)
+ ("libflac" ,flac)
+ ("libmad" ,libmad)
+ ("libmikmod" ,libmikmod)
+ ("libvorbis" ,libvorbis)))
(propagated-inputs `(("sdl" ,sdl)))
(synopsis "SDL multi-channel audio mixer library")
(description "SDL_mixer is a multi-channel audio mixer library for SDL.
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 5/5] gnu: sdl2-mixer: Enable opus support.
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
` (2 preceding siblings ...)
2020-01-05 10:45 ` [bug#38941] [PATCH 4/5] gnu: sdl-mixer: Enable fluidsynth MIDI backend Timotej Lazar
@ 2020-01-05 10:45 ` Timotej Lazar
3 siblings, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-05 10:45 UTC (permalink / raw)
To: 38941; +Cc: Timotej Lazar
* gnu/packages/sdl.scm (sdl2-mixer)[inputs]: Add opusfile.
[native-inputs]: Add pkg-config.
[arguments]: Link opusfile at build time.
---
gnu/packages/sdl.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 80f3da9327..80725561fb 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -420,15 +420,19 @@ directory.")
(substitute-keyword-arguments (package-arguments sdl-mixer)
((#:configure-flags flags)
`(cons*
+ "--disable-music-opus-shared"
;; These options were renamed in SDL2 mixer. Keeping the inherited
;; variants produces a harmless warning.
"--disable-music-mod-modplug-shared"
"--disable-music-midi-fluidsynth-shared"
,flags))))
(inputs
- ;; The default MOD library changed in SDL2 mixer.
- `(("libmodplug" ,libmodplug)
+ `(("opusfile" ,opusfile)
+ ;; The default MOD library changed in SDL2 mixer.
+ ("libmodplug" ,libmodplug)
,@(alist-delete "libmikmod" (package-inputs sdl-mixer))))
+ (native-inputs
+ `(("pkgconfig" ,pkg-config))) ; Needed to find the opus library.
(propagated-inputs
(propagated-inputs-with-sdl2 sdl-mixer))))
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks
2020-01-05 10:36 [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
@ 2020-01-05 12:23 ` Danny Milosavljevic
2020-01-06 11:12 ` Timotej Lazar
2020-12-13 12:57 ` Christopher Baines
2 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2020-01-05 12:23 UTC (permalink / raw)
To: Timotej Lazar; +Cc: 38941, Ricardo Wurmus
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
Hi,
thanks for the patches!
On Sun, 05 Jan 2020 11:36:34 +0100
Timotej Lazar <timotej.lazar@araneo.si> wrote:
> The MIDI backends need additional runtime configuration. Fluidsynth
> requires a soundfont to be installed and specified when running a
> program that uses sdl-mixer, e.g.:
>
> SDL_SOUNDFONTS=/gnu/store/…-fluid-3-2.1/share/soundfonts/FluidR3Mono_GM.sf3
>
> If this is not set, the bundled timidity backend is used, which can use
> the freepats samples. Configuration must be specified since only files
> under /etc are checked by default, e.g.:
>
> TIMIDITY_CFG=/gnu/store/…-freepats-20060219/share/freepats/freepats.cfg
> I’m not sure if and how default values for these vars can be specified
> for all programs using sdl-mixer, and I would prefer to leave the choice
> of backend to the user anyway.
> However, we should probably document them somewhere. Would a comment be enough?
Let's put it in the description of the sdl-mixer package.
After all, it would document the usage of an interface that sdl-mixer provides.
> Dependent packages can then wrap
> binaries to set required paths if needed.
>
> Alternatively we can add freepats and/or fluid as inputs to sdl(2)-mixer
> and patch the source to look for them in the store.
How often is it that a user switches MIDI soundfonts?
Does a user expect a default soundfont?
That would tell us whether we should provide such a default (and increase
the closure size of sdl2-mixer considerably, maybe?).
There's also a procedure "sdl-union" which already does sdl magic. We could
also add some stuff for MIDI there, maybe.
In the mean time, I've applied your patchset to master since it only adds
functionality and only has few dependents.
Could you provide an update to the description or similar as a patch?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks
2020-01-05 12:23 ` [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Danny Milosavljevic
@ 2020-01-06 11:12 ` Timotej Lazar
0 siblings, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-06 11:12 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 38941, Ricardo Wurmus
Danny Milosavljevic <dannym@scratchpost.org> [2020-01-05 13:23:44+0100]:
> Let's put it in the description of the sdl-mixer package.
> After all, it would document the usage of an interface that sdl-mixer provides.
OK, I sent a patch describing runtime setup for MIDI playback.
> How often is it that a user switches MIDI soundfonts?
>
> Does a user expect a default soundfont?
>
> That would tell us whether we should provide such a default (and increase
> the closure size of sdl2-mixer considerably, maybe?).
The packages `freepats` and `fluid-3` are 31.9 and 13.9 MiB
respectively. I think that the best solution would be to include them as
inputs to packages that use sdl-mixer to actually play MIDI files. I did
so for CorsixTH (patch submitted), which was also the reason for the
sdl-mixer patches. :)
Thank you for the feedback!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks
2020-01-05 10:36 [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Timotej Lazar
2020-01-05 10:45 ` [bug#38941] [PATCH 1/5] gnu: sdl-mixer: Use correct inputs for MOD file support Timotej Lazar
2020-01-05 12:23 ` [bug#38941] [PATCH 0/5] Support fluidsynth and opus in sdl(2)-mixer, and other tweaks Danny Milosavljevic
@ 2020-12-13 12:57 ` Christopher Baines
2020-12-13 13:01 ` bug#38941: " Christopher Baines
2 siblings, 1 reply; 10+ messages in thread
From: Christopher Baines @ 2020-12-13 12:57 UTC (permalink / raw)
To: Timotej Lazar; +Cc: 38941
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]
Timotej Lazar <timotej.lazar@araneo.si> writes:
> Hi,
>
> these patches improve sdl- and sdl2-mixer: fix dependencies and
> configure flags that changed between the two versions, and enable
> support for fluidsynth and opus libraries. I tested several dependent
> packages, and everything seems to work OK.
>
> The MIDI backends need additional runtime configuration. Fluidsynth
> requires a soundfont to be installed and specified when running a
> program that uses sdl-mixer, e.g.:
>
> SDL_SOUNDFONTS=/gnu/store/…-fluid-3-2.1/share/soundfonts/FluidR3Mono_GM.sf3
>
> If this is not set, the bundled timidity backend is used, which can use
> the freepats samples. Configuration must be specified since only files
> under /etc are checked by default, e.g.:
>
> TIMIDITY_CFG=/gnu/store/…-freepats-20060219/share/freepats/freepats.cfg
>
> I’m not sure if and how default values for these vars can be specified
> for all programs using sdl-mixer, and I would prefer to leave the choice
> of backend to the user anyway. However, we should probably document them
> somewhere. Would a comment be enough? Dependent packages can then wrap
> binaries to set required paths if needed.
>
> Alternatively we can add freepats and/or fluid as inputs to sdl(2)-mixer
> and patch the source to look for them in the store.
>
> Thanks!
> Timotej
>
> Timotej Lazar (5):
> gnu: sdl-mixer: Use correct inputs for MOD file support.
> gnu: sdl-mixer: Remove unused configure flag.
> gnu: sdl2-mixer: Fix configure flags.
> gnu: sdl-mixer: Enable fluidsynth MIDI backend.
> gnu: sdl2-mixer: Enable opus support.
>
> gnu/packages/sdl.scm | 49 +++++++++++++++++++++++++++++---------------
> 1 file changed, 33 insertions(+), 16 deletions(-)
Hi,
I think these patches might have been merged, so I'm going to close this
issue. If this is incorrect, just let me know!
Thanks,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread