me
/
guix
Archived
1
0
Fork 0
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues/pull-requests.
guix/gnu/packages/patches/mupdf-fix-linkage.patch

28 lines
1.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Tue, 24 Nov 2020 10:29:28 +0000
Subject: [PATCH] gnu: mupdf: Fix linkage.
Replace broken linkage to build/shared-release/libmupdf.so with the
proper -L$(libdir) -lmupdf incantation, and fix libmupdf.so's mode.
--- mupdf-1.18.0-source.org/Makefile
+++ mupdf-1.18.0-source/Makefile
@@ -61,7 +61,7 @@
ifdef RANLIB
RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@
endif
-LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $(subst $(MUPDF_LIB),-L$(libdir) -L$(OUT) -lmupdf,$^) $(LIBS)
TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
@@ -364,7 +364,7 @@ install: libs apps
install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
install -d $(DESTDIR)$(libdir)
- install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir)
+ install -m 755 $(INSTALL_LIBS) $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(bindir)
install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)