phosphor-dbus-interfaces: Use yaml subdirs

Add patch to use yaml_selected_subdirs in Meson build to sync with
latest sdbusplus changes.

Tested:
Verified build with GCC 15 and C++23 across gBMC platforms.
- platform11: http://fusion2/3ff2006d-9c03-3f0c-99fd-bcefc6aaca1f
- platform11: http://fusion2/982d88b5-28f9-38ef-a3a2-d824b919c13c
- platform5: http://fusion2/a7e89bcd-86a0-33b2-8f33-2bb24ef3afb5
- platform15: http://fusion2/e56dcb19-6dcd-35a0-b5ee-30740fbf27df
- platform17: http://fusion2/d0e6af61-eb95-3a70-a6a3-d1bdab987ea2
- platform18: http://fusion2/cda6ba3a-58f5-3907-b584-04786b9fe634
- platform25: http://fusion2/714cc620-6f0a-3bfd-90dd-95356b62b54b
Google-Bug-Id: 482144905
Change-Id: Ibc550bc75fa90d07610290a0a47bed5b4d090229
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-build-use-yaml_selected_subdirs.patch b/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-build-use-yaml_selected_subdirs.patch
new file mode 100644
index 0000000..19a9aed
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-build-use-yaml_selected_subdirs.patch
@@ -0,0 +1,180 @@
+From 423c3ed5fa9242965602a9e71692569037cfef48 Mon Sep 17 00:00:00 2001
+From: Willy Tu <wltu@google.com>
+Date: Thu, 5 Feb 2026 16:48:06 +0000
+Subject: [PATCH] build: use yaml_selected_subdirs
+
+This is needed to sync with latest sdbusplus.
+
+Signed-off-by: Willy Tu <wltu@google.com>
+---
+ meson.build | 107 ++++++++++++++++------------------------------------
+ 1 file changed, 32 insertions(+), 75 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index be9b03a..7a28e84 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,4 +1,6 @@
+-project('phosphor-dbus-interfaces', 'cpp',
++project(
++    'phosphor-dbus-interfaces',
++    'cpp',
+     meson_version: '>=1.1.1',
+     default_options: [
+         'buildtype=debugoptimized',
+@@ -15,36 +17,38 @@ sdbusplusplus_prog = find_program('sdbus++', native: true)
+ sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
+ sdbusplusplus_depfiles = files()
+ if sdbusplus_dep.type_name() == 'internal'
+-    sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
++    sdbusplusplus_depfiles = subproject('sdbusplus').get_variable(
++        'sdbusplusplus_depfiles',
++    )
+ endif
+ 
+ # Parse options to determine appropriate subdirectories to support.
+-selected_subdirs = []
++yaml_selected_subdirs = []
+ if get_option('data_com_google')
+-    selected_subdirs += 'com/google'
++    yaml_selected_subdirs += 'com/google'
+ endif
+ if get_option('data_com_ibm')
+-    selected_subdirs += 'com/ibm'
++    yaml_selected_subdirs += 'com/ibm'
+ endif
+ if get_option('data_com_intel')
+-    selected_subdirs += 'com/intel'
++    yaml_selected_subdirs += 'com/intel'
+ endif
+ if get_option('data_com_meta')
+-    selected_subdirs += 'com/meta'
++    yaml_selected_subdirs += 'com/meta'
+ endif
+ if get_option('data_org_freedesktop')
+-    selected_subdirs += 'org/freedesktop'
++    yaml_selected_subdirs += 'org/freedesktop'
+ endif
+ if get_option('data_org_open_power')
+-    selected_subdirs += 'org/open_power'
++    yaml_selected_subdirs += 'org/open_power'
+ endif
+ if get_option('data_xyz_openbmc_project')
+-    selected_subdirs += 'xyz/openbmc_project'
++    yaml_selected_subdirs += 'xyz/openbmc_project'
+ endif
+ 
+ # Install the selected YAML files.
+ inst_yaml_dir = get_option('datadir') / 'phosphor-dbus-yaml/yaml'
+-foreach d : selected_subdirs
++foreach d : yaml_selected_subdirs
+     install_subdir(
+         'yaml' / d,
+         install_dir: inst_yaml_dir / d,
+@@ -58,69 +62,12 @@ if not get_option('libphosphor_dbus')
+     subdir_done()
+ endif
+ 
+-generated_sources = []
+-generated_others = []
+-yaml_sources = []
++should_generate_cpp = true
++should_generate_registry = false
++should_generate_markdown = get_option('generate_md')
+ 
+ # Source the generated meson files.
+ subdir('gen')
+-foreach d : selected_subdirs
+-  subdir('gen' / d)
+-endforeach
+-custom_target(
+-    'md',
+-    command: 'true',
+-    output: 'md',
+-    capture: true,
+-    depends: generated_others,
+-    build_by_default: get_option('generate_md'))
+-
+-generated_files_headers = []
+-generated_files_cpp = []
+-foreach s : generated_sources
+-    foreach f : s.to_list()
+-        p = f.full_path()
+-        if p.endswith('.hpp')
+-            generated_files_headers += f
+-        elif p.endswith('.cpp')
+-            generated_files_cpp += f
+-        else
+-            error('Unknown filetype: ' + p)
+-        endif
+-    endforeach
+-endforeach
+-
+-generated_root = meson.current_build_dir() / 'gen/'
+-exclude_cpp = []
+-foreach f : generated_files_cpp
+-    exclude_cpp += f.full_path().replace(generated_root, '').strip('/')
+-endforeach
+-
+-# Install the generated header files.
+-exclude = exclude_cpp
+-foreach o : generated_others
+-    foreach f : o.to_list()
+-        exclude += f.full_path().replace(generated_root, '').strip('/')
+-    endforeach
+-endforeach
+-install_subdir(
+-    generated_root,
+-    exclude_files: exclude,
+-    install_dir: get_option('includedir'),
+-    strip_directory: true,
+-)
+-
+-# Install the generated markdown files.
+-exclude = exclude_cpp
+-foreach f : generated_files_headers
+-    exclude += f.full_path().replace(generated_root, '').strip('/')
+-endforeach
+-install_subdir(
+-    generated_root,
+-    exclude_files: exclude,
+-    install_dir: get_option('datadir') / 'doc' / meson.project_name(),
+-    strip_directory: true,
+-)
+ 
+ # Define and build libphosphor_dbus.so from the C++ files.
+ libphosphor_dbus = library(
+@@ -138,15 +84,26 @@ import('pkgconfig').generate(
+     name: meson.project_name(),
+     version: meson.project_version(),
+     description: 'Generated sdbusplus bindings for phosphor-dbus-interfaces',
+-    variables: ['yamldir=' + '${pc_sysrootdir}${prefix}' / inst_yaml_dir],
++    variables: [
++        'yamldir=' + '${pc_sysrootdir}${prefix}' / inst_yaml_dir,
++    ],
+ )
+ 
+ phosphor_dbus_interfaces_dep = declare_dependency(
+-    sources: generated_files_headers,
++    sources: [generated_headers],
+     include_directories: include_directories('gen'),
+     link_with: libphosphor_dbus,
+     dependencies: sdbusplus_dep,
+-    variables: ['yamldir=' + meson.project_source_root() / 'yaml'],
++    variables: [
++        'yamldir=' + meson.project_source_root() / 'yaml',
++    ],
+ )
+ 
+-meson.override_dependency('phosphor-dbus-interfaces', phosphor_dbus_interfaces_dep)
++if meson.is_subproject()
++    phosphor_dbus_interfaces_dep = phosphor_dbus_interfaces_dep.as_system()
++endif
++
++meson.override_dependency(
++    'phosphor-dbus-interfaces',
++    phosphor_dbus_interfaces_dep,
++)
+-- 
+2.53.0.rc2.204.g2597b5adb4-goog
+
diff --git a/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index e4af7aa..d1fb85e 100644
--- a/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -1,6 +1,6 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:"
 
-SRC_URI:append = "\
+SRC_URI:append:gbmc = "\
     file://0001-Inventory-Add-volume-attach-detach-properties.patch \
     file://0002-Inventory-Add-StorageControllerSecurity-interface.patch \
     file://0003-NVMe-Add-interfaces-for-NVMe-specific-properties.patch \
@@ -15,9 +15,10 @@
     file://0001-phosphor-dbus-interfaces-add-IliadCPER-as-a-FaultLog.patch \
     file://0002-phosphor-dbus-interfaces-add-MetisCPER-as-a-FaultLog.patch \
     file://0001-Add-PrettyName-and-Log-fields-for-FaultLog-interface.patch \
+    file://0001-build-use-yaml_selected_subdirs.patch \
 "
 
-EXTRA_OEMESON += " \
+EXTRA_OEMESON:gbmc += " \
     -Ddata_com_ibm=false \
     -Ddata_com_meta=false \
 "