2019-03-21 00:23:14 -04:00
|
|
|
isCatkinPackage() {
|
|
|
|
local pkg="$1"
|
|
|
|
[ -d "$pkg/share" ] && \
|
|
|
|
[ -n "$(find "$pkg/share" \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name package.xml -print -quit)" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
_addRosPackagePath() {
|
|
|
|
if isCatkinPackage "$1"; then
|
|
|
|
addToSearchPath ROS_PACKAGE_PATH "$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
addEnvHooks "$hostOffset" _addRosPackagePath
|
|
|
|
|
2019-04-06 01:46:54 -04:00
|
|
|
_catkinPostPatchHook() {
|
|
|
|
patchShebangs cfg
|
|
|
|
}
|
|
|
|
postPatchHooks+=(_catkinPostPatchHook)
|
|
|
|
|
2019-03-21 00:23:14 -04:00
|
|
|
_catkinPreConfigureHook() {
|
2019-04-06 01:46:54 -04:00
|
|
|
cmakeFlags+=" -DCATKIN_ENABLE_TESTING=${doCheck:-OFF}"
|
2019-03-21 00:23:14 -04:00
|
|
|
}
|
|
|
|
preConfigureHooks+=(_catkinPreConfigureHook)
|
|
|
|
|
2019-04-06 01:46:54 -04:00
|
|
|
_catkinPostInstallHook() {
|
|
|
|
pushd $out
|
|
|
|
rm -f *setup.*sh
|
|
|
|
rm -f _setup_util.py env.sh .rosinstall
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
postInstallHooks+=(_catkinPostInstallHook)
|
|
|
|
|
2019-03-21 00:23:14 -04:00
|
|
|
export ROS_DISTRO="@distro@"
|