Skip to content

Commit

Permalink
mupdf: fix bug loading mupdf-x11 with shared library build
Browse files Browse the repository at this point in the history
Error loading shared library build/shared-release/libmupdf.so:
No such file or directory (needed by /bin/mupdf-x11)

caused by a buggy Makefile adding the full path to the .so at link time
instead of -Llocation -lmupdf.
  • Loading branch information
rofl0r committed Oct 21, 2020
1 parent 36ca493 commit 374ff53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions KEEP/mupdf-1.18-shared.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- 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$(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 $@ $<
1 change: 1 addition & 0 deletions pkg/mupdf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ libressl
jbig2dec

[build]
patch -p1 < "$K"/mupdf-1.18-shared.patch
rm -rf thirdparty/curl thirdparty/freetype thirdparty/jpeg thirdparty/zlib thirdparty/jbig2dec
PCS_SAVE="$PKG_CONFIG_SYSROOT_DIR"
PCL_SAVE="$PKG_CONFIG_LIBDIR"
Expand Down

0 comments on commit 374ff53

Please sign in to comment.