From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: [PATCH 8/9] gnu: fontforge: Use modify-phases. Date: Tue, 5 Apr 2016 23:33:00 -0500 Message-ID: <1459917181-19626-8-git-send-email-ericbavier@openmailbox.org> References: <1459917181-19626-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anfAO-0007Oa-2z for guix-devel@gnu.org; Wed, 06 Apr 2016 00:34:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anfAJ-0000pA-Ep for guix-devel@gnu.org; Wed, 06 Apr 2016 00:34:07 -0400 Received: from smtp25.openmailbox.org ([62.4.1.59]:48437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anfAJ-0000oL-6P for guix-devel@gnu.org; Wed, 06 Apr 2016 00:34:03 -0400 In-Reply-To: <1459917181-19626-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier From: Eric Bavier * gnu/packages/fontutils.scm (fontforge)[arguments]: Use modify-phases. --- gnu/packages/fontutils.scm | 64 ++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 5ca9835..5b3247b 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -546,39 +546,37 @@ definitions.") (arguments '(#:tests? #f #:phases - (alist-cons-before - 'configure 'patch-configure - (lambda* (#:key inputs #:allow-other-keys) - (let ((libxml2 (assoc-ref inputs "libxml2")) - (cairo (assoc-ref inputs "cairo")) - (pango (assoc-ref inputs "pango"))) - (substitute* "configure" - ;; configure looks for a directory to be present to determine - ;; whether libxml2 is available, rather than checking for the - ;; library or headers. Point it to the correct directory. - (("/usr/include/libxml2") - (string-append libxml2 "/include/libxml2")) - ;; Similary, the search directories for cairo and pango are - ;; hard-coded. - (("gww_prefix in.*") (string-append "gww_prefix in " - cairo " " pango "\n"))))) - (alist-cons-after - 'install 'set-library-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (potrace (string-append (assoc-ref inputs "potrace") "/bin"))) - (wrap-program (string-append out "/bin/fontforge") - ;; Fontforge dynamically opens libraries. - `("LD_LIBRARY_PATH" ":" prefix - ,(map (lambda (input) - (string-append (assoc-ref inputs input) - "/lib")) - '("libtiff" "libjpeg" "libpng" "giflib" - "libxml2" "zlib" "libspiro" "freetype" - "pango" "cairo" "fontconfig"))) - ;; Checks for potrace program at runtime - `("PATH" ":" prefix (,potrace))))) - %standard-phases)))) + (modify-phases %standard-phases + (add-before 'configure 'patch-configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((libxml2 (assoc-ref inputs "libxml2")) + (cairo (assoc-ref inputs "cairo")) + (pango (assoc-ref inputs "pango"))) + (substitute* "configure" + ;; configure looks for a directory to be present to determine + ;; whether libxml2 is available, rather than checking for the + ;; library or headers. Point it to the correct directory. + (("/usr/include/libxml2") + (string-append libxml2 "/include/libxml2")) + ;; Similary, the search directories for cairo and pango are + ;; hard-coded. + (("gww_prefix in.*") (string-append "gww_prefix in " + cairo " " pango "\n")))))) + (add-after 'install 'set-library-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (potrace (string-append (assoc-ref inputs "potrace") "/bin"))) + (wrap-program (string-append out "/bin/fontforge") + ;; Fontforge dynamically opens libraries. + `("LD_LIBRARY_PATH" ":" prefix + ,(map (lambda (input) + (string-append (assoc-ref inputs input) + "/lib")) + '("libtiff" "libjpeg" "libpng" "giflib" + "libxml2" "zlib" "libspiro" "freetype" + "pango" "cairo" "fontconfig"))) + ;; Checks for potrace program at runtime + `("PATH" ":" prefix (,potrace))))))))) (synopsis "Outline font editor") (description "FontForge allows you to create and modify postscript, truetype and -- 2.7.3