gnu: Move numerous "inputs" which should be "native-inputs".
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
CommitLineData
b387a1c5
AE
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
a86177d6 19(define-module (gnu packages fontutils)
b387a1c5 20 #:use-module (gnu packages)
e5c0701f 21 #:use-module (gnu packages compression)
b972db72 22 #:use-module (gnu packages ghostscript)
6e4da6ea
AE
23 #:use-module (gnu packages pkg-config)
24 #:use-module (gnu packages xml)
79c398a2 25 #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
b387a1c5
AE
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)
36ee486f
LC
36 (uri (string-append "mirror://savannah/freetype/freetype-"
37 version ".tar.gz"))
b387a1c5
AE
38 (sha256 (base32
39 "0gpcz6swir64kp0dk3rwgqqkmf48b90dqgczdmznjjryhrahx9r9"))))
40 (build-system gnu-build-system)
0a92b5b3
AE
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)))
b387a1c5
AE
55 (synopsis "Freetype, a library to render fonts")
56 (description
57 "Freetype is a library that can be used by applications to access the
58contents of font files. It provides a uniform interface to access font files.
59It supports both bitmap and scalable formats, including TrueType, OpenType,
60Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
61anti-aliased glyph bitmap generation with 256 gray levels.")
79c398a2 62 (license license:freetype) ; some files have other licenses
b387a1c5 63 (home-page "http://www.freetype.org/")))
6e4da6ea
AE
64
65(define-public fontconfig
66 (package
67 (name "fontconfig")
9c2ecede 68 (version "2.10.93")
6e4da6ea
AE
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
9c2ecede 75 "172j5vsgx2xplsk5mrxrspbn5lrswq6gnxkxjgcrx0j8i0kiz47a"))))
6e4da6ea
AE
76 (build-system gnu-build-system)
77 (inputs `(("expat" ,expat)
78 ("freetype" ,freetype)
c4c4cc05
JD
79 ("gs-fonts" ,gs-fonts)))
80 (native-inputs
81 `(("pkg-config" ,pkg-config)))
0ceea4f3
AE
82 (arguments
83 `(#:configure-flags
b972db72
AE
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"))))
313b9012 90 (synopsis "Fontconfig, a library for configuring and customising font access.")
6e4da6ea
AE
91 (description
92 "Fontconfig can discover new fonts when installed automatically;
93perform font name substitution, so that appropriate alternative fonts can
94be selected if fonts are missing;
95identify the set of fonts required to completely cover a set of languages;
96have GUI configuration tools built as it uses an XML-based configuration file;
97efficiently and quickly find needed fonts among the set of installed fonts;
98be used in concert with the X Render Extension and FreeType to implement
99high 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")))
313b9012
AE
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.
124It is based on the code of the X11 rasteriser of the X11 project.
125
126The bitmaps created by t1lib are returned in a data structure with type
127GLYPH. This special GLYPH-type is also used in the X11 window system to
128describe character bitmaps. It contains the bitmap data as well as some
129metric information. But t1lib is in itself entirely independent of the
130X11-system or any other graphical user interface. ")
131 (license license:gpl2)
132 (home-page "http://www.t1lib.org/")))
e5c0701f
AE
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
01eafd38
LC
145 "0fjiwvic8mdxpkyccfp7zh26y9xnvkp0skqbyfkrjiacd191k82r"))
146 (patches (list (search-patch "teckit-cstdio.patch")))))
e5c0701f 147 (build-system gnu-build-system)
01eafd38 148 (inputs `(("zlib" ,zlib)))
e5c0701f
AE
149 (synopsis "TECkit, a toolkit for encoding conversions")
150 (description
151 "TECkit is a low-level toolkit intended to be used by other applications
152that need to perform encoding conversions (e.g., when importing legacy data
153into a Unicode-based application). The primary component of the TECkit
154package is therefore a library that performs conversions; this is the
155\"TECkit engine\". The engine relies on mapping tables in a specific binary
156format (for which documentation is available); there is a compiler that
157creates such tables from a human-readable mapping description (a simple
158text file).
159
160To facilitate the development and testing of mapping tables for TECkit,
161several applications are also included in the current package; these
162include simple tools for applying conversions to plain-text and Standard
163Format files, as well as both command-line and simple GUI versions of the
164TECkit compiler. However, it is not intended that these tools will be the
165primary means by which end users perform conversions, and they have not
166been designed, tested, and debugged to the extent that general-purpose
167applications should be.")
168 (license license:lgpl2.1+)
169 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))