mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/python_orocos_kdl: initial import. ebuild by me.
Package-Manager: portage-2.2.20.1
This commit is contained in:
1
dev-python/python_orocos_kdl/Manifest
Normal file
1
dev-python/python_orocos_kdl/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST orocos_kinematics_dynamics-1.3.0.tar.gz 200229 SHA256 7be2dd5e4f4c1ceac2cdf1f4fae3d94d4ffd9fc1af8d483c05f04e80ef84b3f9 SHA512 09ff63f74f1eac3ee8b1090364e0d95b4ae96c9d4435ca34adacb3ded7385f948ddca9be2c1c2c2214c9342b17bbffb7da89ba9b7cd402e7fd4f2c6dbd06a930 WHIRLPOOL 4085fa4aba77e0c24a3c1aab4ab5f98e8b349037525e6a596ff027075ea1dcd33c4f13fa3abd61bbe6a2a3bd13b62616d7b614c030ecda8343be3ed59406bae6
|
||||
58
dev-python/python_orocos_kdl/files/py3.patch
Normal file
58
dev-python/python_orocos_kdl/files/py3.patch
Normal file
@@ -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
|
||||
5
dev-python/python_orocos_kdl/metadata.xml
Normal file
5
dev-python/python_orocos_kdl/metadata.xml
Normal file
@@ -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>
|
||||
57
dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild
Normal file
57
dev-python/python_orocos_kdl/python_orocos_kdl-1.3.0.ebuild
Normal file
@@ -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
|
||||
}
|
||||
56
dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild
Normal file
56
dev-python/python_orocos_kdl/python_orocos_kdl-9999.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user