public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexis Ballier" <aballier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/catkin/, dev-util/catkin/files/
Date: Thu, 17 Sep 2015 10:29:15 +0000 (UTC)	[thread overview]
Message-ID: <1442485749.46e2e14c175c3f370a24beadcb558595de8091e0.aballier@gentoo> (raw)

commit:     46e2e14c175c3f370a24beadcb558595de8091e0
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 10:28:47 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 10:29:09 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46e2e14c

dev-util/catkin: initial import. ebuild by me.

Package-Manager: portage-2.2.20.1

 dev-util/catkin/Manifest                       |  1 +
 dev-util/catkin/catkin-0.6.14.ebuild           | 95 ++++++++++++++++++++++++++
 dev-util/catkin/catkin-9999.ebuild             | 95 ++++++++++++++++++++++++++
 dev-util/catkin/files/catkin_prefix_path.patch | 55 +++++++++++++++
 dev-util/catkin/files/distutils.patch          | 13 ++++
 dev-util/catkin/files/tests.patch              | 40 +++++++++++
 dev-util/catkin/metadata.xml                   |  5 ++
 7 files changed, 304 insertions(+)

diff --git a/dev-util/catkin/Manifest b/dev-util/catkin/Manifest
new file mode 100644
index 0000000..1d66923
--- /dev/null
+++ b/dev-util/catkin/Manifest
@@ -0,0 +1 @@
+DIST catkin-0.6.14.tar.gz 197628 SHA256 0ca265803be8a2c1b6036d67ed63505551f4bbc02fa6cb8180dc3167b9f3afc9 SHA512 e2aec7bfbef0f103d96c71408917823cd80e205c021bcd78c018eb2aaaabff04bc268f661ada52963929726e0a986115cbe2c4d791cfa4542a20f7841cd74372 WHIRLPOOL 18a4173b5536da3ec6f7395c39f382b03d173e878b81ffef7d224d2828d6930099a74e08a6299b09a68bd56de87e4be225a735cc8a423b8a0b810cd92b1a5e1d

diff --git a/dev-util/catkin/catkin-0.6.14.ebuild b/dev-util/catkin/catkin-0.6.14.ebuild
new file mode 100644
index 0000000..53f670a
--- /dev/null
+++ b/dev-util/catkin/catkin-0.6.14.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+	SCM="git-r3"
+	EGIT_REPO_URI="http://github.com/ros/catkin"
+fi
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit ${SCM} cmake-utils python-r1 python-utils-r1
+
+DESCRIPTION="Cmake macros and associated python code used to build some parts of ROS"
+HOMEPAGE="http://wiki.ros.org/catkin"
+if [ "${PV#9999}" != "${PV}" ] ; then
+	SRC_URI=""
+	KEYWORDS=""
+else
+	SRC_URI="http://github.com/ros/catkin/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="
+	dev-python/catkin_pkg[${PYTHON_USEDEP}]
+	dev-python/empy[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+	test? ( dev-python/nose[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/tests.patch"
+	"${FILESDIR}/distutils.patch"
+	"${FILESDIR}/catkin_prefix_path.patch"
+)
+
+src_prepare() {
+	# fix libdir
+	sed -i \
+		-e 's:LIBEXEC_DESTINATION lib:LIBEXEC_DESTINATION libexec:' \
+		-e 's:}/lib:}/${CMAKE_INSTALL_LIBDIR}:' \
+		-e 's:DESTINATION lib):DESTINATION ${CMAKE_INSTALL_LIBDIR}):' \
+		-e 's:DESTINATION lib/:DESTINATION ${CMAKE_INSTALL_LIBDIR}/:' \
+		-e 's:PYTHON_INSTALL_DIR lib:PYTHON_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}:' \
+		cmake/*.cmake || die
+	cmake-utils_src_prepare
+}
+
+catkin_src_configure_internal() {
+	mycmakeargs+=( -DPYTHON_EXECUTABLE="${PYTHON}" )
+	python_export PYTHON_SCRIPTDIR
+	cmake-utils_src_configure
+}
+
+src_configure() {
+	local mycmakeargs=(
+		"$(cmake-utils_use test CATKIN_ENABLE_TESTING)"
+		"-DCATKIN_BUILD_BINARY_PACKAGE=ON"
+		)
+	python_foreach_impl catkin_src_configure_internal
+}
+
+src_compile() {
+	python_foreach_impl cmake-utils_src_compile
+}
+
+src_test() {
+	unset PYTHON_SCRIPTDIR
+	python_foreach_impl cmake-utils_src_test
+}
+
+catkin_src_install_internal() {
+	python_export PYTHON_SCRIPTDIR
+	cmake-utils_src_install
+	if [ ! -f "${T}/.catkin_python_symlinks_generated" ]; then
+		dodir /usr/bin
+		for i in "${D}/${PYTHON_SCRIPTDIR}"/* ; do
+			dosym ../lib/python-exec/python-exec2 "/usr/bin/${i##*/}" || die
+		done
+		touch "${T}/.catkin_python_symlinks_generated"
+	fi
+}
+
+src_install() {
+	python_foreach_impl catkin_src_install_internal
+	# needed to be considered as a workspace
+	touch "${ED}/usr/.catkin"
+}

diff --git a/dev-util/catkin/catkin-9999.ebuild b/dev-util/catkin/catkin-9999.ebuild
new file mode 100644
index 0000000..53f670a
--- /dev/null
+++ b/dev-util/catkin/catkin-9999.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+	SCM="git-r3"
+	EGIT_REPO_URI="http://github.com/ros/catkin"
+fi
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit ${SCM} cmake-utils python-r1 python-utils-r1
+
+DESCRIPTION="Cmake macros and associated python code used to build some parts of ROS"
+HOMEPAGE="http://wiki.ros.org/catkin"
+if [ "${PV#9999}" != "${PV}" ] ; then
+	SRC_URI=""
+	KEYWORDS=""
+else
+	SRC_URI="http://github.com/ros/catkin/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="
+	dev-python/catkin_pkg[${PYTHON_USEDEP}]
+	dev-python/empy[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+	test? ( dev-python/nose[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/tests.patch"
+	"${FILESDIR}/distutils.patch"
+	"${FILESDIR}/catkin_prefix_path.patch"
+)
+
+src_prepare() {
+	# fix libdir
+	sed -i \
+		-e 's:LIBEXEC_DESTINATION lib:LIBEXEC_DESTINATION libexec:' \
+		-e 's:}/lib:}/${CMAKE_INSTALL_LIBDIR}:' \
+		-e 's:DESTINATION lib):DESTINATION ${CMAKE_INSTALL_LIBDIR}):' \
+		-e 's:DESTINATION lib/:DESTINATION ${CMAKE_INSTALL_LIBDIR}/:' \
+		-e 's:PYTHON_INSTALL_DIR lib:PYTHON_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}:' \
+		cmake/*.cmake || die
+	cmake-utils_src_prepare
+}
+
+catkin_src_configure_internal() {
+	mycmakeargs+=( -DPYTHON_EXECUTABLE="${PYTHON}" )
+	python_export PYTHON_SCRIPTDIR
+	cmake-utils_src_configure
+}
+
+src_configure() {
+	local mycmakeargs=(
+		"$(cmake-utils_use test CATKIN_ENABLE_TESTING)"
+		"-DCATKIN_BUILD_BINARY_PACKAGE=ON"
+		)
+	python_foreach_impl catkin_src_configure_internal
+}
+
+src_compile() {
+	python_foreach_impl cmake-utils_src_compile
+}
+
+src_test() {
+	unset PYTHON_SCRIPTDIR
+	python_foreach_impl cmake-utils_src_test
+}
+
+catkin_src_install_internal() {
+	python_export PYTHON_SCRIPTDIR
+	cmake-utils_src_install
+	if [ ! -f "${T}/.catkin_python_symlinks_generated" ]; then
+		dodir /usr/bin
+		for i in "${D}/${PYTHON_SCRIPTDIR}"/* ; do
+			dosym ../lib/python-exec/python-exec2 "/usr/bin/${i##*/}" || die
+		done
+		touch "${T}/.catkin_python_symlinks_generated"
+	fi
+}
+
+src_install() {
+	python_foreach_impl catkin_src_install_internal
+	# needed to be considered as a workspace
+	touch "${ED}/usr/.catkin"
+}

diff --git a/dev-util/catkin/files/catkin_prefix_path.patch b/dev-util/catkin/files/catkin_prefix_path.patch
new file mode 100644
index 0000000..94e23ee
--- /dev/null
+++ b/dev-util/catkin/files/catkin_prefix_path.patch
@@ -0,0 +1,55 @@
+Allow CATKIN_PREFIX_PATH to override/complement CMAKE_PREFIX_PATH.
+This serves two goals: when SYSROOT!=/, CMAKE_PREFIX_PATH is the same as when
+SYSROOT=/ but we need to find packages in SYSROOT/CMAKE_PREFIX_PATH.
+
+Moreover, this allows to set CATKIN_PREFIX_PATH in global environment so that
+ROS packages are properly configured without needed to source a shellrc file in
+every shell session. This can't be done with CMAKE_PREFIX_PATH which is way too
+generic.
+
+Index: catkin-0.6.9/cmake/all.cmake
+===================================================================
+--- catkin-0.6.9.orig/cmake/all.cmake
++++ catkin-0.6.9/cmake/all.cmake
+@@ -52,7 +52,11 @@ set(CMAKE_PREFIX_PATH_AS_IS ${CMAKE_PREF
+ 
+ # list of unique catkin workspaces based on CMAKE_PREFIX_PATH
+ set(CATKIN_WORKSPACES "")
+-foreach(path ${CMAKE_PREFIX_PATH})
++if(NOT DEFINED CATKIN_PREFIX_PATH)
++  set(CATKIN_PREFIX_PATH ${CMAKE_PREFIX_PATH})
++endif()
++
++foreach(path ${CATKIN_PREFIX_PATH})
+   if(EXISTS "${path}/.catkin")
+     list(FIND CATKIN_WORKSPACES ${path} _index)
+     if(_index EQUAL -1)
+Index: catkin-0.6.11/python/catkin/workspace.py
+===================================================================
+--- catkin-0.6.11.orig/python/catkin/workspace.py
++++ catkin-0.6.11/python/catkin/workspace.py
+@@ -44,7 +44,7 @@ def get_workspaces():
+     """
+     # get all cmake prefix paths
+     env_name = 'CMAKE_PREFIX_PATH'
+-    paths = [path for path in os.environ.get(env_name, '').split(os.pathsep) if path]
++    paths = [path for path in os.environ.get(env_name, '').split(os.pathsep) + os.environ.get('CATKIN_PREFIX_PATH', '').split(os.pathsep) if path]
+     # remove non-workspace paths
+     workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
+     return workspaces
+Index: catkin-0.6.9/cmake/catkinConfig.cmake.in
+===================================================================
+--- catkin-0.6.9.orig/cmake/catkinConfig.cmake.in
++++ catkin-0.6.9/cmake/catkinConfig.cmake.in
+@@ -64,6 +64,11 @@ if(catkin_FIND_COMPONENTS)
+ 
+       # get search paths from CMAKE_PREFIX_PATH (which includes devel space)
+       set(paths "")
++      foreach(path ${CATKIN_PREFIX_PATH})
++        if(IS_DIRECTORY ${path}/share/${component}/cmake)
++          list(APPEND paths ${path}/share/${component}/cmake)
++        endif()
++      endforeach()
+       foreach(path ${CMAKE_PREFIX_PATH})
+         if(IS_DIRECTORY ${path}/share/${component}/cmake)
+           list(APPEND paths ${path}/share/${component}/cmake)

diff --git a/dev-util/catkin/files/distutils.patch b/dev-util/catkin/files/distutils.patch
new file mode 100644
index 0000000..2925511
--- /dev/null
+++ b/dev-util/catkin/files/distutils.patch
@@ -0,0 +1,13 @@
+Allow to install scripts in PYTHON_SCRIPTDIR.
+Needed for Gentoo multi-python support.
+
+Index: catkin-0.6.11/cmake/templates/python_distutils_install.sh.in
+===================================================================
+--- catkin-0.6.11.orig/cmake/templates/python_distutils_install.sh.in
++++ catkin-0.6.11/cmake/templates/python_distutils_install.sh.in
+@@ -25,4 +25,4 @@ cd "@INSTALL_CMD_WORKING_DIRECTORY@"
+     build --build-base "@CMAKE_CURRENT_BINARY_DIR@" \
+     install \
+     $DESTDIR_ARG \
+-    @SETUPTOOLS_ARG_EXTRA@ --prefix="@CMAKE_INSTALL_PREFIX@" --install-scripts="@CMAKE_INSTALL_PREFIX@/@CATKIN_GLOBAL_BIN_DESTINATION@"
++    @SETUPTOOLS_ARG_EXTRA@ --prefix="@CMAKE_INSTALL_PREFIX@" --install-scripts="${PYTHON_SCRIPTDIR:-@CMAKE_INSTALL_PREFIX@/@CATKIN_GLOBAL_BIN_DESTINATION@}"

diff --git a/dev-util/catkin/files/tests.patch b/dev-util/catkin/files/tests.patch
new file mode 100644
index 0000000..d78136a
--- /dev/null
+++ b/dev-util/catkin/files/tests.patch
@@ -0,0 +1,40 @@
+Fix tests.
+Allow them to run even with CATKIN_BUILD_BINARY_PACKAGE set.
+
+Index: catkin-0.6.9/cmake/test/tests.cmake
+===================================================================
+--- catkin-0.6.9.orig/cmake/test/tests.cmake
++++ catkin-0.6.9/cmake/test/tests.cmake
+@@ -40,9 +40,6 @@ if(DEFINED CATKIN_ENABLE_TESTING AND NOT
+   return()
+ endif()
+ 
+-# do not enable ctest's on the farm, since they are automatically executed by the current rules files
+-# and since the tests have not been build rostests would hang forever
+-if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+   # do not enable ctest's for dry packages, since they have a custom test target which must not be overwritten
+   if(NOT ROSBUILD_init_called)
+     message(STATUS "Call enable_testing()")
+@@ -50,9 +47,6 @@ if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+   else()
+     message(STATUS "Skip enable_testing() for dry packages")
+   endif()
+-else()
+-  message(STATUS "Skip enable_testing() when building binary package")
+-endif()
+ 
+ # allow overriding CATKIN_TEST_RESULTS_DIR when explicitly passed to CMake as a command line argument
+ if(DEFINED CATKIN_TEST_RESULTS_DIR)
+Index: catkin-9999/test/utils.py
+===================================================================
+--- catkin-9999.orig/test/utils.py
++++ catkin-9999/test/utils.py
+@@ -189,6 +189,8 @@ class AbstractCatkinWorkspaceTest(unitte
+                 prefix_path = self.installdir
+             args += ["-DCMAKE_PREFIX_PATH=%s" % (prefix_path)]
+ 
++        args += ["-DCMAKE_INSTALL_LIBDIR=lib"]
++
+         if not os.path.isdir(this_builddir):
+             os.makedirs(this_builddir)
+         cmd = ["cmake", this_srcdir] + args

diff --git a/dev-util/catkin/metadata.xml b/dev-util/catkin/metadata.xml
new file mode 100644
index 0000000..c42ea5b
--- /dev/null
+++ b/dev-util/catkin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ros</herd>
+</pkgmetadata>


             reply	other threads:[~2015-09-17 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 10:29 Alexis Ballier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-07 11:51 [gentoo-commits] repo/gentoo:master commit in: dev-util/catkin/, dev-util/catkin/files/ Alexis Ballier
2016-11-28 15:11 Alexis Ballier
2020-06-04 13:08 Alexis Ballier
2020-08-10 12:23 Alexis Ballier
2020-10-13 12:24 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442485749.46e2e14c175c3f370a24beadcb558595de8091e0.aballier@gentoo \
    --to=aballier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox