summaryrefslogtreecommitdiff
path: root/dev-ros/ros_environment/files/catkinprefixpath.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-ros/ros_environment/files/catkinprefixpath.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-ros/ros_environment/files/catkinprefixpath.patch')
-rw-r--r--dev-ros/ros_environment/files/catkinprefixpath.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-ros/ros_environment/files/catkinprefixpath.patch b/dev-ros/ros_environment/files/catkinprefixpath.patch
new file mode 100644
index 000000000000..67f16ec9348a
--- /dev/null
+++ b/dev-ros/ros_environment/files/catkinprefixpath.patch
@@ -0,0 +1,20 @@
+Support CATKIN_PREFIX_PATH; let CMAKE_PREFIX_PATH come first, so that standard ROS methods still work even if we do not
+use them.
+
+Index: ros_environment-1.2.0/env-hooks/1.ros_package_path.sh.em
+===================================================================
+--- ros_environment-1.2.0.orig/env-hooks/1.ros_package_path.sh.em
++++ ros_environment-1.2.0/env-hooks/1.ros_package_path.sh.em
+@@ -4,8 +4,10 @@
+ PYTHON_CODE_BUILD_ROS_PACKAGE_PATH=$(cat <<EOF
+ from __future__ import print_function
+ import os
+-env_name = 'CMAKE_PREFIX_PATH'
+-paths = [path for path in os.environ[env_name].split(os.pathsep)] if env_name in os.environ and os.environ[env_name] != '' else []
++env_names = [ 'CMAKE_PREFIX_PATH', 'CATKIN_PREFIX_PATH' ]
++paths = []
++for env_name in env_names:
++ paths += [path for path in os.environ[env_name].split(os.pathsep)] if env_name in os.environ and os.environ[env_name] != '' else []
+ workspaces = [path for path in paths if os.path.exists(os.path.join(path, '.catkin'))]
+ paths = []
+ for workspace in workspaces: