* [PATCH 4/4] gnu: Add fontforge.
@ 2014-10-07 16:39 Eric Bavier
2014-10-07 19:14 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2014-10-07 16:39 UTC (permalink / raw)
To: guix-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0004-gnu-Add-fontforge.patch --]
[-- Type: text/x-diff, Size: 4881 bytes --]
From 32cbf42d1e8615cab130d0f58f3c16cd18d6ba01 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
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
[-- Attachment #2: Type: text/plain, Size: 17 bytes --]
--
Eric Bavier
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/4] gnu: Add fontforge.
2014-10-07 16:39 [PATCH 4/4] gnu: Add fontforge Eric Bavier
@ 2014-10-07 19:14 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-10-07 19:14 UTC (permalink / raw)
To: Eric Bavier; +Cc: guix-devel
Eric Bavier <ericbavier@gmail.com> skribis:
> From 32cbf42d1e8615cab130d0f58f3c16cd18d6ba01 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Tue, 7 Oct 2014 11:20:20 -0500
> Subject: [PATCH 4/4] gnu: Add fontforge.
>
> * gnu/packages/fontutils.scm (fontforge): New variable.
OK!
> +(define-public fontforge
> + (package
> + (name "fontforge")
> + (version "20120731-b") ;aka 1.0
“0.99.20120731-b” would be a better choice since that would preserve
lexicographic order when 1.0 is released.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-07 19:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 16:39 [PATCH 4/4] gnu: Add fontforge Eric Bavier
2014-10-07 19:14 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.