kumquat-buildroot/package/python-pymupdf/python-pymupdf.mk
Raphaël Mélotte fe547366ef package: {, python-py}mupdf: bump to 1.22.0
Also remove the last two '*_IGNORE_CVES', since the corresponding
patches have been removed (they are now part of upstream) in
1fb64680bf.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
[yann.morin.1998@free.fr: move dropping CVE ignores into its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-13 21:48:19 +02:00

30 lines
1.2 KiB
Makefile

################################################################################
#
# python-pymupdf
#
################################################################################
# python-pymupdf's version must match mupdf's version
PYTHON_PYMUPDF_VERSION = 1.22.0
PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/28/ba/d6bb6fd678e8396d7b944870286fb25fd6f499b8cb599b5436c8f725adbf
PYTHON_PYMUPDF_SETUP_TYPE = setuptools
PYTHON_PYMUPDF_LICENSE = AGPL-3.0+
PYTHON_PYMUPDF_LICENSE_FILES = COPYING
# No license file included in pip, but it's present on github
PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig 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))