new file mode 100644
@@ -0,0 +1,59 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <khem.raj@oss.qualcomm.com>
+Date: Sat, 28 Nov 2026 17:13:40 -0800
+Subject: [PATCH] cmake: Install the generated pkg-config file from the build
+ directory
+
+CONFIGURE_FILE() writes libubox.pc relative to the build directory, but
+INSTALL(FILES libubox.pc) looks for it in the source directory, so an
+out-of-tree build fails in the install step. Use the binary directory
+path for both, install it to CMAKE_INSTALL_LIBDIR, and take prefix,
+libdir and includedir from the CMake install paths instead of
+hard-coding /usr/lib.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
+---
+ CMakeLists.txt | 8 +++++---
+ libubox.pc.in | 6 +++---
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8bfc723..61163e8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,14 +36,16 @@ IF(NOT HAVE_GETTIME OR NOT HAVE_SHM)
+ ENDIF()
+ ENDIF()
+
++INCLUDE(GNUInstallDirs)
++
+ CONFIGURE_FILE(
+ libubox.pc.in
+- libubox.pc
++ ${CMAKE_CURRENT_BINARY_DIR}/libubox.pc
+ @ONLY
+ )
+
+-INSTALL(FILES libubox.pc
+- DESTINATION lib/pkgconfig
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libubox.pc
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ )
+ FILE(GLOB headers *.h)
+ LIST(FILTER headers EXCLUDE REGEX "-priv.h$" )
+diff --git a/libubox.pc.in b/libubox.pc.in
+index 43c3ebc..29e69be 100644
+--- a/libubox.pc.in
++++ b/libubox.pc.in
+@@ -1,7 +1,7 @@
+-prefix=/usr
++prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
+-includedir=${prefix}/include
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+ Name: libubox
+ Description: OpenWrt basic utility library
@@ -17,9 +17,10 @@ SRC_URI = "\
file://0001-cmake-Set-library-version.patch \
file://0002-cmake-fix-the-CMAKE_INSTALL_LIBDIR.patch \
file://0003-cmake-Don-t-include-lua-and-examples-directories-if-.patch \
+ file://0004-cmake-Install-the-generated-pkg-config-file-from-the.patch \
"
-SRCREV = "b7acc8e6fd5e13611ad90a593e98f9589af4009a"
+SRCREV = "184418767364cacbab01525b533a8717d5e117e1"
PV = "1.0.1+git"
# Upstream repo does not tag
Move SRCREV from b7acc8e6fd5e (2025-06-04) to 184418767364 (2026-11-27), 90 commits. - Generates and installs a pkg-config file. - Fixes use-after-free bugs in uloop (process and signal callbacks, interval timers) and kvlist, and an out-of-bounds read in blobmsg_json. - udebug validates shared-memory size and ring metadata from peers. - kqueue fixes in uloop and size_t lengths treewide. The new pkg-config support fails out of tree: libubox.pc is generated in the build directory but installed from the source directory, and it hard-codes /usr/lib. Add 0004-cmake-Install-the-generated-pkg-config-file-from-the.patch to install it from the build directory into CMAKE_INSTALL_LIBDIR with the CMake install paths. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- ...e-generated-pkg-config-file-from-the.patch | 59 +++++++++++++++++++ .../recipes-devtools/libubox/libubox_git.bb | 3 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-devtools/libubox/libubox/0004-cmake-Install-the-generated-pkg-config-file-from-the.patch