dev-games/cegui: Switch Python single target from 2.7 to 3.8
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 16 May 2020 20:00:23 +0000 (21:00 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 16 May 2020 20:43:20 +0000 (21:43 +0100)
Only build-tested but nothing in the tree currently uses the Python
bindings.

Closes: https://bugs.gentoo.org/721480
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
dev-games/cegui/cegui-0.8.7-r1.ebuild
dev-games/cegui/files/cegui-0.8.7-python3.patch [new file with mode: 0644]

index 57181d880fda2ab2f93858b82fa3bcf1c82f5ed7..53693c9adf451ab4f35639024e90d12a68c5f4f4 100644 (file)
@@ -4,7 +4,7 @@
 EAPI=5
 
 # TODO: multiple ABI?
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_8 )
 inherit eutils flag-o-matic cmake-utils python-single-r1
 
 DESCRIPTION="Crazy Eddie's GUI System"
@@ -58,7 +58,10 @@ DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )
        opengl? ( media-libs/glm )"
 
-PATCHES=( "${FILESDIR}"/${P}-icu-59.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-icu-59.patch
+       "${FILESDIR}"/${P}-python3.patch
+)
 
 pkg_setup() {
        use python && python-single-r1_pkg_setup
diff --git a/dev-games/cegui/files/cegui-0.8.7-python3.patch b/dev-games/cegui/files/cegui-0.8.7-python3.patch
new file mode 100644 (file)
index 0000000..354f8cc
--- /dev/null
@@ -0,0 +1,21 @@
+From b53f162767bd18aa7dfebe322a7af65593c753f5 Mon Sep 17 00:00:00 2001
+From: ATAGOYAMA Tanuki <s172262@yahoo.co.jp>
+Date: Tue, 21 Nov 2017 20:51:36 +0900
+Subject: [PATCH] cegui/src/ScriptModules/Python/binding/CMakeLists.txt: fix
+ cmake error
+
+---
+ cegui/src/ScriptModules/Python/bindings/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cegui/src/ScriptModules/Python/bindings/CMakeLists.txt b/cegui/src/ScriptModules/Python/bindings/CMakeLists.txt
+index 758788c67..5cc9d5620 100644
+--- a/cegui/src/ScriptModules/Python/bindings/CMakeLists.txt
++++ b/cegui/src/ScriptModules/Python/bindings/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ execute_process(
+-    COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=True, prefix=\"\")"
++    COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print (distutils.sysconfig.get_python_lib(plat_specific=True, prefix=\"\"))"
+     OUTPUT_VARIABLE CEGUI_PYTHON_INSTALL_DIR
+     OUTPUT_STRIP_TRAILING_WHITESPACE
+ )