 -CFLAGS += $(XCFLAGS) -Iinclude
 +CFLAGS += $(XCFLAGS) -Iinclude -fPIC
  LIBS += $(XLIBS) -lm
-
+ 
  ifneq ($(threading),no)
-@@ -190,17 +190,21 @@
-
+@@ -189,17 +189,21 @@
+ 
  # --- Library ---
-
+ 
 -MUPDF_LIB = $(OUT)/libmupdf.a
 -THIRD_LIB = $(OUT)/libmupdf-third.a
 -THREAD_LIB = $(OUT)/libmupdf-threads.a

Submitted By: Bruce Dubbs  <bdubbs at linuxfromscratch dot org>
Date: 2018-04-21
Initial Package Version: 1.13
Upstream Status: Not submitted
Origin: Self
Description: Change static libraries to shared libraries

Rediffed for Version 1.14 2018-10-07
Rediffed for Version 1.16 2018-10-07

diff -Naur mupdf-1.14.0-source.orig/Makefile mupdf-1.14.0-source/Makefile
--- mupdf-1.14.0-source.orig/Makefile	2018-10-04 04:19:28.000000000 -0500
+++ mupdf-1.14.0-source/Makefile	2018-10-07 15:13:52.617926593 -0500
@@ -20,7 +20,7 @@
 # Do not specify CFLAGS or LIBS on the make invocation line - specify
 # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that

+THIRD_LIB = $(OUT)/libmupdf-third.so
+THREAD_LIB = $(OUT)/libmupdf-threads.so
+PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so
 
-$(MUPDF_LIB) : $(MUPDF_OBJ)
+$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB)
+	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined $(THIRD_LIBS)
