1SUMMARY = "Phosphor DBus Interfaces"
2DESCRIPTION = "Generated bindings, using sdbus++, for the phosphor YAML"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
5DEPENDS += " \
6        ${PYTHON_PN}-sdbus++-native \
7        sdbusplus \
8        systemd \
9        "
10SRCREV = "c6883fc4f6d0f4da3b05f3274ac0a654dff96969"
11PV = "1.0+git${SRCPV}"
12PR = "r1"
13
14SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces;branch=master;protocol=https"
15
16S = "${WORKDIR}/git"
17
18inherit pkgconfig meson
19inherit obmc-phosphor-utils
20inherit phosphor-dbus-yaml
21inherit python3native
22
23# Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
24# add them to the 'doc' subpackage.
25FILES:${PN}-doc += "${datadir}/${BPN}"
26
27# Process OBMC_ORG_YAML_SUBDIRS to create Meson config options.
28# ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true
29def pdi_meson_config(d):
30    return ' '.join([
31        '-Ddata_' + x.replace('/', '_') + '=true' \
32                for x in listvar_to_list(d, 'OBMC_ORG_YAML_SUBDIRS')
33        ])
34pdi_meson_config[vardeps] = "OBMC_ORG_YAML_SUBDIRS"
35EXTRA_OEMESON += "${@pdi_meson_config(d)}"
36# Remove all schemas by default regardless of the meson_options.txt config
37do_write_config:append() {
38    for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
39        sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
40    done
41}
42do_write_config[deptask] += "do_unpack"
43