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