Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913715 - games-simulation/simutrans: make media-sound/fluidsynth dependency optional
Summary: games-simulation/simutrans: make media-sound/fluidsynth dependency optional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: tastytea
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-09-06 12:09 UTC by Nuno Silva
Modified: 2023-10-11 11:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Silva 2023-09-06 12:09:29 UTC
I noticed simutrans now pulls media-sound/fluidsynth and media-sound/fluid-soundfont. As I'm not interested in audio output from simutrans, while also influenced by fluid-soundfont being slightly big, I wondered if it would be possible to skip this dependency.

It seems that the upstream code makes it possible to disable the fluidsynth audio backend, through USE_FLUIDSYNTH_MIDI (which is unconditionally set to 1 in the simutrans-123.0.1-r1 ebuild).

Would it be possible to exploit this in the ebuild so that fluidsynth becomes optional?

Reproducible: Always
Comment 1 Nuno Silva 2023-09-06 12:14:33 UTC
(While I managed to compile and install simutrans without fluidsynth by modifying the 123.0.1-r1 ebuild, I'm not sure I've chosen the best USE flag for this, and I'm also not sure if it needs to account for some other audio dependency being used (from sdl, perhaps?) when fluidsynth is disabled, hence why I'm not (at least for now) uploading a modified ebuild.)
Comment 2 tastytea 2023-09-06 17:21:17 UTC
yes, making media-sound/fluidsynth and media-sound/fluid-soundfont optional and changing USE_FLUIDSYNTH_MIDI to 0 should be enough. it seems USE="midi" would be appropriate? i'll add it in the next days.
Comment 3 Nuno Silva 2023-09-06 20:33:25 UTC
USE=midi is what I used here locally, but what I'm worrying about is that it might just fall back to sdl-mixer, so - besides possibly needing a dependency on that when the flag is disabled - will it be midi too with sdl-mixer? (As then the "midi" flag might not be the best one for this.)
Comment 4 tastytea 2023-09-07 09:45:38 UTC
it looks to me like they turn off midi with fluidsynth turned off, sdl2 enabled and on linux:

<https://github.com/aburch/simutrans/blob/master/Makefile#L665>
Comment 5 Nuno Silva 2023-09-09 16:07:43 UTC
Thanks for checking! Indeed it disables midi. And, looking at the Makefile, it seems sdl-mixer (well, sdl2-mixer?) is something separate. So it seems my previous worries have no reason to be :-)
Comment 6 Larry the Git Cow gentoo-dev 2023-10-11 11:03:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d4c53037902a82343636ebca2c00a37152f1e6e

commit 5d4c53037902a82343636ebca2c00a37152f1e6e
Author:     tastytea <gentoo@tastytea.de>
AuthorDate: 2023-09-08 20:26:28 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2023-10-11 11:02:03 +0000

    games-simulation/simutrans: make midi support optional
    
    Closes: https://bugs.gentoo.org/913715
    Signed-off-by: tastytea <gentoo@tastytea.de>
    Closes: https://github.com/gentoo/gentoo/pull/32693
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 games-simulation/simutrans/metadata.xml            |   1 +
 .../simutrans/simutrans-123.0.1-r2.ebuild          | 109 +++++++++++++++++++++
 2 files changed, 110 insertions(+)