On Wed, Oct 23, 2024 at 11:06 PM Sverdlin, Alexander
<[email protected]> wrote:
>
> > +
> > +# Enable all project features for ptest
> > +PACKAGECONFIG[tests] = " \
> > +    --enable-tests --enable-tools --enable-bindings-cxx 
> > --enable-bindings-glib --enable-gpioset-interactive --enable-dbus, \
> > +    --disable-tests, \
> > +    kmod util-linux glib-2.0 catch2 libedit glib-2.0-native libgudev, \
>                                                                        ^
> Would it make sense to append " dbus" above?

Not above, below. This would be a run-time dependency for tests.

>
> > +    bash glib-2.0-utils libgpiod-manager shunit2 \
> > +"
> > +PACKAGECONFIG[gpioset-interactive] = 
> > "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit"
> > +PACKAGECONFIG[glib] = 
> > "--enable-bindings-glib,--disable-bindings-glib,glib-2.0 glib-2.0-native"
> > +PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,glib-2.0 
> > glib-2.0-native libgudev"
>                                                                               
>           ^
> Would it make sense to append " dbus" above?

We already add dbus to RDEPENDS of the manager package but yeah, this
probably makes sense. Especially with the above update.

>
> > +
> > +PACKAGES =+ "${PN}-ptest-dev ${PN}-glib ${PN}-manager ${PN}-cli"
> > +FILES:${PN}-tools += "${bindir}/gpionotify"
> > +FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*"
> > +FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h"
> > +FILES:${PN}-glib += "${libdir}/libgpiod-glib.so.*"
> > +FILES:${PN}-manager += " \
> > +    ${bindir}/gpio-manager \
> > +    ${sysconfdir}/dbus-1/system.d/io.gpiod1.conf \
> > +    ${datadir}/dbus-1/interfaces/io.gpiod1.xml \
> > +    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
> > '${systemd_system_unitdir}/gpio-manager.service', '', d)} \
> > +    ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 
> > '${sysconfdir}/init.d/gpio-manager', '', d)} \
> > +"
> > +FILES:${PN}-cli += "${bindir}/gpiocli"
> > +
> > +RDEPENDS:${PN}-manager += "dbus"
>
> Would it make sense to add
> RDEPENDS:${PN}-cli += "${PN}-manager"
> ? Or is gpiocli still functional in some way without gpio-manager?
>

No, it's not. Good catch.

> > +
> > +SYSTEMD_PACKAGES = "${PN}-manager"
> > +
> > +python __anonymous() {
> > +    distro_features = d.getVar("DISTRO_FEATURES").split()
> > +    packageconfig = d.getVar("PACKAGECONFIG").split()
> > +    pn = d.getVar("PN")
> > +
> > +    if "systemd" in distro_features and "dbus" in packageconfig:
> > +        d.appendVar("EXTRA_OECONF", " --enable-systemd")
>
> Will it make sense to add
>            d.appendVar("DEPENDS", " systemd")
> build-time dependency?
>

No, I don't think so. This can only happen if we already know we're
using systemd.

Bart
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#113163): 
https://lists.openembedded.org/g/openembedded-devel/message/113163
Mute This Topic: https://lists.openembedded.org/mt/109167552/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to