libftdi: do not use distutils
This commit is contained in:
24
mingw-w64-libftdi/0003-no-distutils.patch
Normal file
24
mingw-w64-libftdi/0003-no-distutils.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff -urN libftdi1-1.5/python/CMakeLists.txt.orig libftdi1-1.5/python/CMakeLists.txt
|
||||
--- libftdi1-1.5/python/CMakeLists.txt.orig 2020-07-07 21:32:55.000000000 +0200
|
||||
+++ libftdi1-1.5/python/CMakeLists.txt 2024-11-04 19:33:40.333609200 +0100
|
||||
@@ -42,7 +42,19 @@
|
||||
|
||||
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 sys
|
||||
+import sysconfig
|
||||
+import os
|
||||
+
|
||||
+platlib = sysconfig.get_path('platlib')
|
||||
+prefix = sys.prefix
|
||||
+
|
||||
+if platlib.startswith(prefix):
|
||||
+ print(platlib[len(prefix):].lstrip(os.sep))
|
||||
+else:
|
||||
+ print(platlib)
|
||||
+"
|
||||
OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||
|
||||
@@ -4,12 +4,12 @@ _realname=libftdi
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.5
|
||||
pkgrel=8
|
||||
pkgrel=9
|
||||
pkgdesc='Library to talk to FTDI chips, with Python 3 bindings (mingw-w64)'
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://www.intra2net.com/en/developer/libftdi/"
|
||||
license=('LGPL', 'GPL')
|
||||
license=('spdx:LGPL-2.1-only AND GPL-2.0-only')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-swig"
|
||||
@@ -24,15 +24,27 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-python: Python bindings to libftdi")
|
||||
options=('staticlibs' 'strip')
|
||||
source=("https://www.intra2net.com/en/developer/libftdi/download/libftdi1-${pkgver}.tar.bz2"
|
||||
"0001-cmake-fix-libdir.patch"
|
||||
"0002-libftdi-include-sys-time-timeval.patch")
|
||||
"0002-libftdi-include-sys-time-timeval.patch"
|
||||
"0003-no-distutils.patch")
|
||||
sha256sums=('7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049'
|
||||
'71d5a8de43a61c7e26531c722862dc7c4135e4b494498d2bd140019f9693741c'
|
||||
'71e542e4847642ec38e7929c208e61183ef2ff7c65ae21200101bb0a02635735')
|
||||
'71e542e4847642ec38e7929c208e61183ef2ff7c65ae21200101bb0a02635735'
|
||||
'c37417465dc3b0591e0b0afdd115e3cd2348080820767fd23d5ecabae6f1501c')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Np1 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}1-${pkgver}
|
||||
patch -p1 -i "${srcdir}/0001-cmake-fix-libdir.patch"
|
||||
patch -p1 -i "${srcdir}/0002-libftdi-include-sys-time-timeval.patch"
|
||||
apply_patch_with_msg \
|
||||
0001-cmake-fix-libdir.patch \
|
||||
0002-libftdi-include-sys-time-timeval.patch \
|
||||
0003-no-distutils.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user