commit: a373c3ad91993a8bcdef5f3dbe4d63de57203136
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 15:37:26 2019 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 15:43:53 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a373c3ad
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 <aballier <AT> gentoo.org>
...1.ebuild => ament_cmake_python-0.8.1-r1.ebuild} | 1 +
.../ament_cmake_python-9999.ebuild | 1 +
dev-ros/ament_cmake_python/files/destdir.patch | 26 ++++++++++++++++++++++
3 files changed, 28 insertions(+)
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 c60244e5979..43d5e233045 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 c60244e5979..43d5e233045 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 00000000000..8e8f628afaf
--- /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()