2020-02-07 10:37:05 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# python-pymupdf
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-07-01 01:47:16 +02:00
|
|
|
# python-pymupdf's version must match mupdf's version
|
|
|
|
PYTHON_PYMUPDF_VERSION = 1.18.14
|
2020-02-07 10:37:05 +01:00
|
|
|
PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
|
2021-07-01 01:47:16 +02:00
|
|
|
PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/41/f6/dbefe3d6949fa81fb7bcac9141e4345330d272724718ac5a6af78297498b
|
|
|
|
PYTHON_PYMUPDF_SETUP_TYPE = setuptools
|
2020-02-07 10:37:05 +01:00
|
|
|
PYTHON_PYMUPDF_LICENSE = GPL-3.0, AGPL-3.0+ (code generated from mupdf)
|
2021-07-01 01:47:16 +02:00
|
|
|
PYTHON_PYMUPDF_LICENSE_FILES = COPYING
|
2020-02-07 10:37:05 +01:00
|
|
|
# No license file included in pip, but it's present on github
|
2021-07-01 01:47:16 +02:00
|
|
|
PYTHON_PYMUPDF_DEPENDENCIES = freetype mupdf zlib
|
2020-02-07 10:37:05 +01:00
|
|
|
|
2021-07-01 01:47:16 +02:00
|
|
|
PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2"
|
2020-02-07 10:37:05 +01:00
|
|
|
|
|
|
|
# We need to remove the original paths as we provide them in the CFLAGS:
|
|
|
|
define PYTHON_PYMUPDF_REMOVE_PATHS
|
2021-07-01 01:47:16 +02:00
|
|
|
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
|
2020-02-07 10:37:05 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS
|
|
|
|
|
|
|
|
$(eval $(python-package))
|