dev-python/catkin_pkg: bump to 0.4.6
authorAlexis Ballier <aballier@gentoo.org>
Tue, 3 Jul 2018 10:51:45 +0000 (12:51 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 3 Jul 2018 11:21:48 +0000 (13:21 +0200)
Package-Manager: Portage-2.3.41, Repoman-2.3.9

dev-python/catkin_pkg/Manifest
dev-python/catkin_pkg/catkin_pkg-0.4.6.ebuild [new file with mode: 0644]
dev-python/catkin_pkg/catkin_pkg-9999.ebuild
dev-python/catkin_pkg/files/catkin_prefix2.patch [new file with mode: 0644]
dev-python/catkin_pkg/files/infinite_loop3.patch [new file with mode: 0644]

index 4815360a72bc6884ec081c4e1d1d14839f0b76b4..0cca65acf0115a806a380b0e69b358ebb29446aa 100644 (file)
@@ -1 +1,2 @@
 DIST catkin_pkg-0.4.2-gh.tar.gz 52930 BLAKE2B 2b8589441d241197c661975c07c60856c614c4c328e441e6fbb1cb41ea2919f57864f67198b684eba7183004671df0980ddcf0070a53099074433166b5d7db20 SHA512 cb47771172d88792bc7039f072175a6f410aa046e2611ccc75e46bda388d620ac0059e0fa9e087fbb7f2833600a7233d714c1aeeab65e264606d8ae2e64d76bb
+DIST catkin_pkg-0.4.6-gh.tar.gz 60713 BLAKE2B 88442adafcedd90a53a37c5aa3632d06dd88c1c685427708e7801d2a6702b229dfc3f81ac3dfb0ac6ad7c932865b9a61b8c6da28165acef8fa45859cd3a8aaf6 SHA512 d95362a56680f3ca1eb33299e041d6a0a8bbe35bb4a20f411c3b846a2b6fe91f583ffa7a1ed1884604a420dcc1b5e88fe3336ebfebe9a51a7a9f2c8a80f79f8f
diff --git a/dev-python/catkin_pkg/catkin_pkg-0.4.6.ebuild b/dev-python/catkin_pkg/catkin_pkg-0.4.6.ebuild
new file mode 100644 (file)
index 0000000..19e9efa
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy{,3} )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+       SCM="git-r3"
+       EGIT_REPO_URI="https://github.com/ros-infrastructure/catkin_pkg"
+fi
+
+inherit ${SCM} distutils-r1
+
+DESCRIPTION="Standalone Python library for the catkin package system"
+HOMEPAGE="http://wiki.ros.org/catkin_pkg"
+if [ "${PV#9999}" != "${PV}" ] ; then
+       SRC_URI=""
+       KEYWORDS=""
+else
+       SRC_URI="https://github.com/ros-infrastructure/catkin_pkg/archive/${PV}.tar.gz -> ${P}-gh.tar.gz"
+       KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       dev-python/docutils[${PYTHON_USEDEP}]
+       dev-python/python-dateutil[${PYTHON_USEDEP}]
+       dev-python/pyparsing[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+       test? ( dev-python/mock[${PYTHON_USEDEP}] dev-python/nose[${PYTHON_USEDEP}] )
+"
+PATCHES=(
+       "${FILESDIR}/catkin_prefix2.patch"
+       "${FILESDIR}/argparse.patch"
+       "${FILESDIR}/ros_packages.patch"
+       "${FILESDIR}/infinite_loop3.patch"
+)
+
+python_test() {
+       nosetests -s --tests test || die
+}
index f74d5f891e532b7ce446fdd475f79bf6386780cb..19e9efa8046c4a57211612a3026df38fc2f8f560 100644 (file)
@@ -36,10 +36,10 @@ DEPEND="${RDEPEND}
        test? ( dev-python/mock[${PYTHON_USEDEP}] dev-python/nose[${PYTHON_USEDEP}] )
 "
 PATCHES=(
-       "${FILESDIR}/catkin_prefix.patch"
+       "${FILESDIR}/catkin_prefix2.patch"
        "${FILESDIR}/argparse.patch"
        "${FILESDIR}/ros_packages.patch"
-       "${FILESDIR}/infinite_loop2.patch"
+       "${FILESDIR}/infinite_loop3.patch"
 )
 
 python_test() {
diff --git a/dev-python/catkin_pkg/files/catkin_prefix2.patch b/dev-python/catkin_pkg/files/catkin_prefix2.patch
new file mode 100644 (file)
index 0000000..761894e
--- /dev/null
@@ -0,0 +1,29 @@
+Allow CATKIN_PREFIX_PATH to work as CMAKE_PREFIX_PATH:
+When building with SYSROOT!=/, CMAKE_PREFIX_PATH is the same as with SYSROOT=/
+but we need to find packages in SYSROOT.
+
+Index: catkin_pkg-0.4.6/src/catkin_pkg/workspaces.py
+===================================================================
+--- catkin_pkg-0.4.6.orig/src/catkin_pkg/workspaces.py
++++ catkin_pkg-0.4.6/src/catkin_pkg/workspaces.py
+@@ -41,16 +41,17 @@ CATKIN_WORKSPACE_MARKER_FILE = '.catkin_
+ def get_spaces(paths=None):
+     """
+-    Return a list of spaces based on the CMAKE_PREFIX_PATH or passed in list of workspaces.
++    Return a list of spaces based on the CMAKE_PREFIX_PATH/CATKIN_PREFIX_PATH or passed in list of workspaces.
+     It resolves the source space for each devel space and ignores non-catkin paths.
+     :param paths_to_order: list of paths
+     :param prefix_paths: list of prefixes, must not end with '/'
+     """
+     if paths is None:
+-        if 'CMAKE_PREFIX_PATH' not in os.environ:
+-            raise RuntimeError('Neither the environment variable CMAKE_PREFIX_PATH is set nor was a list of paths passed.')
++        if 'CMAKE_PREFIX_PATH' not in os.environ and 'CATKIN_PREFIX_PATH' not in os.environ:
++            raise RuntimeError('None of the environment variables CMAKE_PREFIX_PATH or CATKIN_PREFIX_PATH are set nor was a list of paths passed.')
+         paths = os.environ['CMAKE_PREFIX_PATH'].split(os.pathsep) if os.environ['CMAKE_PREFIX_PATH'] else []
++        paths += os.environ['CATKIN_PREFIX_PATH'].split(os.pathsep) if os.environ['CATKIN_PREFIX_PATH'] else []
+     spaces = []
+     for path in paths:
diff --git a/dev-python/catkin_pkg/files/infinite_loop3.patch b/dev-python/catkin_pkg/files/infinite_loop3.patch
new file mode 100644 (file)
index 0000000..e00fb93
--- /dev/null
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/show_bug.cgi?id=612860
+By Tim Rakowski
+We os.walk /usr with followlinks=True, but at least nodejs contains a "recursive" link in /usr/include/node
+
+Index: catkin_pkg-0.4.6/src/catkin_pkg/packages.py
+===================================================================
+--- catkin_pkg-0.4.6.orig/src/catkin_pkg/packages.py
++++ catkin_pkg-0.4.6/src/catkin_pkg/packages.py
+@@ -57,7 +57,9 @@ def find_package_paths(basepath, exclude
+     """
+     paths = []
+     real_exclude_paths = [os.path.realpath(p) for p in exclude_paths] if exclude_paths is not None else []
++    visited = set()
+     for dirpath, dirnames, filenames in os.walk(basepath, followlinks=True):
++        visited.add(dirpath)
+         if 'AMENT_IGNORE' in filenames or \
+             'CATKIN_IGNORE' in filenames or \
+             'COLCON_IGNORE' in filenames or \
+@@ -70,7 +72,7 @@ def find_package_paths(basepath, exclude
+             del dirnames[:]
+             continue
+         # filter out hidden directories in-place
+-        dirnames[:] = [d for d in dirnames if not d.startswith('.')]
++        dirnames[:] = [d for d in dirnames if not d.startswith('.') and not os.path.realpath(os.path.join(dirpath, d)) in visited]
+     return paths