fontforge: do not use distutils
This commit is contained in:
24
mingw-w64-fontforge/001-no-distutils.patch
Normal file
24
mingw-w64-fontforge/001-no-distutils.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff -urN fontforge-20230101/pyhook/CMakeLists.txt.orig fontforge-20230101/pyhook/CMakeLists.txt
|
||||
--- fontforge-20230101/pyhook/CMakeLists.txt.orig 2023-01-01 06:25:39.000000000 +0100
|
||||
+++ fontforge-20230101/pyhook/CMakeLists.txt 2024-11-04 18:45:57.371407500 +0100
|
||||
@@ -21,7 +21,19 @@
|
||||
# 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 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)
|
||||
+"
|
||||
RESULT_VARIABLE _pyhook_install_dir_result
|
||||
OUTPUT_VARIABLE PYHOOK_INSTALL_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
@@ -4,7 +4,7 @@ _realname=fontforge
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=20230101
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc='Outline and bitmap font editor (mingw-w64)'
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
@@ -38,13 +38,25 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-sphinx")
|
||||
source=("https://github.com/${_realname}/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz"
|
||||
"fontforge-doc-no-warn-error.patch")
|
||||
"fontforge-doc-no-warn-error.patch"
|
||||
"001-no-distutils.patch")
|
||||
sha256sums=('ca82ec4c060c4dda70ace5478a41b5e7b95eb035fe1c4cf85c48f996d35c60f8'
|
||||
'b87fa5a39d6948262d2dfb9b84c2462dc21de0bfb115cdd13e893c1b533d8f78')
|
||||
'b87fa5a39d6948262d2dfb9b84c2462dc21de0bfb115cdd13e893c1b533d8f78'
|
||||
'9903e4ff6f202cf588d71f23fd8c8a11b88ef9d9e796f8b41305bb27c87e50ea')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Np1 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/fontforge-doc-no-warn-error.patch"
|
||||
apply_patch_with_msg \
|
||||
fontforge-doc-no-warn-error.patch \
|
||||
001-no-distutils.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user