From: Alexis Ballier Date: Thu, 12 Dec 2019 15:37:26 +0000 (+0100) Subject: dev-ros/ament_cmake_python: honour DESTDIR when optimizing python X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a373c3ad91993a8bcdef5f3dbe4d63de57203136;p=gentoo.git dev-ros/ament_cmake_python: honour DESTDIR when optimizing python Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Alexis Ballier --- diff --git a/dev-ros/ament_cmake_python/ament_cmake_python-0.8.1.ebuild b/dev-ros/ament_cmake_python/ament_cmake_python-0.8.1-r1.ebuild similarity index 96% rename from dev-ros/ament_cmake_python/ament_cmake_python-0.8.1.ebuild rename to dev-ros/ament_cmake_python/ament_cmake_python-0.8.1-r1.ebuild index c60244e59795..43d5e2330457 100644 --- a/dev-ros/ament_cmake_python/ament_cmake_python-0.8.1.ebuild +++ b/dev-ros/ament_cmake_python/ament_cmake_python-0.8.1-r1.ebuild @@ -37,6 +37,7 @@ DEPEND=" RDEPEND="${DEPEND}" BDEPEND="${DEPEND}" REQUIRED_USE="${PYTHON_REQUIRED_USE}" +PATCHES=( "${FILESDIR}/destdir.patch" ) src_configure() { # This is a build tool that does not install python-related files diff --git a/dev-ros/ament_cmake_python/ament_cmake_python-9999.ebuild b/dev-ros/ament_cmake_python/ament_cmake_python-9999.ebuild index c60244e59795..43d5e2330457 100644 --- a/dev-ros/ament_cmake_python/ament_cmake_python-9999.ebuild +++ b/dev-ros/ament_cmake_python/ament_cmake_python-9999.ebuild @@ -37,6 +37,7 @@ DEPEND=" RDEPEND="${DEPEND}" BDEPEND="${DEPEND}" REQUIRED_USE="${PYTHON_REQUIRED_USE}" +PATCHES=( "${FILESDIR}/destdir.patch" ) src_configure() { # This is a build tool that does not install python-related files diff --git a/dev-ros/ament_cmake_python/files/destdir.patch b/dev-ros/ament_cmake_python/files/destdir.patch new file mode 100644 index 000000000000..8e8f628afaf3 --- /dev/null +++ b/dev-ros/ament_cmake_python/files/destdir.patch @@ -0,0 +1,26 @@ +Index: ament_cmake_python/cmake/ament_python_install_module.cmake +=================================================================== +--- ament_cmake_python.orig/cmake/ament_python_install_module.cmake ++++ ament_cmake_python/cmake/ament_python_install_module.cmake +@@ -64,7 +64,7 @@ function(_ament_cmake_python_install_mod + "execute_process( + COMMAND + \"${PYTHON_EXECUTABLE}\" \"-m\" \"compileall\" +- \"${CMAKE_INSTALL_PREFIX}/${destination}/${module_file}\" ++ \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${destination}/${module_file}\" + )" + ) + endif() +Index: ament_cmake_python/cmake/ament_python_install_package.cmake +=================================================================== +--- ament_cmake_python.orig/cmake/ament_python_install_package.cmake ++++ ament_cmake_python/cmake/ament_python_install_package.cmake +@@ -65,7 +65,7 @@ function(_ament_cmake_python_install_pac + "execute_process( + COMMAND + \"${PYTHON_EXECUTABLE}\" \"-m\" \"compileall\" +- \"${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/${package_name}\" ++ \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/${package_name}\" + )" + ) + endif()