From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 4/4] gnu: Add fontforge. Date: Tue, 07 Oct 2014 11:39:06 -0500 Message-ID: <87bnpnx2ad.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbXlO-0004ww-IB for guix-devel@gnu.org; Tue, 07 Oct 2014 12:37:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbXlK-0003UW-8J for guix-devel@gnu.org; Tue, 07 Oct 2014 12:37:26 -0400 Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]:52561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbXlK-0003UQ-0C for guix-devel@gnu.org; Tue, 07 Oct 2014 12:37:22 -0400 Received: by mail-ie0-f178.google.com with SMTP id rl12so5527559iec.23 for ; Tue, 07 Oct 2014 09:37:21 -0700 (PDT) Received: from cooper.gmail.com (chippewa-nat.cray.com. [136.162.34.1]) by mx.google.com with ESMTPSA id j2sm12394567igm.21.2014.10.07.09.37.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 07 Oct 2014 09:37:20 -0700 (PDT) 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0004-gnu-Add-fontforge.patch >From 32cbf42d1e8615cab130d0f58f3c16cd18d6ba01 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 7 Oct 2014 11:20:20 -0500 Subject: [PATCH 4/4] gnu: Add fontforge. * gnu/packages/fontutils.scm (fontforge): New variable. --- gnu/packages/fontutils.scm | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index d3c10aa..512dbb6 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -24,7 +24,12 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages autotools) + #:use-module (gnu packages gettext) #:use-module (gnu packages python) + #:use-module (gnu packages image) + #:use-module (gnu packages glib) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gtk) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -278,3 +283,79 @@ useful for programs that need Unicode \"Names\", \"Annotations\", and block definitions.") (license license:gpl2) (home-page "https://github.com/fontforge/libuninameslist"))) + +(define-public fontforge + (package + (name "fontforge") + (version "20120731-b") ;aka 1.0 + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/fontforge/fontforge_full-" + version ".tar.bz2")) + (sha256 (base32 + "1dhg0i2pf76j40cb9g1wzpag21fgarpjaad0hdbk27i1zz588q8v")))) + (build-system gnu-build-system) + ;; TODO: Add python for scripting support. + (inputs `(("gettext" ,gnu-gettext) + ("libtiff" ,libtiff) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("giflib" ,giflib) ;needs giflib 4.* + ("libxml2" ,libxml2) + ("libX11" ,libx11) + ("libXi" ,libxi) + ("libICE" ,libice) + ("libSM" ,libsm) + ("freetype" ,freetype) + ("potrace" ,potrace) + ("libspiro" ,libspiro) + ("zlib" ,zlib) + ("cairo" ,cairo) + ("fontconfig" ,fontconfig) ;dlopen'd + ("libuninameslist" ,libuninameslist) + ("pango" ,pango) + ("glib" ,glib))) ;needed for pango detection + (arguments + '(#:configure-flags `("--enable-double") + #: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)))) + (synopsis "Outline font editor") + (description + "FontForge allows you to create and modify postscript, truetype and +opentype fonts. You can save fonts in many different outline formats, and +generate bitmaps.") + (license license:bsd-3) + (home-page "http://fontforge.org/"))) -- 1.7.9.5 --=-=-= -- Eric Bavier --=-=-=--