commit:     53ea57e0919caa29b24429a51254fcabdeda5222
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 07:27:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 07:29:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53ea57e0

media-gfx/fontforge: fix py3.12 compat

This is, of course, masked by setuptools being installed for 3.12 for most 
people
which is how we didn't notice...

Closes: https://bugs.gentoo.org/933392
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...forge-20230101-python3.12-distutils-no-more.patch | 20 ++++++++++++++++++++
 ...230101-r1.ebuild => fontforge-20230101-r2.ebuild} |  1 +
 2 files changed, 21 insertions(+)

diff --git 
a/media-gfx/fontforge/files/fontforge-20230101-python3.12-distutils-no-more.patch
 
b/media-gfx/fontforge/files/fontforge-20230101-python3.12-distutils-no-more.patch
new file mode 100644
index 000000000000..c140e7d19955
--- /dev/null
+++ 
b/media-gfx/fontforge/files/fontforge-20230101-python3.12-distutils-no-more.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/933392
+https://github.com/fontforge/fontforge/pull/5423
+
+From 24968a8bf713396bc4a5dbb8bf3a03a9479b2568 Mon Sep 17 00:00:00 2001
+From: Maxim Iorsh <[email protected]>
+Date: Fri, 24 May 2024 16:48:47 +0300
+Subject: [PATCH 1/3] Use sysconfig for Python module locations
+
+--- a/pyhook/CMakeLists.txt
++++ b/pyhook/CMakeLists.txt
+@@ -21,7 +21,7 @@ target_link_libraries(psMat_pyhook PRIVATE Python3::Module)
+ # So do it ourselves, getting the prefix-relative path instead
+ if(NOT DEFINED PYHOOK_INSTALL_DIR)
+   execute_process(
+-    COMMAND "${Python3_EXECUTABLE}" -c "import distutils.sysconfig as sc; 
print(sc.get_python_lib(prefix='', plat_specific=True,standard_lib=False))"
++    COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig as sc; 
print(sc.get_path('platlib', sc.get_preferred_scheme('user'), vars={'userbase': 
'.'}))"
+     RESULT_VARIABLE _pyhook_install_dir_result
+     OUTPUT_VARIABLE PYHOOK_INSTALL_DIR
+     OUTPUT_STRIP_TRAILING_WHITESPACE)
+

diff --git a/media-gfx/fontforge/fontforge-20230101-r1.ebuild 
b/media-gfx/fontforge/fontforge-20230101-r2.ebuild
similarity index 97%
rename from media-gfx/fontforge/fontforge-20230101-r1.ebuild
rename to media-gfx/fontforge/fontforge-20230101-r2.ebuild
index 261c8f986c79..5a9b97e812ee 100644
--- a/media-gfx/fontforge/fontforge-20230101-r1.ebuild
+++ b/media-gfx/fontforge/fontforge-20230101-r2.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
        "${FILESDIR}"/fontforge-doc-no-warn-error.patch
        "${FILESDIR}"/${PN}-20230101-workaround-broken-translations.patch
        
"${FILESDIR}"/${PN}-20230101-fix-splinefont-shell-command-injection.patch
+       "${FILESDIR}"/${PN}-20230101-python3.12-distutils-no-more.patch
 )
 
 pkg_setup() {

Reply via email to