package/mupdf: fix building shared libraries

By default mupdf generates static libraries, shared libraries must be
enabled explicitely.

Also, when building shared libraries, mupdf's Makefile properly passes
-fPIC, so adding it manually to MUPDF_CFLAGS is not needed.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Raphaël Mélotte
2024-06-07 18:32:04 +02:00
committed by Thomas Petazzoni
parent f7deaa1330
commit 401162d4a9

View File

@@ -23,8 +23,7 @@ MUPDF_DEPENDENCIES = \
zlib
MUPDF_CFLAGS = \
$(TARGET_CFLAGS) \
-fPIC # -fPIC is needed because the Makefile doesn't append it.
$(TARGET_CFLAGS)
MUPDF_LDFLAGS = \
$(TARGET_LDFLAGS)
@@ -40,6 +39,12 @@ MUPDF_MAKE_OPTS = \
HAVE_OBJCOPY=no \
prefix="/usr"
ifeq ($(BR2_STATIC_LIBS),y)
MUPDF_MAKE_OPTS += shared=no
else
MUPDF_MAKE_OPTS += shared=yes
endif
ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
MUPDF_DEPENDENCIES += libfreeglut
else