summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-10-07 17:50:50 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-10-07 17:55:15 +0200
commit37b4031d1f22c7b09d35a4c1951e721a0d647801 (patch)
tree83cc7d8069f5803627790e72d358cdf976561b14 /dev-util/catkin
parentdev-ros/mavlink-gbp-release: remove old (diff)
downloadgentoo-37b4031d1f22c7b09d35a4c1951e721a0d647801.tar.gz
gentoo-37b4031d1f22c7b09d35a4c1951e721a0d647801.tar.bz2
gentoo-37b4031d1f22c7b09d35a4c1951e721a0d647801.zip
dev-util/catkin: install package.xml in /usr/share/ros_packages/$PKG.
This fixes rospack warnings and more importantly rospack reading the whole /usr/share hierarchy. Bug #595004 Package-Manager: portage-2.3.1
Diffstat (limited to 'dev-util/catkin')
-rw-r--r--dev-util/catkin/catkin-0.7.1-r2.ebuild (renamed from dev-util/catkin/catkin-0.7.1-r1.ebuild)10
-rw-r--r--dev-util/catkin/catkin-9999.ebuild10
-rw-r--r--dev-util/catkin/files/40catkin2
-rw-r--r--dev-util/catkin/files/catkin_prefix_path_util_py.patch24
-rw-r--r--dev-util/catkin/files/package_xml.patch37
5 files changed, 82 insertions, 1 deletions
diff --git a/dev-util/catkin/catkin-0.7.1-r1.ebuild b/dev-util/catkin/catkin-0.7.1-r2.ebuild
index cf494b1753ee..02c18e9c0e1e 100644
--- a/dev-util/catkin/catkin-0.7.1-r1.ebuild
+++ b/dev-util/catkin/catkin-0.7.1-r2.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}/catkin_prefix_path.patch"
"${FILESDIR}/gnuinstalldirs.patch"
"${FILESDIR}/catkin_prefix_path_util_py.patch"
+ "${FILESDIR}/package_xml.patch"
)
src_prepare() {
@@ -98,3 +99,12 @@ src_install() {
# needed to be considered as a workspace
touch "${ED}/usr/.catkin"
}
+
+pkg_postinst() {
+ ewarn "Starting from version 0.7.1-r2, dev-util/catkin changed the"
+ ewarn "installation path for package.xml files on Gentoo."
+ ewarn "In order for ROS to work properly, you will need to reinstall ROS"
+ ewarn "packages that have it installed in the old location:"
+ ewarn " emerge -1O /usr/share/*/package.xml"
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=595004 for more details."
+}
diff --git a/dev-util/catkin/catkin-9999.ebuild b/dev-util/catkin/catkin-9999.ebuild
index cf494b1753ee..02c18e9c0e1e 100644
--- a/dev-util/catkin/catkin-9999.ebuild
+++ b/dev-util/catkin/catkin-9999.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}/catkin_prefix_path.patch"
"${FILESDIR}/gnuinstalldirs.patch"
"${FILESDIR}/catkin_prefix_path_util_py.patch"
+ "${FILESDIR}/package_xml.patch"
)
src_prepare() {
@@ -98,3 +99,12 @@ src_install() {
# needed to be considered as a workspace
touch "${ED}/usr/.catkin"
}
+
+pkg_postinst() {
+ ewarn "Starting from version 0.7.1-r2, dev-util/catkin changed the"
+ ewarn "installation path for package.xml files on Gentoo."
+ ewarn "In order for ROS to work properly, you will need to reinstall ROS"
+ ewarn "packages that have it installed in the old location:"
+ ewarn " emerge -1O /usr/share/*/package.xml"
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=595004 for more details."
+}
diff --git a/dev-util/catkin/files/40catkin b/dev-util/catkin/files/40catkin
index 46a6edf00ca1..469fa37997cc 100644
--- a/dev-util/catkin/files/40catkin
+++ b/dev-util/catkin/files/40catkin
@@ -1,3 +1,3 @@
CATKIN_PREFIX_PATH=/usr
ROS_ROOT=/usr/share/ros
-ROS_PACKAGE_PATH=/usr/share
+ROS_PACKAGE_PATH=/usr/share/ros_packages
diff --git a/dev-util/catkin/files/catkin_prefix_path_util_py.patch b/dev-util/catkin/files/catkin_prefix_path_util_py.patch
index d97817662e76..e667ea9cf59e 100644
--- a/dev-util/catkin/files/catkin_prefix_path_util_py.patch
+++ b/dev-util/catkin/files/catkin_prefix_path_util_py.patch
@@ -14,3 +14,27 @@ Index: catkin-0.6.16/cmake/templates/_setup_util.py.in
# prepend current workspace if not already part of CPP
base_path = os.path.dirname(__file__)
if base_path not in CMAKE_PREFIX_PATH:
+Index: catkin-0.7.1/python/catkin/builder.py
+===================================================================
+--- catkin-0.7.1.orig/python/catkin/builder.py
++++ catkin-0.7.1/python/catkin/builder.py
+@@ -1026,6 +1026,7 @@ def build_workspace_isolated(
+ 'CATKIN_LIB_ENVIRONMENT_PATHS': "'lib'",
+ 'CATKIN_PKGCONFIG_ENVIRONMENT_PATHS': "os.path.join('lib', 'pkgconfig')",
+ 'CMAKE_PREFIX_PATH_AS_IS': ';'.join(os.environ['CMAKE_PREFIX_PATH'].split(os.pathsep)),
++ 'CATKIN_PREFIX_PATH': ';'.join(os.environ['CATKIN_PREFIX_PATH'].split(os.pathsep)),
+ 'PYTHON_EXECUTABLE': sys.executable,
+ 'PYTHON_INSTALL_DIR': get_python_install_dir(),
+ }
+Index: catkin-0.7.1/test/unit_tests/test_setup_util.py
+===================================================================
+--- catkin-0.7.1.orig/test/unit_tests/test_setup_util.py
++++ catkin-0.7.1/test/unit_tests/test_setup_util.py
+@@ -14,6 +14,7 @@ data = configure_file(os.path.join(os.pa
+ 'PYTHON_EXECUTABLE': sys.executable,
+ 'PYTHON_INSTALL_DIR': 'pythonX.Y/packages',
+ 'CMAKE_PREFIX_PATH_AS_IS': '',
++ 'CATKIN_PREFIX_PATH':'',
+ })
+ with tempfile.NamedTemporaryFile('w+') as setup_util_file:
+ setup_util_file.write(data)
diff --git a/dev-util/catkin/files/package_xml.patch b/dev-util/catkin/files/package_xml.patch
new file mode 100644
index 000000000000..6099f0796010
--- /dev/null
+++ b/dev-util/catkin/files/package_xml.patch
@@ -0,0 +1,37 @@
+Index: catkin-0.7.1/cmake/catkin_package.cmake
+===================================================================
+--- catkin-0.7.1.orig/cmake/catkin_package.cmake
++++ catkin-0.7.1/cmake/catkin_package.cmake
+@@ -518,6 +518,6 @@ function(_catkin_package)
+
+ # install package.xml
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/package.xml
+- DESTINATION share/${PROJECT_NAME}
++ DESTINATION share/ros_packages/${PROJECT_NAME}
+ )
+ endfunction()
+Index: catkin-0.7.1/cmake/all.cmake
+===================================================================
+--- catkin-0.7.1.orig/cmake/all.cmake
++++ catkin-0.7.1/cmake/all.cmake
+@@ -156,7 +156,7 @@ foreach(filename
+ endforeach()
+
+ # output catkin version for debugging
+-_catkin_package_xml(${CMAKE_BINARY_DIR}/catkin/catkin_generated/version DIRECTORY ${catkin_EXTRAS_DIR}/..)
++#_catkin_package_xml(${CMAKE_BINARY_DIR}/catkin/catkin_generated/version DIRECTORY ${catkin_EXTRAS_DIR}/../../ros_packages/catkin)
+ message(STATUS "catkin ${catkin_VERSION}")
+ # ensure that no current package name is set
+ unset(_CATKIN_CURRENT_PACKAGE)
+Index: catkin-0.7.1/cmake/catkin_metapackage.cmake
+===================================================================
+--- catkin-0.7.1.orig/cmake/catkin_metapackage.cmake
++++ catkin-0.7.1/cmake/catkin_metapackage.cmake
+@@ -40,6 +40,6 @@ function(catkin_metapackage)
+
+ # install package.xml
+ install(FILES ${ARG_DIRECTORY}/package.xml
+- DESTINATION share/${PROJECT_NAME}
++ DESTINATION share/ros_packages/${PROJECT_NAME}
+ )
+ endfunction()