2020-02-07 10:37:04 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# mudpf
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-07-01 01:47:15 +02:00
|
|
|
# python-pymupdf's version must match mupdf's version
|
2023-04-18 12:58:13 +02:00
|
|
|
MUPDF_VERSION = 1.22.0
|
2022-11-03 19:06:05 +01:00
|
|
|
MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.lz
|
2020-02-07 10:37:04 +01:00
|
|
|
MUPDF_SITE = https://mupdf.com/downloads/archive
|
|
|
|
MUPDF_LICENSE = AGPL-3.0+
|
|
|
|
MUPDF_LICENSE_FILES = COPYING
|
2021-06-12 17:20:03 +02:00
|
|
|
MUPDF_CPE_ID_VENDOR = artifex
|
2020-02-07 10:37:04 +01:00
|
|
|
MUPDF_INSTALL_STAGING = YES
|
|
|
|
MUPDF_DEPENDENCIES = \
|
|
|
|
freetype \
|
2021-07-01 01:47:15 +02:00
|
|
|
gumbo-parser \
|
2020-02-07 10:37:04 +01:00
|
|
|
harfbuzz \
|
|
|
|
host-pkgconf \
|
|
|
|
jbig2dec jpeg \
|
|
|
|
lcms2 openjpeg \
|
|
|
|
xlib_libX11 \
|
|
|
|
zlib
|
|
|
|
|
2021-07-01 01:47:15 +02:00
|
|
|
# The pkg-config name for gumbo-parser is `gumbo`.
|
2020-02-07 10:37:04 +01:00
|
|
|
MUPDF_PKG_CONFIG_PACKAGES = \
|
|
|
|
freetype2 \
|
2021-07-01 01:47:15 +02:00
|
|
|
gumbo \
|
2020-02-07 10:37:04 +01:00
|
|
|
harfbuzz \
|
|
|
|
libjpeg \
|
|
|
|
zlib
|
|
|
|
|
|
|
|
MUPDF_CFLAGS = \
|
|
|
|
$(TARGET_CFLAGS) \
|
|
|
|
`$(PKG_CONFIG_HOST_BINARY) --cflags $(MUPDF_PKG_CONFIG_PACKAGES)` \
|
|
|
|
-fPIC # -fPIC is needed because the Makefile doesn't append it.
|
|
|
|
|
|
|
|
MUPDF_LDFLAGS = \
|
|
|
|
$(TARGET_LDFLAGS) \
|
|
|
|
`$(PKG_CONFIG_HOST_BINARY) --libs $(MUPDF_PKG_CONFIG_PACKAGES)`
|
|
|
|
|
|
|
|
# mupdf doesn't use CFLAGS and LIBS but XCFLAGS and XLIBS instead.
|
|
|
|
# with USE_SYSTEM_LIBS it will try to use system libraries instead of the bundled ones.
|
|
|
|
MUPDF_MAKE_ENV = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
|
|
|
|
XCFLAGS="$(MUPDF_CFLAGS)" \
|
|
|
|
XLIBS="$(MUPDF_LDFLAGS)" \
|
|
|
|
USE_SYSTEM_LIBS=yes
|
|
|
|
|
2021-11-15 18:33:44 +01:00
|
|
|
MUPDF_MAKE_OPTS = \
|
|
|
|
HAVE_OBJCOPY=no \
|
|
|
|
prefix="/usr"
|
|
|
|
|
2021-07-01 01:47:15 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
|
|
|
|
MUPDF_DEPENDENCIES += libfreeglut
|
|
|
|
else
|
2021-11-15 18:33:44 +01:00
|
|
|
MUPDF_MAKE_OPTS += HAVE_GLUT=no
|
2021-07-01 01:47:15 +02:00
|
|
|
endif
|
2020-02-07 10:37:04 +01:00
|
|
|
|
|
|
|
define MUPDF_BUILD_CMDS
|
2021-11-15 18:33:44 +01:00
|
|
|
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) all
|
2020-02-07 10:37:04 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define MUPDF_INSTALL_STAGING_CMDS
|
2021-11-15 18:33:44 +01:00
|
|
|
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) \
|
2022-11-03 19:06:05 +01:00
|
|
|
DESTDIR="$(STAGING_DIR)" install-libs
|
2020-02-07 10:37:04 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define MUPDF_INSTALL_TARGET_CMDS
|
2021-11-15 18:33:44 +01:00
|
|
|
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) \
|
|
|
|
DESTDIR="$(TARGET_DIR)" install
|
2020-02-07 10:37:04 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|