me
/
guix
Archived
1
0
Fork 0

gnu: a2ps: Use 'modify-phases'.

* gnu/packages/pretty-print.scm (a2ps)[arguments]: Use 'modify-phases'.
master
Efraim Flashner 2016-05-30 07:15:42 +03:00
parent 6447e19108
commit d01f680c07
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 30 additions and 31 deletions

View File

@ -58,37 +58,36 @@
`(("gperf" ,gperf) `(("gperf" ,gperf)
("perl" ,perl))) ("perl" ,perl)))
(arguments (arguments
'(#:phases (alist-cons-before '(#:phases
'build 'patch-scripts (modify-phases %standard-phases
(lambda _ (add-before 'build 'patch-scripts
(substitute* (lambda _
'("afm/make_fonts_map.sh" (substitute*
"tests/defs" '("afm/make_fonts_map.sh"
"tests/backup.tst" "tests/defs"
"tests/styles.tst") "tests/backup.tst"
(("/bin/rm") (which "rm")))) "tests/styles.tst")
(alist-cons-before (("/bin/rm") (which "rm")))))
'check 'patch-test-files (add-before 'check 'patch-test-files
;; Alternatively, we could unpatch the shebangs in tstfiles ;; Alternatively, we could unpatch the shebangs in tstfiles
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((perl (assoc-ref inputs "perl"))) (let ((perl (assoc-ref inputs "perl")))
(substitute* '("tests/ps-ref/includeres.ps" (substitute* '("tests/ps-ref/includeres.ps"
"tests/gps-ref/includeres.ps") "tests/gps-ref/includeres.ps")
(("/usr/local/bin/perl") (("/usr/local/bin/perl")
(string-append perl "/bin/perl")))) (string-append perl "/bin/perl"))))
;; Some of the reference postscript contain a 'version 3' ;; Some of the reference postscript contain a 'version 3'
;; string that in inconsistent with the source text in the ;; string that in inconsistent with the source text in the
;; tstfiles directory. Erroneous search-and-replace? ;; tstfiles directory. Erroneous search-and-replace?
(substitute* '("tests/ps-ref/InsertBlock.ps" (substitute* '("tests/ps-ref/InsertBlock.ps"
"tests/gps-ref/InsertBlock.ps" "tests/gps-ref/InsertBlock.ps"
"tests/ps-ref/bookie.ps" "tests/ps-ref/bookie.ps"
"tests/gps-ref/bookie.ps") "tests/gps-ref/bookie.ps")
(("version 3") "version 2")) (("version 3") "version 2"))
(substitute* '("tests/ps-ref/psmandup.ps" (substitute* '("tests/ps-ref/psmandup.ps"
"tests/gps-ref/psmandup.ps") "tests/gps-ref/psmandup.ps")
(("#! */bin/sh") (string-append (("#! */bin/sh") (string-append
"#!" (which "sh"))))) "#!" (which "sh")))))))))
%standard-phases))))
(home-page "http://www.gnu.org/software/a2ps") (home-page "http://www.gnu.org/software/a2ps")
(synopsis "Any file to PostScript, including pretty-printing") (synopsis "Any file to PostScript, including pretty-printing")
(description (description