summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-14 04:55:12 +0100
committerSam James <sam@gentoo.org>2024-06-14 04:55:12 +0100
commit438dbc8c314630574457430a3e0e3aa44273a9b7 (patch)
tree7587b0a2063dbfd71d35842a94551af7cfc0cccd /dev-embedded
parentkde-plasma/print-manager: add minimum cups version (diff)
downloadgentoo-438dbc8c314630574457430a3e0e3aa44273a9b7.tar.gz
gentoo-438dbc8c314630574457430a3e0e3aa44273a9b7.tar.bz2
gentoo-438dbc8c314630574457430a3e0e3aa44273a9b7.zip
dev-embedded/libftdi: patch out distutils use
Closes: https://bugs.gentoo.org/934224 Bug: https://bugs.gentoo.org/929394 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/libftdi/files/libftdi-1.5-py312.patch25
-rw-r--r--dev-embedded/libftdi/libftdi-1.5-r6.ebuild4
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-embedded/libftdi/files/libftdi-1.5-py312.patch b/dev-embedded/libftdi/files/libftdi-1.5-py312.patch
new file mode 100644
index 000000000000..51fdd10efd81
--- /dev/null
+++ b/dev-embedded/libftdi/files/libftdi-1.5-py312.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/934224
+http://developer.intra2net.com/git/?p=libftdi;a=commit;h=abd19b721f7e9b4d514ed319ece173ebc7b1ea72
+
+From abd19b721f7e9b4d514ed319ece173ebc7b1ea72 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
+Date: Mon, 19 Dec 2022 17:40:43 +0100
+Subject: [PATCH] python: move from distutils to sysconfig
+
+The distutils module was deprecated in Python 3.10, and will be removed
+in 3.12 [1], thus switch to the sysconfig module instead.
+
+[1] https://peps.python.org/pep-0632/
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -42,7 +42,7 @@ endif ()
+
+ set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON )
+
+-execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print( sysconfig.get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )"
++execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print( sysconfig.get_path( 'platlib', vars={'platbase': '${CMAKE_INSTALL_PREFIX}'} ) )"
+ OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
+ OUTPUT_STRIP_TRAILING_WHITESPACE )
+
+--
+1.7.1
diff --git a/dev-embedded/libftdi/libftdi-1.5-r6.ebuild b/dev-embedded/libftdi/libftdi-1.5-r6.ebuild
index c8a0cc141846..d176c11a73f3 100644
--- a/dev-embedded/libftdi/libftdi-1.5-r6.ebuild
+++ b/dev-embedded/libftdi/libftdi-1.5-r6.ebuild
@@ -46,6 +46,10 @@ BDEPEND="
python? ( >=dev-lang/swig-4.2.0 )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-py312.patch
+)
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}