-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
+--- Makefile.orig	2020-03-25 11:02:34.874709800 -0500
++++ Makefile	2020-04-03 13:06:00.681559332 -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

 $(THREAD_LIB) : $(THREAD_OBJ)
+	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so -Wl,--no-undefined -lpthread
 $(PKCS7_LIB) : $(PKCS7_OBJ)
+	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupfs-pkcs7.so

-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
+INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)

 # --- Main tools and viewers ---


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