Submitted By: Pierre Labastie Date: 2016-11-27 Initial Package Version: 1.10 Upstream Status: N/A Origin: Armin K and Gentoo Description: Generate shared libraries for mupdf, instead of static ones. This allows to have the font information (around 35 MB) at one place only, instead of in all the executables. Update: Bruce Dubbs 2017/07/15. Changes to include new threads library. diff -Naur mupdf-1.11-source.orig/Makefile mupdf-1.11-source/Makefile --- mupdf-1.11-source.orig/Makefile 2017-04-05 06:02:21.000000000 -0500 +++ mupdf-1.11-source/Makefile 2017-04-15 18:26:46.286239623 -0500 @@ -14,7 +14,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 # set a variable that was set on the command line. -CFLAGS += $(XCFLAGS) -Iinclude -Igenerated +CFLAGS += $(XCFLAGS) -Iinclude -Igenerated -fPIC LIBS += $(XLIBS) -lm LIBS += $(FREETYPE_LIBS) @@ -300,19 +300,22 @@ # --- Library --- -MUPDF_LIB = $(OUT)/libmupdf.a -THIRD_LIB = $(OUT)/libmupdfthird.a -THREAD_LIB = $(OUT)/libmuthreads.a +MUPDF_LIB = $(OUT)/libmupdf.so +THIRD_LIB = $(OUT)/libmupdfthird.so +THREAD_LIB = $(OUT)/libmuthreads.so MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ) THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(LIBJPEG_OBJ) $(JPEGXR_OBJ) $(LURATECH_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ) THREAD_OBJ := $(THREAD_OBJ) -$(MUPDF_LIB) : $(MUPDF_OBJ) +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined $(THIRD_LIB) : $(THIRD_OBJ) + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdfthird.so -Wl,--no-undefined $(THREAD_LIB) : $(THREAD_OBJ) + $(LINK_CMD) -shared -Wl,-soname -Wl,libmuthreads.so -Wl,--no-undefined -lpthread -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) # --- Tools and Apps ---