gnu: Move numerous "inputs" which should be "native-inputs".
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages fontutils)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages compression)
22 #:use-module (gnu packages ghostscript)
23 #:use-module (gnu packages pkg-config)
24 #:use-module (gnu packages xml)
25 #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu))
29
30 (define-public freetype
31 (package
32 (name "freetype")
33 (version "2.4.11")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "mirror://savannah/freetype/freetype-"
37 version ".tar.gz"))
38 (sha256 (base32
39 "0gpcz6swir64kp0dk3rwgqqkmf48b90dqgczdmznjjryhrahx9r9"))))
40 (build-system gnu-build-system)
41 (arguments
42 `(#:phases
43 (alist-replace
44 'install
45 (lambda* (#:key outputs #:allow-other-keys #:rest args)
46 (let ((install (assoc-ref %standard-phases 'install))
47 (include (string-append (assoc-ref outputs "out") "/include")))
48 (apply install args)
49 ;; Unravel one directory, since ft2build.h includes directly from
50 ;; freetype/, not freetype2/freetype; this is announced in the file
51 ;; to be changed in a future release.
52 (symlink (string-append include "/freetype2/freetype")
53 (string-append include "/freetype"))))
54 %standard-phases)))
55 (synopsis "Freetype, a library to render fonts")
56 (description
57 "Freetype is a library that can be used by applications to access the
58 contents of font files. It provides a uniform interface to access font files.
59 It supports both bitmap and scalable formats, including TrueType, OpenType,
60 Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
61 anti-aliased glyph bitmap generation with 256 gray levels.")
62 (license license:freetype) ; some files have other licenses
63 (home-page "http://www.freetype.org/")))
64
65 (define-public fontconfig
66 (package
67 (name "fontconfig")
68 (version "2.10.93")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append
72 "http://www.freedesktop.org/software/fontconfig/release/fontconfig-"
73 version ".tar.bz2"))
74 (sha256 (base32
75 "172j5vsgx2xplsk5mrxrspbn5lrswq6gnxkxjgcrx0j8i0kiz47a"))))
76 (build-system gnu-build-system)
77 (inputs `(("expat" ,expat)
78 ("freetype" ,freetype)
79 ("gs-fonts" ,gs-fonts)))
80 (native-inputs
81 `(("pkg-config" ,pkg-config)))
82 (arguments
83 `(#:configure-flags
84 ;; point to user profile instead of /usr/share/fonts in /etc/fonts.conf
85 (list "--with-default-fonts=~/.guix-profile/share/fonts"
86 ;; register gs-fonts
87 (string-append "--with-add-fonts="
88 (assoc-ref %build-inputs "gs-fonts")
89 "/share/fonts"))))
90 (synopsis "Fontconfig, a library for configuring and customising font access.")
91 (description
92 "Fontconfig can discover new fonts when installed automatically;
93 perform font name substitution, so that appropriate alternative fonts can
94 be selected if fonts are missing;
95 identify the set of fonts required to completely cover a set of languages;
96 have GUI configuration tools built as it uses an XML-based configuration file;
97 efficiently and quickly find needed fonts among the set of installed fonts;
98 be used in concert with the X Render Extension and FreeType to implement
99 high quality, anti-aliased and subpixel rendered text on a display.")
100 ; The exact license is more X11-style than BSD-style.
101 (license (license:bsd-style "file://COPYING"
102 "See COPYING in the distribution."))
103 (home-page "http://www.freedesktop.org/wiki/Software/fontconfig")))
104
105 (define-public t1lib
106 (package
107 (name "t1lib")
108 (version "5.1.2")
109 (source (origin
110 (method url-fetch)
111 (uri "ftp://sunsite.unc.edu/pub/Linux/libs/graphics/t1lib-5.1.2.tar.gz")
112 (sha256 (base32
113 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))))
114 (build-system gnu-build-system)
115 (arguments
116 ;; Making the documentation requires latex, but t1lib is also an input
117 ;; for building texlive.
118 `(#:tests? #f ; no test target
119 #:make-flags
120 '("without_doc")))
121 (synopsis "T1lib, a library for generating bitmaps from type 1 fonts.")
122 (description
123 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
124 It is based on the code of the X11 rasteriser of the X11 project.
125
126 The bitmaps created by t1lib are returned in a data structure with type
127 GLYPH. This special GLYPH-type is also used in the X11 window system to
128 describe character bitmaps. It contains the bitmap data as well as some
129 metric information. But t1lib is in itself entirely independent of the
130 X11-system or any other graphical user interface. ")
131 (license license:gpl2)
132 (home-page "http://www.t1lib.org/")))
133
134 (define-public teckit
135 (package
136 (name "teckit")
137 (version "2.5.1")
138 (source (origin
139 (method url-fetch)
140 (uri (string-append
141 "http://scripts.sil.org/svn-view/teckit/TAGS/TECkit_"
142 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
143 ".tar.gz"))
144 (sha256 (base32
145 "0fjiwvic8mdxpkyccfp7zh26y9xnvkp0skqbyfkrjiacd191k82r"))
146 (patches (list (search-patch "teckit-cstdio.patch")))))
147 (build-system gnu-build-system)
148 (inputs `(("zlib" ,zlib)))
149 (synopsis "TECkit, a toolkit for encoding conversions")
150 (description
151 "TECkit is a low-level toolkit intended to be used by other applications
152 that need to perform encoding conversions (e.g., when importing legacy data
153 into a Unicode-based application). The primary component of the TECkit
154 package is therefore a library that performs conversions; this is the
155 \"TECkit engine\". The engine relies on mapping tables in a specific binary
156 format (for which documentation is available); there is a compiler that
157 creates such tables from a human-readable mapping description (a simple
158 text file).
159
160 To facilitate the development and testing of mapping tables for TECkit,
161 several applications are also included in the current package; these
162 include simple tools for applying conversions to plain-text and Standard
163 Format files, as well as both command-line and simple GUI versions of the
164 TECkit compiler. However, it is not intended that these tools will be the
165 primary means by which end users perform conversions, and they have not
166 been designed, tested, and debugged to the extent that general-purpose
167 applications should be.")
168 (license license:lgpl2.1+)
169 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))