generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
22
package/python-pymupdf/Config.in
Normal file
22
package/python-pymupdf/Config.in
Normal file
@ -0,0 +1,22 @@
|
||||
config BR2_PACKAGE_PYTHON_PYMUPDF
|
||||
bool "python-pymupdf"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # mupdf -> harfbuzz
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mupdf -> harfbuzz
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mupdf -> harfbuzz
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_FREETYPE
|
||||
select BR2_PACKAGE_MUPDF
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Python bindings for the PDF rendering library MuPDF.
|
||||
|
||||
https://github.com/pymupdf/PyMuPDF
|
||||
|
||||
comment "python-pymupdf needs Xorg"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_PACKAGE_XORG7
|
||||
|
||||
comment "python-pymupdf needs a toolchain w/ C++, gcc >= 4.9"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
5
package/python-pymupdf/python-pymupdf.hash
Normal file
5
package/python-pymupdf/python-pymupdf.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# md5, sha256 from https://pypi.org/pypi/pymupdf/json
|
||||
md5 70d6c2232e531772bbe9a813044262f9 PyMuPDF-1.18.14.tar.gz
|
||||
sha256 efe85cb80f79cc3f3890aa2ab82b962b8a999ca078e33e9bacc5d0be5c4656dc PyMuPDF-1.18.14.tar.gz
|
||||
# Locally computed:
|
||||
sha256 282751b8c98ee9e445346eb57a992c9ecbe25ed8dd554df046777313e19b10f9 COPYING
|
||||
29
package/python-pymupdf/python-pymupdf.mk
Normal file
29
package/python-pymupdf/python-pymupdf.mk
Normal file
@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-pymupdf
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# python-pymupdf's version must match mupdf's version
|
||||
PYTHON_PYMUPDF_VERSION = 1.18.14
|
||||
PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
|
||||
PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/41/f6/dbefe3d6949fa81fb7bcac9141e4345330d272724718ac5a6af78297498b
|
||||
PYTHON_PYMUPDF_SETUP_TYPE = setuptools
|
||||
PYTHON_PYMUPDF_LICENSE = GPL-3.0, AGPL-3.0+ (code generated from mupdf)
|
||||
PYTHON_PYMUPDF_LICENSE_FILES = COPYING
|
||||
# No license file included in pip, but it's present on github
|
||||
PYTHON_PYMUPDF_DEPENDENCIES = freetype mupdf zlib
|
||||
|
||||
PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2"
|
||||
|
||||
# We need to remove the original paths as we provide them in the CFLAGS:
|
||||
define PYTHON_PYMUPDF_REMOVE_PATHS
|
||||
sed -i "/\/usr\/include\/mupdf/d" $(@D)/setup.py
|
||||
sed -i "/\/usr\/include\/freetype2/d" $(@D)/setup.py
|
||||
sed -i "/\/usr\/local\/include\/mupdf/d" $(@D)/setup.py
|
||||
sed -i "/mupdf\/thirdparty\/freetype\/include/d" $(@D)/setup.py
|
||||
endef
|
||||
|
||||
PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS
|
||||
|
||||
$(eval $(python-package))
|
||||
Reference in New Issue
Block a user