From c171488a6398d63a778a8f20da2dcb83a783d17f Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov Date: Mon, 10 Apr 2017 10:47:54 +0300 Subject: [PATCH] camera-calibration-parsers: disable support for python2 The package can't be built with python2 bindings since libboost_python.so (which the bindings depend on) has been disabled in Boost in OE upstream. Only python3 configuration is supported nowadays. Disable support for python2 in camera_calibration_parsers. Signed-off-by: Dmitry Rozhkov --- .../0001-Drop-support-for-python.patch | 64 +++++++++++++++++++ .../camera-calibration-parsers_1.11.12.bb | 5 ++ 2 files changed, 69 insertions(+) create mode 100644 recipes-ros/image-common/camera-calibration-parsers/0001-Drop-support-for-python.patch diff --git a/recipes-ros/image-common/camera-calibration-parsers/0001-Drop-support-for-python.patch b/recipes-ros/image-common/camera-calibration-parsers/0001-Drop-support-for-python.patch new file mode 100644 index 0000000..8e289a0 --- /dev/null +++ b/recipes-ros/image-common/camera-calibration-parsers/0001-Drop-support-for-python.patch @@ -0,0 +1,64 @@ +From ddf9ddefb51502fb21ba01e31187e4ffebc70cce Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Mon, 10 Apr 2017 10:35:26 +0300 +Subject: [PATCH] Drop support for python + +Upstream-Status: Inappropriate [ROS still supports python2 officially] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 23 ++--------------------- + 1 file changed, 2 insertions(+), 21 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c21e54a..3a89d94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,13 +3,8 @@ project(camera_calibration_parsers) + + find_package(catkin REQUIRED sensor_msgs rosconsole roscpp roscpp_serialization) + +-find_package(PythonLibs REQUIRED) +-if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) +- find_package(Boost REQUIRED COMPONENTS filesystem python) +-else() +- find_package(Boost REQUIRED COMPONENTS filesystem python3) +-endif() +-include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) ++ ++include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) + + catkin_python_setup() + +@@ -41,17 +36,7 @@ add_library(${PROJECT_NAME} + src/parse_yml.cpp + ) + +-add_library(${PROJECT_NAME}_wrapper +- src/parse_wrapper.cpp) +- + target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${YAML_CPP_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY}) +-target_link_libraries(${PROJECT_NAME}_wrapper ${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES}) +- +-# Don't prepend wrapper library name with lib and add to Python libs. +-set_target_properties(${PROJECT_NAME}_wrapper PROPERTIES +- PREFIX "" +- LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION} +- ) + + add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) + +@@ -74,10 +59,6 @@ install( + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) + +-install(TARGETS ${PROJECT_NAME}_wrapper +- DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION} +-) +- + if(CATKIN_ENABLE_TESTING) + add_subdirectory(test) + endif() +-- +2.9.3 + diff --git a/recipes-ros/image-common/camera-calibration-parsers_1.11.12.bb b/recipes-ros/image-common/camera-calibration-parsers_1.11.12.bb index b94116c..70c433b 100644 --- a/recipes-ros/image-common/camera-calibration-parsers_1.11.12.bb +++ b/recipes-ros/image-common/camera-calibration-parsers_1.11.12.bb @@ -6,3 +6,8 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=10;endline=10;md5=d566ef916e9de DEPENDS = "boost rosconsole roscpp roscpp-serialization sensor-msgs yaml-cpp" require image-common.inc + +# OE upstream doesn't support python2 in Boost, but python3 only. +# So, drop python support from camera-calibration-parsers in case +# we're building a python2 flavour of ROS. +SRC_URI += "${@'file://0001-Drop-support-for-python.patch' if d.getVar('PYTHON_PN', True) != 'python3' else ''}"