kde-plasma/breeze-gtk: Fix python executable selection
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 27 Oct 2019 09:50:13 +0000 (10:50 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 27 Oct 2019 10:35:31 +0000 (11:35 +0100)
Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
Closes: https://bugs.gentoo.org/691092
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
kde-plasma/breeze-gtk/breeze-gtk-5.16.5.ebuild
kde-plasma/breeze-gtk/breeze-gtk-5.17.1.ebuild
kde-plasma/breeze-gtk/files/breeze-gtk-5.16.5-cmake-pre-3.16.patch [new file with mode: 0644]

index 0587632ef9b14e150acef66f99d0447a37ab8706..f1f464f67c1c065522d3a54bf7396a9cef1e9eef 100644 (file)
@@ -26,3 +26,20 @@ pkg_setup() {
        python-any-r1_pkg_setup
        kde5_pkg_setup
 }
+
+src_prepare() {
+       kde5_src_prepare
+       if has_version "<dev-util/cmake-3.16_rc1"; then
+               eapply "${FILESDIR}"/${PN}-5.16.5-cmake-pre-3.16.patch
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DPython3_EXECUTABLE="${PYTHON}"
+       )
+       if has_version "<dev-util/cmake-3.16_rc1"; then
+               mycmakeargs=( -DPYTHON_EXECUTABLE="${PYTHON}" )
+       fi
+       kde5_src_configure
+}
index 7c9fed2f4c3f17ba765538ebce3db24e83e8ea08..38c53a1e609a78d0ebfbfe4dd7ac3ee00789d17a 100644 (file)
@@ -26,3 +26,20 @@ pkg_setup() {
        python-any-r1_pkg_setup
        kde5_pkg_setup
 }
+
+src_prepare() {
+       kde5_src_prepare
+       if has_version "<dev-util/cmake-3.16_rc1"; then
+               eapply "${FILESDIR}"/${PN}-5.16.5-cmake-pre-3.16.patch
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DPython3_EXECUTABLE="${PYTHON}"
+       )
+       if has_version "<dev-util/cmake-3.16_rc1"; then
+               mycmakeargs=( -DPYTHON_EXECUTABLE="${PYTHON}" )
+       fi
+       kde5_src_configure
+}
diff --git a/kde-plasma/breeze-gtk/files/breeze-gtk-5.16.5-cmake-pre-3.16.patch b/kde-plasma/breeze-gtk/files/breeze-gtk-5.16.5-cmake-pre-3.16.patch
new file mode 100644 (file)
index 0000000..cbf8693
--- /dev/null
@@ -0,0 +1,16 @@
+Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
+
+--- a/cmake/FindPythonCairo.cmake
++++ b/cmake/FindPythonCairo.cmake
+@@ -1,10 +1,4 @@
+-if(CMAKE_VERSION VERSION_LESS 3.12.0)
+-    find_package(PythonInterp 3 REQUIRED)
+-    # PythonInterp sets PYTHON_EXECUTABLE
+-else()
+-    find_package(Python3 COMPONENTS Interpreter REQUIRED)
+-    set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
+-endif()
++find_package(PythonInterp 3 REQUIRED)
+ # Check for python cairo
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import cairo"