gnu: mupdf: Use G-expressions.

* gnu/packages/pdf.scm (mupdf)[source, arguments]: Rewrite using
G-expressions.
This commit is contained in:
Efraim Flashner 2022-05-09 23:27:47 +03:00
parent 489dba600b
commit f7da6b0be5
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -714,18 +714,19 @@ (define-public mupdf
(base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm")) (base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin #~(begin
;; Remove bundled software. ;; Remove bundled software.
(let* ((keep (list "extract" (let* ((keep (list "extract"
"lcms2")) ; different from our lcms2 package "lcms2")) ; different from our lcms2 package
(from "thirdparty") (from "thirdparty")
(kept (string-append from "~temp"))) (kept (string-append from "~temp")))
(mkdir-p kept) (mkdir-p kept)
(for-each (lambda (file) (rename-file (string-append from "/" file) (for-each (lambda (file)
(string-append kept "/" file))) (rename-file (string-append from "/" file)
keep) (string-append kept "/" file)))
(delete-file-recursively from) keep)
(rename-file kept from)))))) (delete-file-recursively from)
(rename-file kept from))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
(list curl (list curl
@ -742,21 +743,23 @@ (define-public mupdf
openssl openssl
zlib)) zlib))
(native-inputs (native-inputs
(list pkg-config)) (list pkg-config))
(arguments (arguments
`(#:tests? #f ; no check target (list
#:make-flags (list "verbose=yes" #:tests? #f ; no check target
(string-append "CC=" ,(cc-for-target)) #:make-flags
"XCFLAGS=-fpic" #~(list "verbose=yes"
"USE_SYSTEM_LIBS=yes" (string-append "CC=" #$(cc-for-target))
"USE_SYSTEM_MUJS=yes" "XCFLAGS=-fpic"
"shared=yes" "USE_SYSTEM_LIBS=yes"
;; Even with the linkage patch we must fix RUNPATH. "USE_SYSTEM_MUJS=yes"
(string-append "LDFLAGS=-Wl,-rpath=" "shared=yes"
(assoc-ref %outputs "out") "/lib") ;; Even with the linkage patch we must fix RUNPATH.
(string-append "prefix=" (assoc-ref %outputs "out"))) (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
#:phases (modify-phases %standard-phases (string-append "prefix=" #$output))
(delete 'configure)))) ; no configure script #:phases
#~(modify-phases %standard-phases
(delete 'configure)))) ; no configure script
(home-page "https://mupdf.com") (home-page "https://mupdf.com")
(synopsis "Lightweight PDF viewer and toolkit") (synopsis "Lightweight PDF viewer and toolkit")
(description (description