From 1ca1493b71acc02e778138298dbc42d0f3e11fc6 Mon Sep 17 00:00:00 2001 From: Alper Ak Date: Wed, 9 Jul 2025 20:30:35 +0300 Subject: librdkafka: Upgrade 1.8.2 -> 2.11.0 to allow CMake 4+ compatibility - Dropped patch because fixed in the newer version. - The LICENSE file has changed so updated LIC_FILES_CHKSUM to match the new md5sum. - curl is needed as a dependency, so add it to prevent build error. Changelog: https://github.com/confluentinc/librdkafka/blob/v2.11.0/CHANGELOG.md Fix: | CMake Error at CMakeLists.txt:1 (cmake_minimum_required): | Compatibility with CMake < 3.5 has been removed from CMake. | | Update the VERSION argument value. Or, use the ... syntax | to tell CMake that the project requires at least but has been updated | to work with policies introduced by or earlier. | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. | | | -- Configuring incomplete, errors occurred! Signed-off-by: Alper Ak Signed-off-by: Khem Raj --- .../0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch | 30 ---------------------- .../recipes-support/librdkafka/librdkafka_1.8.2.bb | 22 ---------------- .../librdkafka/librdkafka_2.11.0.bb | 19 ++++++++++++++ 3 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 meta-oe/recipes-support/librdkafka/librdkafka/0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch delete mode 100644 meta-oe/recipes-support/librdkafka/librdkafka_1.8.2.bb create mode 100644 meta-oe/recipes-support/librdkafka/librdkafka_2.11.0.bb diff --git a/meta-oe/recipes-support/librdkafka/librdkafka/0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch b/meta-oe/recipes-support/librdkafka/librdkafka/0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch deleted file mode 100644 index 053a4cc2d8..0000000000 --- a/meta-oe/recipes-support/librdkafka/librdkafka/0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ed1dd35e0e23a98e57567718a0d474fd29cc348a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 19 Mar 2022 21:36:41 -0700 -Subject: [PATCH] cmake: Use CMAKE_INSTALL_LIBDIR - -this ensures that it is portable across platforms e.g. ppc64/linux -uses lib64 not lib - -Upstream-Status: Submitted [https://github.com/edenhill/librdkafka/pull/3770] -Signed-off-by: Khem Raj ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d1129bce..774473fa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -219,7 +219,7 @@ configure_file("packaging/cmake/config.h.in" "${GENERATED_DIR}/config.h") - - include(GNUInstallDirs) - --set(config_install_dir "lib/cmake/${PROJECT_NAME}") -+set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") - - set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") - --- -2.35.1 - diff --git a/meta-oe/recipes-support/librdkafka/librdkafka_1.8.2.bb b/meta-oe/recipes-support/librdkafka/librdkafka_1.8.2.bb deleted file mode 100644 index 968094daff..0000000000 --- a/meta-oe/recipes-support/librdkafka/librdkafka_1.8.2.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "the Apache Kafka C/C++ client library" -DESCRIPTION = "librdkafka is a C library implementation of the Apache Kafka protocol, \ - providing Producer, Consumer and Admin clients." -HOMEPAGE = "https://github.com/edenhill/librdkafka" -SECTION = "libs" -LICENSE = "BSD-2-Clause" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=2be8675acbfdac48935e73897af5f646" - -SRC_URI = "git://github.com/edenhill/librdkafka;protocol=https;branch=master \ - file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch \ - " -SRCREV = "063a9ae7a65cebdf1cc128da9815c05f91a2a996" - -DEPENDS = "zlib openssl zstd" - -inherit cmake - - -FILES:${PN} += "${datadir}" - -EXTRA_OECMAKE += "-DRDKAFKA_BUILD_EXAMPLES=OFF -DRDKAFKA_BUILD_TESTS=OFF" diff --git a/meta-oe/recipes-support/librdkafka/librdkafka_2.11.0.bb b/meta-oe/recipes-support/librdkafka/librdkafka_2.11.0.bb new file mode 100644 index 0000000000..b1f5196f93 --- /dev/null +++ b/meta-oe/recipes-support/librdkafka/librdkafka_2.11.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "the Apache Kafka C/C++ client library" +DESCRIPTION = "librdkafka is a C library implementation of the Apache Kafka protocol, \ + providing Producer, Consumer and Admin clients." +HOMEPAGE = "https://github.com/edenhill/librdkafka" +SECTION = "libs" +LICENSE = "BSD-2-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=40b04809b5d6f648f20f45143cbcb1ad" + +SRC_URI = "git://github.com/edenhill/librdkafka;protocol=https;branch=master" +SRCREV = "c56a3e68483ae33622901988ab9c4085f0785c3c" + +DEPENDS = "zlib openssl zstd curl" + +inherit cmake + +FILES:${PN} += "${datadir}" + +EXTRA_OECMAKE += "-DRDKAFKA_BUILD_EXAMPLES=OFF -DRDKAFKA_BUILD_TESTS=OFF" -- cgit v1.2.3-54-g00ecf