]> git.pld-linux.org Git - packages/freetype.git/blob - freetype.spec
- rel 3
[packages/freetype.git] / freetype.spec
1 #
2 # Conditional build:
3 %bcond_without  lcd             # without LCD subpixel color filtering (Microsoft patents in USA)
4 %bcond_without  x11             # don't build examples (X11-based)
5 %bcond_without  harfbuzz        # harfbuzz based autohinting
6 %bcond_without  apidocs         # disable api docs
7 %bcond_with     regen_refdoc    # regenerate reference documentation
8
9 %if %{without harfbuzz}
10 # demos require harfbuzz
11 %undefine       with_x11
12 %endif
13 Summary:        TrueType font rasterizer
14 Summary(es.UTF-8):      Biblioteca de render 3D de fuentes TrueType
15 Summary(ko.UTF-8):      자유롭게 어디든 쓸 수 있는 트루타입 글꼴을 다루는 엔진
16 Summary(pl.UTF-8):      Rasteryzer fontów TrueType
17 Summary(pt_BR.UTF-8):   Biblioteca de renderização de fontes TrueType
18 Summary(ru.UTF-8):      Растеризатор шрифтов TrueType
19 Summary(uk.UTF-8):      Растеризатор шрифтів TrueType
20 Name:           freetype
21 Version:        2.13.2
22 Release:        3
23 Epoch:          1
24 License:        GPL v2 or FTL
25 Group:          Libraries
26 Source0:        https://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.xz
27 # Source0-md5:  1f625f0a913c449551b1e3790a1817d7
28 Source1:        https://download.savannah.gnu.org/releases/freetype/%{name}-doc-%{version}.tar.xz
29 # Source1-md5:  e6466f08934ebf2d7f711b0464d7a6cf
30 Source2:        https://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz
31 # Source2-md5:  e11243fb7828d2f151409720735cc451
32 Patch0:         %{name}-2.2.1-enable-valid.patch
33 URL:            https://freetype.org/
34 BuildRequires:  automake
35 BuildRequires:  bzip2-devel
36 %{?with_harfbuzz:BuildRequires: harfbuzz-devel >= 2.0.0}
37 BuildRequires:  libbrotli-devel
38 BuildRequires:  libpng-devel
39 %{?with_x11:BuildRequires:      librsvg-devel >= 2.46.0}
40 BuildRequires:  pkgconfig >= 1:0.24
41 %if %{with regen_refdoc}
42 BuildRequires:  python3 >= 1:3.5
43 BuildRequires:  python3-docwriter
44 BuildRequires:  python3-modules
45 %endif
46 BuildRequires:  rpm >= 4.4.9-56
47 BuildRequires:  rpm-build >= 4.6
48 BuildRequires:  sed >= 4.0
49 BuildRequires:  tar >= 1:1.22
50 %if "%{pld_release}" == "ac"
51 %{?with_x11:BuildRequires:      XFree86-devel}
52 %else
53 %{?with_x11:BuildRequires:      xorg-lib-libX11-devel}
54 %endif
55 BuildRequires:  xz
56 BuildRequires:  zlib-devel
57 %{?with_harfbuzz:Requires:      harfbuzz >= 2.0.0}
58 Obsoletes:      freetype2
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %define         specflags_ia32  -fomit-frame-pointer
62 # see <freetype/internal/ftserv.h>, the real horror
63 %define         specflags       -fno-strict-aliasing
64
65 %description
66 The FreeType engine is a free and portable TrueType font rendering
67 engine. It has been developed to provide TrueType support to a great
68 variety of platforms and environments.
69
70 Note that FreeType is a *library*. It is not a font server for your
71 favorite platform, even though it was designed to be used in many of
72 them. Note also that it is *not* a complete text-rendering library.
73 Its purpose is simply to open and manage font files, as well as load,
74 hint and render individual glyphs efficiently. You can also see it as
75 a "TrueType driver" for a higher-level library, though rendering text
76 with it is extremely easy, as demo-ed by the test programs.
77
78 %description -l es.UTF-8
79 FreeType es una máquina libre y portátil para en render de fuentes
80 TrueType. Fue desarrollada para ofrecer soporte TrueType a una gran
81 variedad de plataformas y ambientes. Observa que FreeType es una
82 biblioteca y no una aplicación, a pesar de que algunos utilitarios se
83 incluyan en este paquete.
84
85 %description -l pl.UTF-8
86 FreeType jest biblioteką służącą do rasteryzacji fontów TrueType. Jest
87 to jedynie biblioteka, a nie serwer fontów, chociaż została ona
88 zaprojektowana do używania także w takich serwerach. Nie jest to też
89 kompletna biblioteka do rasteryzacji tekstu. Jej celem jest tylko
90 odczytywanie i zarządzanie plikami z fontami oraz wczytywanie i
91 wykonywanie hintingu i rasteryzacji poszczególnych glifów. Może być
92 także uważana za "sterownik TrueType" dla bibliotek wyższego poziomu,
93 jednak użycie samej biblioteki FreeType do rasteryzacji jest bardzo
94 proste, co można zobaczyć w programach demonstracyjnych.
95
96 %description -l pt_BR.UTF-8
97 FreeType é uma máquina livre e portável para renderização de fontes
98 TrueType. Ela foi desenvolvida para fornecer suporte TrueType a uma
99 grande variedade de plataformas e ambientes. Note que FreeType é uma
100 biblioteca e não uma aplicação, apesar que alguns utilitários são
101 incluídos neste pacote.
102
103 %description -l ru.UTF-8
104 Библиотека FreeType - это свободная переносимая библиотека для
105 рендеринга (растеризации) шрифтов TrueType, доступная в исходных
106 текстах на ANSI C и Pascal. Она была разработана для поддержки TT на
107 разнообразных платформах.
108
109 %description -l uk.UTF-8
110 Бібліотека FreeType - це вільна переносима бібліотека для рендерингу
111 (растеризації) шрифтів TrueType, що розповсюджується у вихідних
112 текстах на C та Pascal. Вона була розроблена для підтримки TT на
113 різних платформах.
114
115 %package devel
116 Summary:        Header files for FreeType development
117 Summary(es.UTF-8):      Archivos de inclusión para desarrollo con FreeType
118 Summary(ko.UTF-8):      FreeType을 쓸 때 필요한 정적 라이브러리와 머리말 파일
119 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FreeType
120 Summary(pt_BR.UTF-8):   Arquivos de inclusão para desenvolvimento com FreeType
121 Summary(ru.UTF-8):      Библиотеки разработчика для freetype
122 Summary(uk.UTF-8):      Бібліотеки програміста для freetype
123 Group:          Development/Libraries
124 Requires:       %{name} = %{epoch}:%{version}-%{release}
125 Requires:       bzip2-devel
126 %{?with_harfbuzz:Requires:      harfbuzz-devel >= 2.0.0}
127 Requires:       libbrotli-devel
128 Requires:       libpng-devel
129 Requires:       zlib-devel
130 Obsoletes:      freetype2-devel
131
132 %description devel
133 This package includes the header files necessary to develop
134 applications that use FreeType.
135
136 %description devel -l es.UTF-8
137 Este paquete es necesario, si pretendes desarrollar/compilar
138 aplicaciones con la biblioteca FreeType. Si, simplemente, deseas
139 ejecutar aplicaciones existentes, no lo necesitas.
140
141 %description devel -l pl.UTF-8
142 Pakiet ten zawiera pliki nagłówkowe potrzebne przy tworzeniu programów
143 wykorzystujących bibliotekę FreeType.
144
145 %description devel -l pt_BR.UTF-8
146 Este pacote é necessário se você pretende desenvolver/compilar
147 aplicações com a biblioteca FreeType. Se você simplesmente deseja
148 rodar aplicações existentes, você não precisa deste pacote.
149
150 %description devel -l ru.UTF-8
151 Этот пакет содержит хедеры необходимые для разработки программ,
152 использующих FreeType.
153
154 %description devel -l uk.UTF-8
155 Цей пакет містить хедери необхідні для розробки програм, що
156 використовують FreeType.
157
158 %package apidocs
159 Summary:        FreeType API documetation
160 Summary(pl.UTF-8):      Dokumentacja API FreeType
161 Group:          Documentation
162 BuildArch:      noarch
163
164 %description apidocs
165 FreeType API documetation.
166
167 %description apidocs -l pl.UTF-8
168 Dokumentacja API FreeType.
169
170 %package static
171 Summary:        FreeType static libraries
172 Summary(es.UTF-8):      Static libraries for freetype development
173 Summary(pl.UTF-8):      Biblioteki statyczne FreeType
174 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com freetype
175 Summary(ru.UTF-8):      Статические библиотеки freetype
176 Summary(uk.UTF-8):      Статичні бібліотеки freetype
177 Group:          Development/Libraries
178 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
179 Obsoletes:      freetype2-static
180
181 %description static
182 Static FreeType libraries.
183
184 %description static -l es.UTF-8
185 Static libraries for freetype development.
186
187 %description static -l pl.UTF-8
188 Biblioteki statyczne FreeType.
189
190 %description static -l pt_BR.UTF-8
191 Bibliotecas estáticas para desenvolvimento com freetype.
192
193 %description static -l ru.UTF-8
194 Этот пакет содержит статические библиотеки, необходимые для написания
195 программ, использующих freetype.
196
197 %description static -l uk.UTF-8
198 Цей пакет містить статичні бібліотеки, необхідні для написання
199 програм, що використовують freetype.
200
201 %package demos
202 Summary:        FreeType demo programs
203 Summary(ko.UTF-8):      FreeType을 시험해볼 수 있는 프로그램 모음
204 Summary(pl.UTF-8):      Programy demonstracyjne FreeType
205 Group:          X11/Applications
206 Requires:       %{name} = %{epoch}:%{version}-%{release}
207 Requires:       librsvg >= 2.46.0
208
209 %description demos
210 Demonstration programs for FreeType library.
211
212 %description demos -l pl.UTF-8
213 Programy demonstracyjne do biblioteki FreeType.
214
215 %prep
216 %setup -q -a1 -a2
217 %patch0 -p1
218
219 # avoid propagating -L%{_libdir} through *.la
220 %{__sed} -i -e 's,libpng-config --ldflags,libpng-config --libs,' builds/unix/configure
221
222 %build
223 CC="%{__cc}" \
224 CFLAGS="%{rpmcflags} %{rpmcppflags} \
225 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
226 -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=2 \
227 %{?with_harfbuzz:-DFT_CONFIG_OPTION_USE_HARFBUZZ} \
228 " \
229 %{__make} setup unix \
230         CFG="--prefix=%{_prefix} --libdir=%{_libdir} --enable-freetype-config"
231
232 CC="%{__cc}" \
233 %{__make} \
234         X11_LIB=%{?_x_libraries}
235
236 %if %{with x11}
237 CC="%{__cc}" \
238 %{__make} -C ft2demos-* \
239         TOP_DIR=$(pwd) \
240         X11_LIB=%{?_x_libraries}
241 %endif
242
243 %if %{with regen_refdoc}
244 %{__make} refdoc
245 %endif
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT%{_bindir}
250
251 %{__make} install \
252         DESTDIR=$RPM_BUILD_ROOT
253
254 %if %{with x11}
255 install -p ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir}
256 %endif
257
258 %clean
259 rm -rf $RPM_BUILD_ROOT
260
261 %post   -p /sbin/ldconfig
262 %postun -p /sbin/ldconfig
263
264 %files
265 %defattr(644,root,root,755)
266 %doc LICENSE.TXT docs/{CHANGES,FTL.TXT,TODO,formats.txt,raster.txt}
267 %attr(755,root,root) %{_libdir}/libfreetype.so.*.*.*
268 %attr(755,root,root) %ghost %{_libdir}/libfreetype.so.6
269
270 %files devel
271 %defattr(644,root,root,755)
272 %doc docs/DEBUG
273 %attr(755,root,root) %{_bindir}/freetype-config
274 %attr(755,root,root) %{_libdir}/libfreetype.so
275 %{_libdir}/libfreetype.la
276 %{_includedir}/freetype2
277 %{_aclocaldir}/freetype2.m4
278 %{_pkgconfigdir}/freetype2.pc
279 %{_mandir}/man1/freetype-config.1*
280
281 %if %{with apidocs}
282 %files apidocs
283 %defattr(644,root,root,755)
284 %doc docs/reference
285 %endif
286
287 %files static
288 %defattr(644,root,root,755)
289 %{_libdir}/libfreetype.a
290
291 %if %{with x11}
292 %files demos
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_bindir}/ft*
295 %endif
This page took 0.062199 seconds and 4 git commands to generate.