diff mbox series

[v2,3/5] package/mupdf: fix building shared libraries

Message ID 20240607163208.1445715-3-raphael.melotte@mind.be
State Accepted
Headers show
Series [v2,1/5] package: python-pymupdf: add missing python-zlib dependency | expand

Commit Message

Raphaël Mélotte June 7, 2024, 4:32 p.m. UTC
By default mupdf generates static libraries, shared libraries must be
enabled explicitely.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
---
Changes v1 -> v2:
  - Remove SHARED_STATIC_LIBS depends and use explicit options.
---
 package/mupdf/mupdf.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Thomas Petazzoni July 13, 2024, 8:36 p.m. UTC | #1
On Fri,  7 Jun 2024 18:32:04 +0200
Raphaël Mélotte via buildroot <buildroot@buildroot.org> wrote:

> +ifeq ($(BR2_STATIC_LIBS),y)
> +MUPDF_MAKE_OPTS += shared=no
> +else
> +MUPDF_MAKE_OPTS += shared=yes
> +endif

This allowed to also drop the manual addition of -fPIC, because it's
done automatically by the package Makefile when shared=yes.
See https://gitlab.com/buildroot.org/buildroot/-/commit/401162d4a947184654d8202392425a625d000172

Applied with this change. Thanks!

Thomas
Peter Korsgaard Aug. 12, 2024, 9:14 a.m. UTC | #2
>>>>> "Raphaël" == Raphaël Mélotte via buildroot <buildroot@buildroot.org> writes:

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

 > Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
 > ---
 > Changes v1 -> v2:
 >   - Remove SHARED_STATIC_LIBS depends and use explicit options.

Committed to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk
index 08894d7980..4673b88291 100644
--- a/package/mupdf/mupdf.mk
+++ b/package/mupdf/mupdf.mk
@@ -50,6 +50,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