commit:     df81a0104c301303b0a7c2f4ea1d74dcb9e6a699
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 09:06:23 2022 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 11:10:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df81a010

dev-ros/ament_cmake_core: use unversionned python when building for gentoo

this honours EPYTHON

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 ..._core-9999.ebuild => ament_cmake_core-1.3.0-r1.ebuild} |  3 ++-
 dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild     |  3 ++-
 dev-ros/ament_cmake_core/files/findpython.patch           | 15 +++++++++++++++
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild 
b/dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild
similarity index 92%
copy from dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
copy to dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild
index 0bc79bd3fd0c..3e96c689fcb9 100644
--- a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
+++ b/dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -29,6 +29,7 @@ else
        KEYWORDS="~amd64"
 fi
 IUSE=""
+PATCHES=( "${FILESDIR}/findpython.patch" )
 
 RDEPEND="
        dev-python/ament_package

diff --git a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild 
b/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
index 0bc79bd3fd0c..3e96c689fcb9 100644
--- a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
+++ b/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -29,6 +29,7 @@ else
        KEYWORDS="~amd64"
 fi
 IUSE=""
+PATCHES=( "${FILESDIR}/findpython.patch" )
 
 RDEPEND="
        dev-python/ament_package

diff --git a/dev-ros/ament_cmake_core/files/findpython.patch 
b/dev-ros/ament_cmake_core/files/findpython.patch
new file mode 100644
index 000000000000..790b0631b82c
--- /dev/null
+++ b/dev-ros/ament_cmake_core/files/findpython.patch
@@ -0,0 +1,15 @@
+Index: ament_cmake_core/cmake/core/python.cmake
+===================================================================
+--- ament_cmake_core.orig/cmake/core/python.cmake
++++ ament_cmake_core/cmake/core/python.cmake
+@@ -17,6 +17,10 @@
+ # Example:
+ #   find_package(Python3 3.8 REQUIRED)
+ #   find_package(ament_cmake REQUIRED)
++ 
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)
++  set(Python3_FIND_UNVERSIONED_NAMES FIRST)
++endif()
+ if(NOT TARGET Python3::Interpreter)
+   find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ endif()

Reply via email to