commit:     b4777b81aa32053b008ed000f9bd4eba4cc0fc84
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue May 13 15:17:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 13 19:05:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4777b81

app-accessibility/speech-dispatcher: fix automagic systemd support

In this upstream release, user units were added that also link to
libsystemd.so; it is autodetected if both the unit files were installed
AND libsystemd was found via pkg-config.

We need a USE flag to control this. Once we have a USE flag it is
pointless to install the system unit unconditionally (the "small files"
QA rule) since users will anyways want/need socket activation or just build
with global USE=systemd.

Fixes:
```
 * VDB: detected possibly incorrect RDEPEND 
(app-accessibility/speech-dispatcher-0.12.0)
 *  > sys-apps/systemd
```

Fixes: 1f6eb8673d45d10412a8e10740f6f81587724191
Closes: https://bugs.gentoo.org/955909
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...r-0.12.0.ebuild => speech-dispatcher-0.12.0-r1.ebuild} | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git 
a/app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0.ebuild 
b/app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0-r1.ebuild
similarity index 81%
rename from app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0.ebuild
rename to app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0-r1.ebuild
index 4e6f33f401a0..055c9d5ffde6 100644
--- a/app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0.ebuild
+++ b/app-accessibility/speech-dispatcher/speech-dispatcher-0.12.0-r1.ebuild
@@ -13,7 +13,7 @@ 
SRC_URI="https://github.com/brailcom/speechd/releases/download/${PV}/${P}.tar.gz
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
-IUSE="alsa ao +espeak flite nas pulseaudio pipewire +python"
+IUSE="alsa ao +espeak flite nas pulseaudio pipewire +python systemd"
 
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -27,7 +27,9 @@ DEPEND="python? ( ${PYTHON_DEPS} )
        flite? ( app-accessibility/flite )
        nas? ( media-libs/nas )
        pulseaudio? ( media-libs/libpulse )
-       pipewire? ( media-video/pipewire )"
+       pipewire? ( media-video/pipewire )
+       systemd? ( sys-apps/systemd:= )
+"
 RDEPEND="${DEPEND}
        python? ( dev-python/pyxdg[${PYTHON_USEDEP}] )"
 BDEPEND="
@@ -59,8 +61,13 @@ src_configure() {
                $(use_with nas)
                $(use_with pulseaudio pulse)
                $(use_with pipewire)
-               --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-               --with-systemduserunitdir="$(systemd_get_userunitdir)"
+               # Technically we should always install these under the "small 
files" QA
+               # rule. But upstream uses presence of the user unit dir to 
define
+               # USE_LIBSYSTEMD and link in code which consumes 
systemd/sd-daemon.h,
+               # and the corresponding *user* files have a hard dependency on 
that
+               # code. There is no standalone --with-systemd.
+               "$(use_with systemd systemdsystemunitdir 
"$(systemd_get_systemunitdir)")"
+               "$(use_with systemd systemduserunitdir 
"$(systemd_get_userunitdir)")"
        )
        econf "${myeconfargs[@]}"
 }

Reply via email to