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