diff options
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | deprecated-log-macros.patch | 107 | ||||
-rw-r--r-- | remove-boost-signals.patch | 28 |
3 files changed, 144 insertions, 7 deletions
@@ -32,15 +32,17 @@ depends=(${ros_depends[@]} # Tarball version (faster download) _dir="geometry2-release-release-kinetic-tf2-${pkgver}-${_pkgver_patch}" -source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-gbp/geometry2-release/archive/release/kinetic/tf2/${pkgver}-${_pkgver_patch}.tar.gz") -sha256sums=('a77e9391ece6f3c2d65fcce807dc9f9c79982e226bb8b75555d38b35abf5d140') +source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-gbp/geometry2-release/archive/release/kinetic/tf2/${pkgver}-${_pkgver_patch}.tar.gz" + "deprecated-log-macros.patch::https://github.com/ros/geometry2/commit/0173a538f89c66e2783dc67ee3609660625e16b4.patch" + "remove-boost-signals.patch::https://github.com/ros/geometry2/commit/6223549e4d5e1d442a9cfb8e8c7334bcc62c1662.patch") +sha256sums=('a77e9391ece6f3c2d65fcce807dc9f9c79982e226bb8b75555d38b35abf5d140' + '78c2afef26f613c6461c6bd330147c7b75e9bb1d1fac88a2a43dff1f10e7b1a6' + '29b1d7bc96363847cd03f504504e4dcca142f05517b126327a2eaac1948a0638') prepare() { - cd ${srcdir} - find . \( -iname *.cpp -o -iname *.h \) \ - -exec sed -r -i "s/[^_]logError/CONSOLE_BRIDGE_logError/" {} \; \ - -exec sed -r -i "s/[^_]logWarn/CONSOLE_BRIDGE_logWarn/" {} \; \ - -exec sed -r -i "s/[^_]logDebug/CONSOLE_BRIDGE_logDebug/" {} \; + cd "${srcdir}/${_dir}" + patch -p2 -i "${srcdir}/deprecated-log-macros.patch" + patch -p2 -i "${srcdir}/remove-boost-signals.patch" } build() { diff --git a/deprecated-log-macros.patch b/deprecated-log-macros.patch new file mode 100644 index 000000000000..80e3dce3a020 --- /dev/null +++ b/deprecated-log-macros.patch @@ -0,0 +1,107 @@ +From 0173a538f89c66e2783dc67ee3609660625e16b4 Mon Sep 17 00:00:00 2001 +From: Tim Rakowski <tim.rakowski@googlemail.com> +Date: Thu, 4 Jan 2018 23:14:31 +0100 +Subject: [PATCH] Replaced deprecated log macro calls + +--- + tf2/src/buffer_core.cpp | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/tf2/src/buffer_core.cpp b/tf2/src/buffer_core.cpp +index 6483ada9..75b827d1 100644 +--- a/tf2/src/buffer_core.cpp ++++ b/tf2/src/buffer_core.cpp +@@ -123,7 +123,7 @@ bool BufferCore::warnFrameId(const char* function_name_arg, const std::string& f + { + std::stringstream ss; + ss << "Invalid argument passed to "<< function_name_arg <<" in tf2 frame_ids cannot be empty"; +- logWarn("%s",ss.str().c_str()); ++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str()); + return true; + } + +@@ -131,7 +131,7 @@ bool BufferCore::warnFrameId(const char* function_name_arg, const std::string& f + { + std::stringstream ss; + ss << "Invalid argument \"" << frame_id << "\" passed to "<< function_name_arg <<" in tf2 frame_ids cannot start with a '/' like: "; +- logWarn("%s",ss.str().c_str()); ++ CONSOLE_BRIDGE_logWarn("%s",ss.str().c_str()); + return true; + } + +@@ -218,26 +218,26 @@ bool BufferCore::setTransform(const geometry_msgs::TransformStamped& transform_i + bool error_exists = false; + if (stripped.child_frame_id == stripped.header.frame_id) + { +- logError("TF_SELF_TRANSFORM: Ignoring transform from authority \"%s\" with frame_id and child_frame_id \"%s\" because they are the same", authority.c_str(), stripped.child_frame_id.c_str()); ++ CONSOLE_BRIDGE_logError("TF_SELF_TRANSFORM: Ignoring transform from authority \"%s\" with frame_id and child_frame_id \"%s\" because they are the same", authority.c_str(), stripped.child_frame_id.c_str()); + error_exists = true; + } + + if (stripped.child_frame_id == "") + { +- logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str()); ++ CONSOLE_BRIDGE_logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str()); + error_exists = true; + } + + if (stripped.header.frame_id == "") + { +- logError("TF_NO_FRAME_ID: Ignoring transform with child_frame_id \"%s\" from authority \"%s\" because frame_id not set", stripped.child_frame_id.c_str(), authority.c_str()); ++ CONSOLE_BRIDGE_logError("TF_NO_FRAME_ID: Ignoring transform with child_frame_id \"%s\" from authority \"%s\" because frame_id not set", stripped.child_frame_id.c_str(), authority.c_str()); + error_exists = true; + } + + if (std::isnan(stripped.transform.translation.x) || std::isnan(stripped.transform.translation.y) || std::isnan(stripped.transform.translation.z)|| + std::isnan(stripped.transform.rotation.x) || std::isnan(stripped.transform.rotation.y) || std::isnan(stripped.transform.rotation.z) || std::isnan(stripped.transform.rotation.w)) + { +- logError("TF_NAN_INPUT: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of a nan value in the transform (%f %f %f) (%f %f %f %f)", ++ CONSOLE_BRIDGE_logError("TF_NAN_INPUT: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of a nan value in the transform (%f %f %f) (%f %f %f %f)", + stripped.child_frame_id.c_str(), authority.c_str(), + stripped.transform.translation.x, stripped.transform.translation.y, stripped.transform.translation.z, + stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w +@@ -252,7 +252,7 @@ bool BufferCore::setTransform(const geometry_msgs::TransformStamped& transform_i + + if (!valid) + { +- logError("TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of an invalid quaternion in the transform (%f %f %f %f)", ++ CONSOLE_BRIDGE_logError("TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of an invalid quaternion in the transform (%f %f %f %f)", + stripped.child_frame_id.c_str(), authority.c_str(), + stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w); + error_exists = true; +@@ -274,7 +274,7 @@ bool BufferCore::setTransform(const geometry_msgs::TransformStamped& transform_i + } + else + { +- logWarn("TF_OLD_DATA ignoring data from the past for frame %s at time %g according to authority %s\nPossible reasons are listed at http://wiki.ros.org/tf/Errors%%20explained", stripped.child_frame_id.c_str(), stripped.header.stamp.toSec(), authority.c_str()); ++ CONSOLE_BRIDGE_logWarn("TF_OLD_DATA ignoring data from the past for frame %s at time %g according to authority %s\nPossible reasons are listed at http://wiki.ros.org/tf/Errors%%20explained", stripped.child_frame_id.c_str(), stripped.header.stamp.toSec(), authority.c_str()); + return false; + } + } +@@ -633,7 +633,7 @@ geometry_msgs::TransformStamped BufferCore::lookupTransform(const std::string& t + case tf2_msgs::TF2Error::LOOKUP_ERROR: + throw LookupException(error_string); + default: +- logError("Unknown error code: %d", retval); ++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); + assert(0); + } + } +@@ -1604,7 +1604,7 @@ void BufferCore::_chainAsVector(const std::string & target_frame, ros::Time targ + case tf2_msgs::TF2Error::LOOKUP_ERROR: + throw LookupException(error_string); + default: +- logError("Unknown error code: %d", retval); ++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); + assert(0); + } + } +@@ -1623,7 +1623,7 @@ void BufferCore::_chainAsVector(const std::string & target_frame, ros::Time targ + case tf2_msgs::TF2Error::LOOKUP_ERROR: + throw LookupException(error_string); + default: +- logError("Unknown error code: %d", retval); ++ CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); + assert(0); + } + } diff --git a/remove-boost-signals.patch b/remove-boost-signals.patch new file mode 100644 index 000000000000..21d73e6e9d59 --- /dev/null +++ b/remove-boost-signals.patch @@ -0,0 +1,28 @@ +From 6223549e4d5e1d442a9cfb8e8c7334bcc62c1662 Mon Sep 17 00:00:00 2001 +From: Maarten de Vries <maarten@de-vri.es> +Date: Thu, 17 Jan 2019 16:00:14 +0100 +Subject: [PATCH] Remove `signals` from find_package(Boost COMPONENTS ...). + +tf2 is using signals2, which is not the same library. +Additionally, signals2 has always been header only, and header only +libraries must not be listed in find_package. + +Boost 1.69 removed the old signals library entirely, so the otherwise +useless `COMPONENTS signals` actually breaks the build. +--- + tf2/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tf2/CMakeLists.txt b/tf2/CMakeLists.txt +index 9ffb17a2..7a6da342 100644 +--- a/tf2/CMakeLists.txt ++++ b/tf2/CMakeLists.txt +@@ -3,7 +3,7 @@ project(tf2) + + find_package(console_bridge REQUIRED) + find_package(catkin REQUIRED COMPONENTS geometry_msgs rostime tf2_msgs) +-find_package(Boost REQUIRED COMPONENTS signals system thread) ++find_package(Boost REQUIRED COMPONENTS system thread) + + catkin_package( + INCLUDE_DIRS include |