summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-24 01:25:29 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-24 12:15:32 +0100
commit089f9be4f200b40e397e82728cb29baae12a1021 (patch)
tree45d7bad491f3c48b725a2d9e8b52a93aed2f8c1d /gnu/packages/pdf.scm
parentc89474fffe43e3cbafc34f188431518d184ab6a8 (diff)
downloadguix-patches-089f9be4f200b40e397e82728cb29baae12a1021.tar
guix-patches-089f9be4f200b40e397e82728cb29baae12a1021.tar.gz
gnu: mupdf: Remove more bundled software.
* gnu/packages/pdf.scm (mupdf)[source]: In the snippet, list the thirdparty/ packages we want to keep instead of those to delete.
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm37
1 files changed, 20 insertions, 17 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index afcea4d2bc..15f37ed783 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -685,23 +685,26 @@ extracting content or merging files.")
(name "mupdf")
(version "1.16.1")
(source
- (origin
- (method url-fetch)
- (uri (string-append "https://mupdf.com/downloads/archive/"
- "mupdf-" version "-source.tar.xz"))
- (sha256
- (base32
- "1npmy92lkj41nnc14b4fpq7z62pminy94zsdbrczj22jpn283rvg"))
- (modules '((guix build utils)))
- (snippet
- ;; We keep lcms2 since it is different than our lcms.
- '(begin
- (for-each
- (lambda (dir)
- (delete-file-recursively (string-append "thirdparty/" dir)))
- '("freeglut" "freetype" "harfbuzz" "jbig2dec"
- "libjpeg" "mujs" "openjpeg" "zlib"))
- #t))))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://mupdf.com/downloads/archive/"
+ "mupdf-" version "-source.tar.xz"))
+ (sha256
+ (base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled software.
+ (let* ((keep (list "lcms2")) ; different from our lcms2 package
+ (from "thirdparty")
+ (kept (string-append from "~temp")))
+ (mkdir-p kept)
+ (for-each (lambda (file) (rename-file (string-append from "/" file)
+ (string-append kept "/" file)))
+ keep)
+ (delete-file-recursively from)
+ (rename-file kept from))
+ #t))))
(build-system gnu-build-system)
(inputs
`(("curl" ,curl)