File 0002-correct-include-paths-pkgconfig.patch of Package mir

From d7cb9add46f83fb989017072de1508a6653cee7f Mon Sep 17 00:00:00 2001
From: Shawn W Dunn <sfalken@opensuse.org>
Date: Wed, 17 Dec 2025 06:57:33 -0800
Subject: [PATCH 2/2] correct include paths/pkgconfig

https://github.com/canonical/mir/pull/4573/files
---
 CMakeLists.txt                       | 2 ++
 src/common/CMakeLists.txt            | 2 --
 src/miral/CMakeLists.txt             | 2 +-
 src/miral/miral.pc.in                | 2 +-
 src/platforms/wayland/CMakeLists.txt | 2 --
 src/server/CMakeLists.txt            | 2 --
 6 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a139e8..ba03ddc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -258,6 +258,7 @@ endif()
 pkg_check_modules(DRM REQUIRED IMPORTED_TARGET libdrm)
 pkg_check_modules(EGL REQUIRED IMPORTED_TARGET egl)
 pkg_check_modules(EPOXY REQUIRED IMPORTED_TARGET epoxy)
+pkg_check_modules(FREETYPE freetype2 REQUIRED IMPORTED_TARGET)
 pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0 gio-unix-2.0)
 pkg_check_modules(GLESv2 REQUIRED IMPORTED_TARGET glesv2)
 pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
@@ -274,6 +275,7 @@ pkg_check_modules(XCB_RANDR REQUIRED IMPORTED_TARGET xcb-randr)
 pkg_check_modules(XCB_RENDER REQUIRED IMPORTED_TARGET xcb-render)
 pkg_check_modules(XCB_RES REQUIRED IMPORTED_TARGET xcb-res)
 pkg_check_modules(XCB_XFIXES REQUIRED IMPORTED_TARGET xcb-xfixes)
+pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
 
 include(CheckCXXSymbolExists)
 
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 60938ea..a43479d 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,5 +1,3 @@
-pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
-
 add_compile_definitions(MIR_LOG_COMPONENT_FALLBACK="mircommon")
 
 set(MIR_COMMON_SOURCES)
diff --git a/src/miral/CMakeLists.txt b/src/miral/CMakeLists.txt
index ed714df..e6a65fa 100644
--- a/src/miral/CMakeLists.txt
+++ b/src/miral/CMakeLists.txt
@@ -8,7 +8,6 @@ set(miral_include ${PROJECT_SOURCE_DIR}/include/miral)
 
 pkg_check_modules(YAML REQUIRED IMPORTED_TARGET yaml-cpp)
 pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0 gio-unix-2.0)
-pkg_check_modules(FREETYPE freetype2 REQUIRED IMPORTED_TARGET)
 
 add_compile_definitions(MIR_LOG_COMPONENT_FALLBACK="miral" MIRAL_ENABLE_DEPRECATIONS=0)
 
@@ -198,6 +197,7 @@ target_include_directories(miral
 target_link_libraries(miral-external
     PUBLIC
         mircore
+        PkgConfig::XKBCOMMON
     PRIVATE
         miral-internal
         mirserver
diff --git a/src/miral/miral.pc.in b/src/miral/miral.pc.in
index 2d94231..4821075 100644
--- a/src/miral/miral.pc.in
+++ b/src/miral/miral.pc.in
@@ -5,6 +5,6 @@ includedir=@PKGCONFIG_INCLUDEDIR@/miral
 Name: miral
 Description: Mir Abstraction Layer library
 Version: @MIRAL_VERSION@
-Requires: mircore
+Requires: mircore, xkbcommon
 Libs: -L${libdir} -lmiral
 Cflags: -I${includedir}
diff --git a/src/platforms/wayland/CMakeLists.txt b/src/platforms/wayland/CMakeLists.txt
index 5dd1ce5..6a4f494 100644
--- a/src/platforms/wayland/CMakeLists.txt
+++ b/src/platforms/wayland/CMakeLists.txt
@@ -1,6 +1,4 @@
-pkg_check_modules(WAYLAND_CLIENT REQUIRED IMPORTED_TARGET wayland-client)
 pkg_check_modules(WAYLAND_EGL REQUIRED IMPORTED_TARGET wayland-egl)
-pkg_check_modules(XKBCOMMON xkbcommon REQUIRED IMPORTED_TARGET)
 
 add_compile_definitions(MIR_LOG_COMPONENT_FALLBACK="wayland")
 
diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
index 3601631..279d059 100644
--- a/src/server/CMakeLists.txt
+++ b/src/server/CMakeLists.txt
@@ -1,5 +1,3 @@
-pkg_check_modules(FREETYPE freetype2 REQUIRED IMPORTED_TARGET) # For rendering decorated window titles
-
 add_compile_definitions(
   MIR_LOG_COMPONENT_FALLBACK="mirserver"
   MIR_VERSION="${PROJECT_VERSION}"
-- 
2.52.0

openSUSE Build Service is sponsored by