Skip to content

Commit

Permalink
{rolling} uncrustify-vendor: Ignore uncrustify version suffix
Browse files Browse the repository at this point in the history
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 <rob.woolley@windriver.com>
  • Loading branch information
robwoolley committed Apr 23, 2024
1 parent e1623e5 commit d01726d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
@@ -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 <rob.woolley@windriver.com>

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()
@@ -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 \
"

0 comments on commit d01726d

Please sign in to comment.