gnu: fontforge: Use modify-phases.

* gnu/packages/fontutils.scm (fontforge)[arguments]: Use modify-phases.
This commit is contained in:
Eric Bavier 2016-04-05 22:51:53 -05:00
parent f85cafde81
commit 5ab869f962

View file

@ -541,39 +541,37 @@ (define-public fontforge
(arguments (arguments
'(#:tests? #f '(#:tests? #f
#:phases #:phases
(alist-cons-before (modify-phases %standard-phases
'configure 'patch-configure (add-before 'configure 'patch-configure
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((libxml2 (assoc-ref inputs "libxml2")) (let ((libxml2 (assoc-ref inputs "libxml2"))
(cairo (assoc-ref inputs "cairo")) (cairo (assoc-ref inputs "cairo"))
(pango (assoc-ref inputs "pango"))) (pango (assoc-ref inputs "pango")))
(substitute* "configure" (substitute* "configure"
;; configure looks for a directory to be present to determine ;; configure looks for a directory to be present to determine
;; whether libxml2 is available, rather than checking for the ;; whether libxml2 is available, rather than checking for the
;; library or headers. Point it to the correct directory. ;; library or headers. Point it to the correct directory.
(("/usr/include/libxml2") (("/usr/include/libxml2")
(string-append libxml2 "/include/libxml2")) (string-append libxml2 "/include/libxml2"))
;; Similary, the search directories for cairo and pango are ;; Similary, the search directories for cairo and pango are
;; hard-coded. ;; hard-coded.
(("gww_prefix in.*") (string-append "gww_prefix in " (("gww_prefix in.*") (string-append "gww_prefix in "
cairo " " pango "\n"))))) cairo " " pango "\n"))))))
(alist-cons-after (add-after 'install 'set-library-path
'install 'set-library-path (lambda* (#:key inputs outputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))
(let ((out (assoc-ref outputs "out")) (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
(potrace (string-append (assoc-ref inputs "potrace") "/bin"))) (wrap-program (string-append out "/bin/fontforge")
(wrap-program (string-append out "/bin/fontforge") ;; Fontforge dynamically opens libraries.
;; Fontforge dynamically opens libraries. `("LD_LIBRARY_PATH" ":" prefix
`("LD_LIBRARY_PATH" ":" prefix ,(map (lambda (input)
,(map (lambda (input) (string-append (assoc-ref inputs input)
(string-append (assoc-ref inputs input) "/lib"))
"/lib")) '("libtiff" "libjpeg" "libpng" "giflib"
'("libtiff" "libjpeg" "libpng" "giflib" "libxml2" "zlib" "libspiro" "freetype"
"libxml2" "zlib" "libspiro" "freetype" "pango" "cairo" "fontconfig")))
"pango" "cairo" "fontconfig"))) ;; Checks for potrace program at runtime
;; Checks for potrace program at runtime `("PATH" ":" prefix (,potrace)))))))))
`("PATH" ":" prefix (,potrace)))))
%standard-phases))))
(synopsis "Outline font editor") (synopsis "Outline font editor")
(description (description
"FontForge allows you to create and modify postscript, truetype and "FontForge allows you to create and modify postscript, truetype and