From d01726dbc8916a0e0ffbbd370d60750848933a31 Mon Sep 17 00:00:00 2001 From: Rob Woolley Date: Tue, 23 Apr 2024 10:24:04 -0700 Subject: [PATCH] {rolling} uncrustify-vendor: Ignore uncrustify version suffix The uncrustify package introduced a suffix for cases where the make_version.py could not run. The uncrustify-vendor CMakeLists.txt file assumes the fallback suffix is present. We make this conditional as we build uncrustify cleanly and it doesn't have the suffix. Signed-off-by: Rob Woolley --- ...001-ignore_uncrustify_version_suffix.patch | 30 +++++++++++++++++++ .../uncrustify-vendor_%.bbappend | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor/0001-ignore_uncrustify_version_suffix.patch diff --git a/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor/0001-ignore_uncrustify_version_suffix.patch b/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor/0001-ignore_uncrustify_version_suffix.patch new file mode 100644 index 0000000000..be96ef84d2 --- /dev/null +++ b/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor/0001-ignore_uncrustify_version_suffix.patch @@ -0,0 +1,30 @@ +Ignore uncrustify verison suffix + +The uncrustify package introduced a suffix for cases where the make_version.py +could not run. Thus it is the fallback version string: + https://github.com/uncrustify/uncrustify/pull/1083 + +This is known by the maintainer cause problems with Debian as well: + https://github.com/uncrustify/uncrustify/issues/2782 + +The uncrustify-vendor CMakeLists.txt file assumes the fallback suffix is +present. We make this conditional as we build uncrustify cleanly and it +doesn't have the suffix. + +Upstream-Status: Pending + +Signed-off-by: Rob Woolley + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ddbe2ba..9f5098c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ function(check_uncrustify RESULT PROGRAM) + set(${RESULT} FALSE PARENT_SCOPE) + else() + # Before 0.65 uncrustify used a different versioning scheme so the regex won't match +- string(REGEX REPLACE "^Uncrustify(_d|)-(.*)_f$" "\\2" version_prefix_match "${out}") ++ string(REGEX REPLACE "^Uncrustify(_d|)-(.*)(_f|)$" "\\2" version_prefix_match "${out}") + if(NOT version_prefix_match OR version_prefix_match VERSION_LESS 0.78) + set(${RESULT} FALSE PARENT_SCOPE) + endif() diff --git a/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor_%.bbappend b/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor_%.bbappend index 57ff45891c..01588ea7fd 100644 --- a/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor_%.bbappend +++ b/meta-ros2-rolling/recipes-bbappends/uncrustify-vendor/uncrustify-vendor_%.bbappend @@ -1,5 +1,9 @@ # Copyright (c) 2024 Rethink Robotics GmbH +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://0001-ignore_uncrustify_version_suffix.patch" + ROS_BUILDTOOL_DEPENDS += " \ uncrustify-native \ "