summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-24 12:15:09 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-24 15:58:49 +0100
commit8b6ce47ccc6bb8c734b72786a6c4df10dad08643 (patch)
tree44c3212679d056c9b07bf19ab791d508b216bd60 /gnu/packages/patches
parent43ac6f59c537af217e6a92c95602802498a2b406 (diff)
downloadguix-8b6ce47ccc6bb8c734b72786a6c4df10dad08643.tar.gz
gnu: mupdf: Use only dynamic linking.
* gnu/packages/pdf.scm (mupdf)[source]: Add patch.
[arguments]: Build and find the shared library.
(zathura-pdf-mupdf)[arguments]: Add a 'remove-libmupdfthird.a-requirement
phase to deal with the now-missing static one.
* gnu/packages/patches/mupdf-fix-linkage.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/mupdf-fix-linkage.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/patches/mupdf-fix-linkage.patch b/gnu/packages/patches/mupdf-fix-linkage.patch
new file mode 100644
index 0000000000..4ffd1c6a77
--- /dev/null
+++ b/gnu/packages/patches/mupdf-fix-linkage.patch
@@ -0,0 +1,27 @@
+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)