diff --git a/buildroot-2021.05/configs/milkv_duo_musl_riscv64_defconfig b/buildroot-2021.05/configs/milkv_duo_musl_riscv64_defconfig index 550a48158..6b9c9a958 100644 --- a/buildroot-2021.05/configs/milkv_duo_musl_riscv64_defconfig +++ b/buildroot-2021.05/configs/milkv_duo_musl_riscv64_defconfig @@ -343,6 +343,7 @@ BR2_PACKAGE_PYTHON_SMBUS_CFFI=y BR2_PACKAGE_PYTHON_SPIDEV=y BR2_PACKAGE_PYTHON_MODBUS_TK=y BR2_PACKAGE_PYTHON_EVDEV=y +BR2_PACKAGE_PYTHON_FREETYPE=y # # Compression and decompression @@ -367,6 +368,8 @@ BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="riscv64-unknown-linux-gnu" BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl" +BR2_PACKAGE_FREETYPE=y + # # JSON/XML # diff --git a/buildroot-2021.05/dl/freetype/.lock b/buildroot-2021.05/dl/freetype/.lock new file mode 100644 index 000000000..e69de29bb diff --git a/buildroot-2021.05/dl/freetype/freetype-2.10.4.tar.xz b/buildroot-2021.05/dl/freetype/freetype-2.10.4.tar.xz new file mode 100644 index 000000000..7b425f4f1 Binary files /dev/null and b/buildroot-2021.05/dl/freetype/freetype-2.10.4.tar.xz differ diff --git a/buildroot-2021.05/dl/python-freetype/.lock b/buildroot-2021.05/dl/python-freetype/.lock new file mode 100644 index 000000000..e69de29bb diff --git a/buildroot-2021.05/dl/python-freetype/freetype-py-2.4.0.zip b/buildroot-2021.05/dl/python-freetype/freetype-py-2.4.0.zip new file mode 100644 index 000000000..2941d7e9c Binary files /dev/null and b/buildroot-2021.05/dl/python-freetype/freetype-py-2.4.0.zip differ diff --git a/buildroot-2021.05/package/Config.in b/buildroot-2021.05/package/Config.in index 788b7c5ab..0c50750ab 100644 --- a/buildroot-2021.05/package/Config.in +++ b/buildroot-2021.05/package/Config.in @@ -995,6 +995,7 @@ menu "External python modules" source "package/python-flask-wtf/Config.in" source "package/python-flatbuffers/Config.in" source "package/python-flup/Config.in" + source "package/python-freetype/Config.in" source "package/python-frozenlist/Config.in" source "package/python-functools32/Config.in" source "package/python-future/Config.in" diff --git a/buildroot-2021.05/package/python-freetype/0001-do-not-need-setuptools_scm.patch b/buildroot-2021.05/package/python-freetype/0001-do-not-need-setuptools_scm.patch new file mode 100644 index 000000000..62b404fa5 --- /dev/null +++ b/buildroot-2021.05/package/python-freetype/0001-do-not-need-setuptools_scm.patch @@ -0,0 +1,41 @@ +From d96035f5c857acc8fdf0fb83152ed781fcf13af4 Mon Sep 17 00:00:00 2001 +From: carbon +Date: Mon, 28 Aug 2023 18:20:15 +0800 +Subject: [PATCH] do not need setuptools_scm + +--- + pyproject.toml | 2 +- + setup.py | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index cb5ee0c..98ae97a 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,2 +1,2 @@ + [build-system] +-requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "certifi", "cmake"] ++requires = ["setuptools>=42", "wheel", "certifi", "cmake"] +diff --git a/setup.py b/setup.py +index af7f101..d4183ca 100644 +--- a/setup.py ++++ b/setup.py +@@ -102,7 +102,6 @@ description = open( + + setup( + name='freetype-py', +- use_scm_version=True, + description='Freetype python bindings', + long_description=description, + author='Nicolas P. Rougier', +@@ -127,7 +126,6 @@ setup( + 'Topic :: Multimedia :: Graphics', + ], + keywords=['freetype', 'font'], +- setup_requires=['setuptools_scm'], + entry_points={ + "pyinstaller40": [ + "hook-dirs = freetype.__pyinstaller:get_hook_dirs", +-- +2.25.1 + diff --git a/buildroot-2021.05/package/python-freetype/Config.in b/buildroot-2021.05/package/python-freetype/Config.in new file mode 100644 index 000000000..e26e37d0f --- /dev/null +++ b/buildroot-2021.05/package/python-freetype/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_FREETYPE + bool "python-freetype" + help + Freetype Python provides bindings for the FreeType library. + Only the high-level API is bound. + + https://pypi.python.org/pypi/freetype-pi diff --git a/buildroot-2021.05/package/python-freetype/python-freetype.hash b/buildroot-2021.05/package/python-freetype/python-freetype.hash new file mode 100644 index 000000000..b194c7845 --- /dev/null +++ b/buildroot-2021.05/package/python-freetype/python-freetype.hash @@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/project/freetype-py/ +md5 c63b1ee876bf97be9d2be49745e10be7 freetype-py-2.4.0.zip +sha256 8ad81195d2f8f339aba61700cebfbd77defad149c51f59b75a2a5e37833ae12e freetype-py-2.4.0.zip +# Locally computed sha256 checksums +sha256 60386caf4d85fb57b5cc5470f1a00de1692fb28e8b731f7f9187f64451dbe641 LICENSE.txt diff --git a/buildroot-2021.05/package/python-freetype/python-freetype.mk b/buildroot-2021.05/package/python-freetype/python-freetype.mk new file mode 100644 index 000000000..d0a0026a3 --- /dev/null +++ b/buildroot-2021.05/package/python-freetype/python-freetype.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# freetype-py +# +################################################################################ + +PYTHON_FREETYPE_VERSION = 2.4.0 +PYTHON_FREETYPE_SOURCE = freetype-py-$(PYTHON_FREETYPE_VERSION).zip +PYTHON_FREETYPE_SITE = https://files.pythonhosted.org/packages/a7/6d/66c222fae5dc5fd13fd840ab75feb49f78963f560a56e134c85f1236a94c +PYTHON_FREETYPE_SETUP_TYPE = setuptools +PYTHON_FREETYPE_LICENSE = Revised BSD License +PYTHON_FREETYPE_LICENSE_FILES = LICENSE.txt + +define PYTHON_FREETYPE_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(PYTHON_FREETYPE_DL_DIR)/$(PYTHON_FREETYPE_SOURCE) + mv $(@D)/freetype-py-$(PYTHON_FREETYPE_VERSION)/* $(@D) + $(RM) -r $(@D)/freetype-py-$(PYTHON_FREETYPE_VERSION) +endef + +$(eval $(python-package))