summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-09-17 13:58:58 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-09-17 13:59:44 +0200
commit62a295688c3af8ea72516065a898bd675eeaeb52 (patch)
tree56590ea128f718b4bfb77f933a62eedce6f07396 /dev-python/python_orocos_kdl
parentdev-libs/mongo-c-driver: version bump (diff)
downloadgentoo-62a295688c3af8ea72516065a898bd675eeaeb52.tar.gz
gentoo-62a295688c3af8ea72516065a898bd675eeaeb52.tar.bz2
gentoo-62a295688c3af8ea72516065a898bd675eeaeb52.zip
dev-python/python_orocos_kdl: initial import. ebuild by me.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-python/python_orocos_kdl')
-rw-r--r--dev-python/python_orocos_kdl/Manifest1
-rw-r--r--dev-python/python_orocos_kdl/files/py3.patch58
-rw-r--r--dev-python/python_orocos_kdl/metadata.xml5
-rw-r--r--dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild57
-rw-r--r--dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild56
5 files changed, 177 insertions, 0 deletions
diff --git a/dev-python/python_orocos_kdl/Manifest b/dev-python/python_orocos_kdl/Manifest
new file mode 100644
index 000000000000..1e0cce1ad6f7
--- /dev/null
+++ b/dev-python/python_orocos_kdl/Manifest
@@ -0,0 +1 @@
+DIST orocos_kinematics_dynamics-1.3.0.tar.gz 200229 SHA256 7be2dd5e4f4c1ceac2cdf1f4fae3d94d4ffd9fc1af8d483c05f04e80ef84b3f9 SHA512 09ff63f74f1eac3ee8b1090364e0d95b4ae96c9d4435ca34adacb3ded7385f948ddca9be2c1c2c2214c9342b17bbffb7da89ba9b7cd402e7fd4f2c6dbd06a930 WHIRLPOOL 4085fa4aba77e0c24a3c1aab4ab5f98e8b349037525e6a596ff027075ea1dcd33c4f13fa3abd61bbe6a2a3bd13b62616d7b614c030ecda8343be3ed59406bae6
diff --git a/dev-python/python_orocos_kdl/files/py3.patch b/dev-python/python_orocos_kdl/files/py3.patch
new file mode 100644
index 000000000000..dd22f2d41293
--- /dev/null
+++ b/dev-python/python_orocos_kdl/files/py3.patch
@@ -0,0 +1,58 @@
+Upstream status: Pending.
+https://github.com/orocos/orocos_kinematics_dynamics/pull/44
+
+Index: orocos_kinematics_dynamics-1.3.0/python_orocos_kdl/CMakeLists.txt
+===================================================================
+--- orocos_kinematics_dynamics-1.3.0.orig/python_orocos_kdl/CMakeLists.txt
++++ orocos_kinematics_dynamics-1.3.0/python_orocos_kdl/CMakeLists.txt
+@@ -8,7 +8,7 @@ link_directories(${orocos_kdl_LIBRARY_DI
+
+ find_package(PythonInterp REQUIRED)
+ find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} REQUIRED)
+-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True, prefix='')" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True, prefix=''))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+ find_package(SIP REQUIRED)
+ include(SIPMacros)
+Index: orocos_kinematics_dynamics-1.3.0/python_orocos_kdl/PyKDL/std_string.sip
+===================================================================
+--- orocos_kinematics_dynamics-1.3.0.orig/python_orocos_kdl/PyKDL/std_string.sip
++++ orocos_kinematics_dynamics-1.3.0/python_orocos_kdl/PyKDL/std_string.sip
+@@ -27,7 +27,7 @@
+ newstring = PyUnicode_DecodeUTF8(sipCpp->c_str(), sipCpp->length(), NULL);
+ if(newstring == NULL) {
+ PyErr_Clear();
+- newstring = PyString_FromString(sipCpp->c_str());
++ newstring = PyUnicode_FromString(sipCpp->c_str());
+ }
+ return newstring;
+ %End
+@@ -38,21 +38,27 @@
+ // If argument is a Unicode string, just decode it to UTF-8
+ // If argument is a Python string, assume it's UTF-8
+ if (sipIsErr == NULL)
++#if PY_MAJOR_VERSION < 3
+ return (PyString_Check(sipPy) || PyUnicode_Check(sipPy));
++#else
++ return PyUnicode_Check(sipPy);
++#endif
+ if (sipPy == Py_None) {
+ *sipCppPtr = new std::string;
+ return 1;
+ }
+ if (PyUnicode_Check(sipPy)) {
+ PyObject* s = PyUnicode_AsEncodedString(sipPy, "UTF-8", "");
+- *sipCppPtr = new std::string(PyString_AS_STRING(s));
++ *sipCppPtr = new std::string(PyUnicode_AS_DATA(s));
+ Py_DECREF(s);
+ return 1;
+ }
++#if PY_MAJOR_VERSION < 3
+ if (PyString_Check(sipPy)) {
+ *sipCppPtr = new std::string(PyString_AS_STRING(sipPy));
+ return 1;
+ }
++#endif
+
+ return 0;
+ %End
diff --git a/dev-python/python_orocos_kdl/metadata.xml b/dev-python/python_orocos_kdl/metadata.xml
new file mode 100644
index 000000000000..c42ea5b15cf6
--- /dev/null
+++ b/dev-python/python_orocos_kdl/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>
diff --git a/dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild b/dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild
new file mode 100644
index 000000000000..5b4808019348
--- /dev/null
+++ b/dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="http://github.com/orocos/orocos_kinematics_dynamics"
+fi
+
+inherit ${SCM} python-r1 cmake-utils
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ KEYWORDS=""
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~arm"
+ SRC_URI="http://github.com/orocos/orocos_kinematics_dynamics/archive/v${PV}.tar.gz -> orocos_kinematics_dynamics-${PV}.tar.gz"
+fi
+
+DESCRIPTION="Python bindings for KDL"
+HOMEPAGE="http://www.orocos.org/kdl"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ sci-libs/orocos_kdl
+ dev-python/sip[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/py3.patch" )
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ S=${WORKDIR}/${P}/python_orocos_kdl
+else
+ S=${WORKDIR}/orocos_kinematics_dynamics-${PV}/python_orocos_kdl
+fi
+
+src_configure() {
+ python_foreach_impl cmake-utils_src_configure
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_compile
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}
diff --git a/dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild b/dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild
new file mode 100644
index 000000000000..0d22bd204aeb
--- /dev/null
+++ b/dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="http://github.com/orocos/orocos_kinematics_dynamics"
+fi
+
+inherit ${SCM} python-r1 cmake-utils
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ KEYWORDS=""
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~arm"
+ SRC_URI="http://github.com/orocos/orocos_kinematics_dynamics/archive/v${PV}.tar.gz -> orocos_kinematics_dynamics-${PV}.tar.gz"
+fi
+
+DESCRIPTION="Python bindings for KDL"
+HOMEPAGE="http://www.orocos.org/kdl"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ sci-libs/orocos_kdl
+ dev-python/sip[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ S=${WORKDIR}/${P}/python_orocos_kdl
+else
+ S=${WORKDIR}/orocos_kinematics_dynamics-${PV}/python_orocos_kdl
+fi
+
+src_configure() {
+ python_foreach_impl cmake-utils_src_configure
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_compile
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}