summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
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/pdf.scm
parent43ac6f59c537af217e6a92c95602802498a2b406 (diff)
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/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 9cb460972f..1899501122 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -526,6 +526,12 @@ using the DjVuLibre library.")
"-Dlink-external=true")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-libmupdfthird.a-requirement
+ (lambda _
+ ;; Ignore a missing (apparently superfluous) static library.
+ (substitute* "meson.build"
+ ((".*mupdfthird.*") ""))
+ #t))
(add-before 'configure 'add-mujs-to-dependencies
(lambda _
;; Add mujs to the 'build_dependencies'.
@@ -692,6 +698,7 @@ extracting content or merging files.")
"mupdf-" version "-source.tar.xz"))
(sha256
(base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar"))
+ (patches (search-patches "mupdf-fix-linkage.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -730,6 +737,10 @@ extracting content or merging files.")
"XCFLAGS=-fpic"
"USE_SYSTEM_LIBS=yes"
"USE_SYSTEM_MUJS=yes"
+ "shared=yes"
+ ;; Even with the linkage patch we must fix RUNPATH.
+ (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib")
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases (modify-phases %standard-phases
(delete 'configure)))) ; no configure script