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.
This commit is contained in:
Tobias Geerinckx-Rice 2020-11-24 01:25:29 +01:00
parent c89474fffe
commit 089f9be4f2
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -690,17 +690,20 @@ (define-public mupdf
(uri (string-append "https://mupdf.com/downloads/archive/" (uri (string-append "https://mupdf.com/downloads/archive/"
"mupdf-" version "-source.tar.xz")) "mupdf-" version "-source.tar.xz"))
(sha256 (sha256
(base32 (base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar"))
"1npmy92lkj41nnc14b4fpq7z62pminy94zsdbrczj22jpn283rvg"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; We keep lcms2 since it is different than our lcms.
'(begin '(begin
(for-each ;; Remove bundled software.
(lambda (dir) (let* ((keep (list "lcms2")) ; different from our lcms2 package
(delete-file-recursively (string-append "thirdparty/" dir))) (from "thirdparty")
'("freeglut" "freetype" "harfbuzz" "jbig2dec" (kept (string-append from "~temp")))
"libjpeg" "mujs" "openjpeg" "zlib")) (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)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs