avro-c++: Use fmt from oe-core instead of bundling fmt 10.2.1
PATCH 1/1 avro-c++: Use fmt from oe-core instead of bundling fmt 10.2.1
From: Sana Kazi <[email protected]>
avro-c++'s CMakeLists.txt calls find_package(fmt) and only falls back to fetching fmt 10.2.1 via FetchContent if fmt isn't found. The recipe never added fmt to DEPENDS, so find_package fallback is always triggered. The recipe then had to stage it into ${B}/_deps/fmt-src.
oe-core already provides fmt_12.1.0, and avro-c++ only uses a small, stable part of its API (fmt::format_string, fmt::format, fmt::formatter<T>) that is unchanged between 10.x and 12.x.
Add fmt to DEPENDS so find_package(fmt) succeeds and avro-c++ links oe-core's fmt instead, and drop the fmt SRC_URI, SRCREV_fmt and do_configure:prepend()
Following tests provided by avro-c++ use fmt headers:
CodecTests DataFileTests SchemaTests buffertest unittest No tests are breaking after using fmt_12.1.0.
--- meta-oe/recipes-support/avro/avro-c++_1.12.1.bb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
meta-oe/recipes-support/avro/avro-c++_1.12.1.bb +1 -9
@@ -5,26 +5,18 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=34cb96edab958a981837bf6f44bf654d" -DEPENDS = "boost" +DEPENDS = "boost fmt" SRC_URI = "git://github.com/apache/avro.git;branch=branch-1.12;protocol=https;name=avro-c++;tag=release-${PV} \ - git://github.com/fmtlib/fmt.git;branch=10.x;protocol=https;name=fmt;destsuffix=_deps/fmt-src \ " -SRCREV_FORMAT = "avro-c++_fmt" SRCREV_avro-c++ = "9110c693767c1dde2665b2b57939333478b12036" -# Tag 10.2.1 -SRCREV_fmt = "e69e5f977d458f2650bb346dadf2ad30c5320281" S = "${UNPACKDIR}/${BP}/lang/c++" inherit cmake pkgconfig EXTRA_OECMAKE += "-DAVRO_BUILD_TESTS=OFF" -do_configure:prepend() { - install -d ${B}/_deps - cp -r ${UNPACKDIR}/_deps/fmt-src ${B}/_deps/ -} # Workaround for 32-bit build failures due to -Werror: # 'useless-cast' in Symbol.cc and 'conversion' in FileStream.cc
Signature · 1 line
2.43.0