gnu: qpdf: Remove run-time dependency on Perl.
* gnu/packages/pdf.scm (qpdf)[source](snippet): New field. [arguments]: Add #:disallowed-references. [inputs]: Move PERL to... [native-inputs]: ... here.
This commit is contained in:
parent
6d49ca3bad
commit
503409b543
|
@ -471,27 +471,38 @@ and examining the file structure (pdfshow).")
|
||||||
(uri (string-append "mirror://sourceforge/qpdf/qpdf-"
|
(uri (string-append "mirror://sourceforge/qpdf/qpdf-"
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
(sha256 (base32
|
(sha256 (base32
|
||||||
"1lq1v7xghvl6p4hgrwbps3a13ad6lh4ib3myimb83hxgsgd4n5nm"))))
|
"1lq1v7xghvl6p4hgrwbps3a13ad6lh4ib3myimb83hxgsgd4n5nm"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
;; Replace shebang with the bi-lingual shell/Perl trick to remove
|
||||||
|
;; dependency on Perl.
|
||||||
|
'(substitute* "qpdf/fix-qdf"
|
||||||
|
(("#!/usr/bin/env perl")
|
||||||
|
"\
|
||||||
|
eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
|
||||||
|
& eval 'exec perl -wS \"$0\" $argv:q'
|
||||||
|
if 0;\n")))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases (alist-cons-before
|
`(#:disallowed-references (,perl)
|
||||||
'configure 'patch-paths
|
#:phases (alist-cons-before
|
||||||
(lambda _
|
'configure 'patch-paths
|
||||||
(substitute* "make/libtool.mk"
|
(lambda _
|
||||||
(("SHELL=/bin/bash")
|
(substitute* "make/libtool.mk"
|
||||||
(string-append "SHELL=" (which "bash"))))
|
(("SHELL=/bin/bash")
|
||||||
(substitute* (append
|
(string-append "SHELL=" (which "bash"))))
|
||||||
'("qtest/bin/qtest-driver")
|
(substitute* (append
|
||||||
(find-files "." "\\.test"))
|
'("qtest/bin/qtest-driver")
|
||||||
(("/usr/bin/env") (which "env"))))
|
(find-files "." "\\.test"))
|
||||||
%standard-phases)))
|
(("/usr/bin/env") (which "env"))))
|
||||||
|
%standard-phases)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)
|
||||||
|
("perl" ,perl)))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("pcre" ,pcre)))
|
`(("pcre" ,pcre)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("zlib" ,zlib)
|
`(("zlib" ,zlib)))
|
||||||
("perl" ,perl)))
|
|
||||||
(synopsis "Command-line tools and library for transforming PDF files")
|
(synopsis "Command-line tools and library for transforming PDF files")
|
||||||
(description
|
(description
|
||||||
"QPDF is a command-line program that does structural, content-preserving
|
"QPDF is a command-line program that does structural, content-preserving
|
||||||
|
|
Loading…
Reference in New Issue