depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # harfbuzz
depends on BR2_PACKAGE_XORG7
select BR2_PACKAGE_FREETYPE
+ select BR2_PACKAGE_GUMBO_PARSER
select BR2_PACKAGE_HARFBUZZ
select BR2_PACKAGE_JBIG2DEC
select BR2_PACKAGE_JPEG
# From https://mupdf.com/downloads/index.html:
-sha1 18f069b7cc125e53f541163ac305c588c94dea97 mupdf-1.16.0-source.tar.gz
+sha1 fc17bd01d5860e49b009f28a5ddb629e94af4510 mupdf-1.18.0-source.tar.xz
# Locally computed:
-sha256 64d537895641b711737cc58fe762481b07ea71d1506e8bd8a13434e093b0068d mupdf-1.16.0-source.tar.gz
+sha256 592d4f6c0fba41bb954eb1a41616661b62b134d5b383e33bd45a081af5d4a59a mupdf-1.18.0-source.tar.xz
# Hash for license files:
-sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
+sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
#
################################################################################
-# python-pymupdf's version must match exactly mupdf's version
-MUPDF_VERSION = 1.16.0
-MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.gz
+# python-pymupdf's version must match mupdf's version
+MUPDF_VERSION = 1.18.0
+MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.xz
MUPDF_SITE = https://mupdf.com/downloads/archive
MUPDF_LICENSE = AGPL-3.0+
MUPDF_LICENSE_FILES = COPYING
MUPDF_INSTALL_STAGING = YES
MUPDF_DEPENDENCIES = \
freetype \
+ gumbo-parser \
harfbuzz \
host-pkgconf \
jbig2dec jpeg \
xlib_libX11 \
zlib
+# The pkg-config name for gumbo-parser is `gumbo`.
MUPDF_PKG_CONFIG_PACKAGES = \
freetype2 \
+ gumbo \
harfbuzz \
libjpeg \
zlib
XLIBS="$(MUPDF_LDFLAGS)" \
USE_SYSTEM_LIBS=yes
-# Modern versions of mupdf depend on OpenGL,
-# we disable it because it may not be available:
+ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
+MUPDF_DEPENDENCIES += libfreeglut
+else
define MUPDF_DISABLE_OPENGL
sed -i 's/HAVE_GLUT := yes/HAVE_GLUT := no/g' $(@D)/Makerules
endef
-
MUPDF_POST_PATCH_HOOKS = MUPDF_DISABLE_OPENGL
+endif
define MUPDF_BUILD_CMDS
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) all