Changeset View
Changeset View
Standalone View
Standalone View
files/Link-against-shared-libs.patch
- This file was moved from files/0001-shared_libs-1.patch.
| From aaa2d5971fa8419c2a7aec5361d909a45226d20a Mon Sep 17 00:00:00 2001 | |||||
| From: Fabio Forni <livingsilver94.solus@redaril.me> | |||||
| Date: Sun, 6 Dec 2020 13:25:20 +0100 | |||||
| Subject: [PATCH] Link against shared libs | |||||
| --- | |||||
| Makefile | 18 +++++++++++------- | |||||
| 1 file changed, 11 insertions(+), 7 deletions(-) | |||||
| diff --git a/Makefile b/Makefile | diff --git a/Makefile b/Makefile | ||||
| index 814a592..27c18f4 100644 | index b0fb617..9fe5001 100644 | ||||
| --- a/Makefile | --- a/Makefile | ||||
| +++ b/Makefile | +++ b/Makefile | ||||
| @@ -20,7 +20,7 @@ include Makethird | @@ -24,7 +24,7 @@ include Makethird | ||||
| # Do not specify CFLAGS or LIBS on the make invocation line - specify | # Do not specify CFLAGS or LIBS on the make invocation line - specify | ||||
| # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that | # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that | ||||
| # set a variable that was set on the command line. | # set a variable that was set on the command line. | ||||
| -CFLAGS += $(XCFLAGS) -Iinclude | -CFLAGS += $(XCFLAGS) -Iinclude | ||||
| +CFLAGS += $(XCFLAGS) -Iinclude -fPIC | +CFLAGS += $(XCFLAGS) -Iinclude -fPIC | ||||
| LIBS += $(XLIBS) -lm | LIBS += $(XLIBS) -lm | ||||
| ifneq ($(threading),no) | ifneq ($(threading),no) | ||||
| @@ -189,17 +189,21 @@ generate: source/pdf/js/util.js.h | @@ -214,15 +214,19 @@ MUPDF_LIB = $(OUT)/libmupdf.$(SO) | ||||
| # --- Library --- | |||||
| $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) $(THREAD_OBJ) $(PKCS7_OBJ) | |||||
| else | |||||
| -MUPDF_LIB = $(OUT)/libmupdf.a | -MUPDF_LIB = $(OUT)/libmupdf.a | ||||
| -THIRD_LIB = $(OUT)/libmupdf-third.a | -THIRD_LIB = $(OUT)/libmupdf-third.a | ||||
| -THREAD_LIB = $(OUT)/libmupdf-threads.a | -THREAD_LIB = $(OUT)/libmupdf-threads.a | ||||
| -PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a | -PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a | ||||
| +MUPDF_LIB = $(OUT)/libmupdf.so | +MUPDF_LIB = $(OUT)/libmupdf.so | ||||
| +THIRD_LIB = $(OUT)/libmupdf-third.so | +THIRD_LIB = $(OUT)/libmupdf-third.so | ||||
| +THREAD_LIB = $(OUT)/libmupdf-threads.so | +THREAD_LIB = $(OUT)/libmupdf-threads.so | ||||
| +PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so | +PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so | ||||
| -$(MUPDF_LIB) : $(MUPDF_OBJ) | -$(MUPDF_LIB) : $(MUPDF_OBJ) | ||||
| +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) | +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) | ||||
| + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined $(THIRD_LIBS) | + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined $(THIRD_LIBS) | ||||
| $(THIRD_LIB) : $(THIRD_OBJ) | $(THIRD_LIB) : $(THIRD_OBJ) | ||||
| + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-third.so -Wl,--no-undefined | + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-third.so -Wl,--no-undefined | ||||
| $(THREAD_LIB) : $(THREAD_OBJ) | $(THREAD_LIB) : $(THREAD_OBJ) | ||||
| + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so -Wl,--no-undefined -lpthread | + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so -Wl,--no-undefined -lpthread | ||||
| $(PKCS7_LIB) : $(PKCS7_OBJ) | $(PKCS7_LIB) : $(PKCS7_OBJ) | ||||
| + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-pkcs7.so | + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-pkcs7.so | ||||
| endif | |||||
| $(MUPDF_LIB) : $(MUPDF_OBJ) | |||||
| @@ -230,7 +234,7 @@ $(THIRD_LIB) : $(THIRD_OBJ) | |||||
| $(THREAD_LIB) : $(THREAD_OBJ) | |||||
| $(PKCS7_LIB) : $(PKCS7_OBJ) | |||||
| -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) | -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) | ||||
| +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) | +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) | ||||
| # --- Main tools and viewers --- | # --- Main tools and viewers --- | ||||
| diff --git a/Makethird b/Makethird | -- | ||||
| index ab12fcc..02ddb70 100644 | 2.29.2 | ||||
| --- a/Makethird | |||||
| +++ b/Makethird | |||||
| @@ -5,9 +5,9 @@ ifeq ($(USE_SYSTEM_LIBS),yes) | |||||
| USE_SYSTEM_HARFBUZZ := yes | |||||
| USE_SYSTEM_JBIG2DEC := yes | |||||
| USE_SYSTEM_JPEGXR := no # not available | |||||
| - USE_SYSTEM_LCMS2 := no # lcms2mt is strongly preferred | |||||
| + USE_SYSTEM_LCMS2 := yes | |||||
| USE_SYSTEM_LIBJPEG := yes | |||||
| - USE_SYSTEM_MUJS := no # not available | |||||
| + USE_SYSTEM_MUJS := yes | |||||
| USE_SYSTEM_OPENJPEG := yes | |||||
| USE_SYSTEM_ZLIB := yes | |||||
| USE_SYSTEM_GLUT := yes | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.