commit:     95c93da7428b4b18762630a11e960fd51e955945
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 16:15:36 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 16:27:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95c93da7

media-sound/fluidsynth: install tmpfiles config; change default soundfont path; 
systemd fix

* Install tmpfiles config. The release notes mention this and I'd meant
  to do it and forgot with the other big changes done in
  e30fcf2e2f7b63e6e03b473bb4b5c30a70940043.

* Set `-DDEFAULT_SOUNDFONT` so we can actually find media-sound/fluid-soundfont
  (bug #782871).

  In media-sound/fluid-soundfont, we do the same as Ubuntu and others
  by installing to /usr/share/sounds/sf2 rather than where fluidsynth
  looks by default at /usr/share/soundfonts/default.sf2. So, we should do
  as Ubuntu does and also tell fluidsynth about that.

* Depend on systemd w/ USE=systemd because libsystemd is used there, though
  only for the native ABI as it's not used in the library.

Closes: https://bugs.gentoo.org/782871
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{fluidsynth-2.4.6-r1.ebuild => fluidsynth-2.4.6-r2.ebuild} | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/media-sound/fluidsynth/fluidsynth-2.4.6-r1.ebuild 
b/media-sound/fluidsynth/fluidsynth-2.4.6-r2.ebuild
similarity index 92%
rename from media-sound/fluidsynth/fluidsynth-2.4.6-r1.ebuild
rename to media-sound/fluidsynth/fluidsynth-2.4.6-r2.ebuild
index 309cbd41b494..d1ff2fba9fa0 100644
--- a/media-sound/fluidsynth/fluidsynth-2.4.6-r1.ebuild
+++ b/media-sound/fluidsynth/fluidsynth-2.4.6-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake-multilib systemd toolchain-funcs
+inherit cmake-multilib systemd toolchain-funcs tmpfiles
 
 DESCRIPTION="Software real-time synthesizer based on the Soundfont 2 
specifications"
 HOMEPAGE="https://www.fluidsynth.org";
@@ -40,6 +40,7 @@ DEPEND="
        readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
        sdl? ( media-libs/libsdl3[${MULTILIB_USEDEP}] )
        sndfile? ( media-libs/libsndfile[${MULTILIB_USEDEP}] )
+       systemd? ( sys-apps/systemd )
 "
 RDEPEND="${DEPEND}"
 
@@ -86,7 +87,7 @@ src_configure() {
                -Denable-readline=$(usex readline)
                -Denable-sdl3=$(usex sdl)
                -Denable-sdl2=OFF
-               -Denable-systemd=$(usex systemd)
+               -Denable-systemd=$(multilib_native_usex systemd)
                -Denable-threads=$(usex threads)
                -Denable-trap-on-fpe=$(usex debug)
                -Denable-ubsan=OFF # compile and link against UBSan (for 
debugging fluidsynth internals)
@@ -94,6 +95,7 @@ src_configure() {
                -Denable-winmidi=OFF # Windows
                $(cmake_use_find_package doc Doxygen)
                -DFLUID_DAEMON_ENV_FILE="/etc/fluidsynth.conf"
+               -DDEFAULT_SOUNDFONT="/usr/share/sounds/sf2/FluidR3_GM.sf2"
        )
 
        cmake-multilib_src_configure
@@ -114,6 +116,8 @@ multilib_src_install() {
        if multilib_is_native_abi ; then
                systemd_dounit "${BUILD_DIR}/fluidsynth.service"
 
+               newtmpfiles "${BUILD_DIR}/fluidsynth.tmpfiles" fluidsynth.conf
+
                insinto /etc
                doins "${BUILD_DIR}/fluidsynth.conf"
 
@@ -136,6 +140,8 @@ multilib_src_install_all() {
 }
 
 pkg_postinst() {
+       tmpfiles_process fluidsynth.conf
+
        elog "When using fluidsynth as a system service, make sure"
        elog "to configure your fluidsynth settings globally in "
        elog "/etc/fluidsynth.conf or per-user in ~/.config/fluidsynth"

Reply via email to