24905d4d93
It appears that python-pymupdf needs swig when building since mupdf was bumped to 1.18.0 in commitf00da714a2. This was not noticed before because when building on a machine where swig is already available outside buildroot, it is used and the build succeeds. This fixes the following build failure: swigging fitz/fitz.i to fitz/fitz_wrap.c swig -python -w509 -o fitz/fitz_wrap.c fitz/fitz.i error: command 'swig' failed: No such file or directory make: *** [package/pkg-generic.mk:293: /home/buildroot/autobuild/instance-2/output-1/build/python-pymupdf-1.21.1/.stamp_built] Error 1 Fixes: - http://autobuild.buildroot.net/results/c689a385d984b87b63f3f2ff30338049774b1bf2 - http://autobuild.buildroot.net/results/cf268d3631330a8288fb8ad2af009abb7f1ca6b0 Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commita650d71434) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
30 lines
1.2 KiB
Makefile
30 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# python-pymupdf
|
|
#
|
|
################################################################################
|
|
|
|
# python-pymupdf's version must match mupdf's version
|
|
PYTHON_PYMUPDF_VERSION = 1.21.1
|
|
PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
|
|
PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/30/44/9fce79689e5df7deebe2d17cb2b9b2a6b888439c241e71296e732aefa649
|
|
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))
|