]>
Commit | Line | Data |
---|---|---|
fc8a614f JB |
1 | # |
2 | # Conditional build: | |
6a99d049 | 3 | %bcond_without lcd # without LCD subpixel color filtering (Microsoft patents in USA) |
05bf4539 | 4 | %bcond_without x11 # don't build examples (X11-based) |
2ea2159b | 5 | %bcond_without harfbuzz # harfbuzz based autohinting |
dd2f1cbf | 6 | %bcond_without apidocs # disable api docs |
410d8e20 | 7 | %bcond_with regen_refdoc # regenerate reference documentation |
2338d8fc | 8 | |
545dd93d JB |
9 | %if %{without harfbuzz} |
10 | # demos require harfbuzz | |
11 | %undefine with_x11 | |
12 | %endif | |
64073610 | 13 | Summary: TrueType font rasterizer |
d8dc335a ER |
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 | |
3af2e27f | 20 | Name: freetype |
d9b73344 | 21 | Version: 2.13.0 |
66b30f61 | 22 | Release: 1 |
27fedf0b | 23 | Epoch: 1 |
86a13cde | 24 | License: GPL v2 or FTL |
b54d8045 | 25 | Group: Libraries |
2d27cfcd | 26 | Source0: https://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.xz |
d9b73344 | 27 | # Source0-md5: fe73327ebbf0b629f3ad24be656d59de |
2d27cfcd | 28 | Source1: https://download.savannah.gnu.org/releases/freetype/%{name}-doc-%{version}.tar.xz |
d9b73344 | 29 | # Source1-md5: 139f7e7690469da503d40ba4ce59a9fa |
2d27cfcd | 30 | Source2: https://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz |
d9b73344 | 31 | # Source2-md5: 9a2095309fe1082afba92d636804201c |
2f13208e | 32 | Patch0: %{name}-2.2.1-enable-valid.patch |
8eb15c23 | 33 | URL: https://freetype.org/ |
3f176edc | 34 | BuildRequires: automake |
b8ff0536 | 35 | BuildRequires: bzip2-devel |
2d27cfcd | 36 | %{?with_harfbuzz:BuildRequires: harfbuzz-devel >= 2.0.0} |
545dd93d | 37 | BuildRequires: libbrotli-devel |
a3d924dc | 38 | BuildRequires: libpng-devel |
091ad2b1 | 39 | %{?with_x11:BuildRequires: librsvg-devel >= 2.46.0} |
2089233b | 40 | BuildRequires: pkgconfig >= 1:0.24 |
410d8e20 | 41 | %if %{with regen_refdoc} |
545dd93d | 42 | BuildRequires: python3 >= 1:3.5 |
410d8e20 JP |
43 | BuildRequires: python3-docwriter |
44 | BuildRequires: python3-modules | |
45 | %endif | |
54574368 | 46 | BuildRequires: rpm >= 4.4.9-56 |
e7e84fa4 | 47 | BuildRequires: rpm-build >= 4.6 |
a3d924dc | 48 | BuildRequires: sed >= 4.0 |
99c80ee4 | 49 | BuildRequires: tar >= 1:1.22 |
54574368 ER |
50 | %if "%{pld_release}" == "ac" |
51 | %{?with_x11:BuildRequires: XFree86-devel} | |
52 | %else | |
b1a48478 | 53 | %{?with_x11:BuildRequires: xorg-lib-libX11-devel} |
54574368 | 54 | %endif |
99c80ee4 | 55 | BuildRequires: xz |
b1a48478 | 56 | BuildRequires: zlib-devel |
2d27cfcd | 57 | %{?with_harfbuzz:Requires: harfbuzz >= 2.0.0} |
7c5eedeb | 58 | Obsoletes: freetype2 |
c26a7ea2 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
04d7d504 | 60 | |
54574368 | 61 | %define specflags_ia32 -fomit-frame-pointer |
fc2659d4 JB |
62 | # see <freetype/internal/ftserv.h>, the real horror |
63 | %define specflags -fno-strict-aliasing | |
fae2a0a8 | 64 | |
04d7d504 | 65 | %description |
3c872824 | 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. | |
04d7d504 | 77 | |
27cd7709 JR |
78 | %description -l es.UTF-8 |
79 | FreeType es una máquina libre y portátil para en render de fuentes | |
56d58121 | 80 | TrueType. Fue desarrollada para ofrecer soporte TrueType a una gran |
81 | variedad de plataformas y ambientes. Observa que FreeType es una | |
27cd7709 | 82 | biblioteca y no una aplicación, a pesar de que algunos utilitarios se |
56d58121 | 83 | incluyan en este paquete. |
84 | ||
27cd7709 JR |
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ż | |
64073610 | 89 | kompletna biblioteka do rasteryzacji tekstu. Jej celem jest tylko |
27cd7709 JR |
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 | |
56d58121 | 98 | TrueType. Ela foi desenvolvida para fornecer suporte TrueType a uma |
27cd7709 JR |
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 | різних платформах. | |
56d58121 | 114 | |
52048dbc | 115 | %package devel |
dd2f1cbf | 116 | Summary: Header files for FreeType development |
93b67805 | 117 | Summary(es.UTF-8): Archivos de inclusión para desarrollo con FreeType |
d8dc335a | 118 | Summary(ko.UTF-8): FreeType을 쓸 때 필요한 정적 라이브러리와 머리말 파일 |
93b67805 JB |
119 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeType |
120 | Summary(pt_BR.UTF-8): Arquivos de inclusão para desenvolvimento com FreeType | |
d8dc335a ER |
121 | Summary(ru.UTF-8): Библиотеки разработчика для freetype |
122 | Summary(uk.UTF-8): Бібліотеки програміста для freetype | |
b54d8045 | 123 | Group: Development/Libraries |
27fedf0b | 124 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b8ff0536 | 125 | Requires: bzip2-devel |
2d27cfcd | 126 | %{?with_harfbuzz:Requires: harfbuzz-devel >= 2.0.0} |
545dd93d | 127 | Requires: libbrotli-devel |
a3d924dc | 128 | Requires: libpng-devel |
9fdb5588 | 129 | Requires: zlib-devel |
7c5eedeb | 130 | Obsoletes: freetype2-devel |
04d7d504 | 131 | |
132 | %description devel | |
93b67805 JB |
133 | This package includes the header files necessary to develop |
134 | applications that use FreeType. | |
56d58121 | 135 | |
27cd7709 | 136 | %description devel -l es.UTF-8 |
56d58121 | 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. | |
04d7d504 | 140 | |
27cd7709 | 141 | %description devel -l pl.UTF-8 |
93b67805 JB |
142 | Pakiet ten zawiera pliki nagłówkowe potrzebne przy tworzeniu programów |
143 | wykorzystujących bibliotekę FreeType. | |
04d7d504 | 144 | |
27cd7709 JR |
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. | |
56d58121 | 149 | |
27cd7709 | 150 | %description devel -l ru.UTF-8 |
93b67805 JB |
151 | Этот пакет содержит хедеры необходимые для разработки программ, |
152 | использующих FreeType. | |
56d58121 | 153 | |
27cd7709 | 154 | %description devel -l uk.UTF-8 |
93b67805 JB |
155 | Цей пакет містить хедери необхідні для розробки програм, що |
156 | використовують FreeType. | |
56d58121 | 157 | |
dd2f1cbf ER |
158 | %package apidocs |
159 | Summary: FreeType API documetation | |
93b67805 | 160 | Summary(pl.UTF-8): Dokumentacja API FreeType |
dd2f1cbf | 161 | Group: Documentation |
fdc271b1 | 162 | BuildArch: noarch |
dd2f1cbf ER |
163 | |
164 | %description apidocs | |
165 | FreeType API documetation. | |
166 | ||
93b67805 JB |
167 | %description apidocs -l pl.UTF-8 |
168 | Dokumentacja API FreeType. | |
169 | ||
52048dbc | 170 | %package static |
64073610 | 171 | Summary: FreeType static libraries |
d8dc335a ER |
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 | |
b54d8045 | 177 | Group: Development/Libraries |
27fedf0b | 178 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
7c5eedeb | 179 | Obsoletes: freetype2-static |
04d7d504 | 180 | |
181 | %description static | |
64073610 | 182 | Static FreeType libraries. |
04d7d504 | 183 | |
27cd7709 | 184 | %description static -l es.UTF-8 |
56d58121 | 185 | Static libraries for freetype development. |
186 | ||
27cd7709 | 187 | %description static -l pl.UTF-8 |
64073610 JB |
188 | Biblioteki statyczne FreeType. |
189 | ||
27cd7709 JR |
190 | %description static -l pt_BR.UTF-8 |
191 | Bibliotecas estáticas para desenvolvimento com freetype. | |
56d58121 | 192 | |
27cd7709 JR |
193 | %description static -l ru.UTF-8 |
194 | Этот пакет содержит статические библиотеки, необходимые для написания | |
195 | программ, использующих freetype. | |
56d58121 | 196 | |
27cd7709 JR |
197 | %description static -l uk.UTF-8 |
198 | Цей пакет містить статичні бібліотеки, необхідні для написання | |
199 | програм, що використовують freetype. | |
56d58121 | 200 | |
64073610 JB |
201 | %package demos |
202 | Summary: FreeType demo programs | |
d8dc335a ER |
203 | Summary(ko.UTF-8): FreeType을 시험해볼 수 있는 프로그램 모음 |
204 | Summary(pl.UTF-8): Programy demonstracyjne FreeType | |
64073610 | 205 | Group: X11/Applications |
27fedf0b | 206 | Requires: %{name} = %{epoch}:%{version}-%{release} |
091ad2b1 | 207 | Requires: librsvg >= 2.46.0 |
64073610 JB |
208 | |
209 | %description demos | |
210 | Demonstration programs for FreeType library. | |
211 | ||
27cd7709 | 212 | %description demos -l pl.UTF-8 |
64073610 | 213 | Programy demonstracyjne do biblioteki FreeType. |
04d7d504 | 214 | |
04d7d504 | 215 | %prep |
65ad0bc5 | 216 | %setup -q -a1 -a2 |
f057415d | 217 | %patch0 -p1 |
04d7d504 | 218 | |
a3d924dc JB |
219 | # avoid propagating -L%{_libdir} through *.la |
220 | %{__sed} -i -e 's,libpng-config --ldflags,libpng-config --libs,' builds/unix/configure | |
221 | ||
04d7d504 | 222 | %build |
347f1c11 | 223 | CC="%{__cc}" \ |
f057415d | 224 | CFLAGS="%{rpmcflags} %{rpmcppflags} \ |
060ef429 | 225 | %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \ |
405831ce | 226 | -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=2 \ |
2ea2159b | 227 | %{?with_harfbuzz:-DFT_CONFIG_OPTION_USE_HARFBUZZ} \ |
060ef429 | 228 | " \ |
528ee4b4 | 229 | %{__make} setup unix \ |
12b7debb | 230 | CFG="--prefix=%{_prefix} --libdir=%{_libdir} --enable-freetype-config" |
528ee4b4 | 231 | |
347f1c11 | 232 | CC="%{__cc}" \ |
fbdc8a0a | 233 | %{__make} \ |
54574368 | 234 | X11_LIB=%{?_x_libraries} |
326243a4 | 235 | |
176e1182 | 236 | %if %{with x11} |
347f1c11 | 237 | CC="%{__cc}" \ |
3f176edc | 238 | %{__make} -C ft2demos-* \ |
54574368 ER |
239 | TOP_DIR=$(pwd) \ |
240 | X11_LIB=%{?_x_libraries} | |
176e1182 | 241 | %endif |
64073610 | 242 | |
410d8e20 | 243 | %if %{with regen_refdoc} |
9f3a221b | 244 | %{__make} refdoc |
410d8e20 | 245 | %endif |
9f3a221b | 246 | |
04d7d504 | 247 | %install |
248 | rm -rf $RPM_BUILD_ROOT | |
b1a0284a | 249 | install -d $RPM_BUILD_ROOT%{_bindir} |
7d6beb55 | 250 | |
0debc642 | 251 | %{__make} install \ |
176e1182 | 252 | DESTDIR=$RPM_BUILD_ROOT |
b54d8045 | 253 | |
176e1182 | 254 | %if %{with x11} |
2338d8fc | 255 | install -p ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir} |
176e1182 | 256 | %endif |
64073610 | 257 | |
04d7d504 | 258 | %clean |
259 | rm -rf $RPM_BUILD_ROOT | |
260 | ||
fc8a614f JB |
261 | %post -p /sbin/ldconfig |
262 | %postun -p /sbin/ldconfig | |
263 | ||
0debc642 | 264 | %files |
3c872824 | 265 | %defattr(644,root,root,755) |
2d27cfcd | 266 | %doc LICENSE.TXT docs/{CHANGES,FTL.TXT,TODO,formats.txt,raster.txt} |
67a2584c JB |
267 | %attr(755,root,root) %{_libdir}/libfreetype.so.*.*.* |
268 | %attr(755,root,root) %ghost %{_libdir}/libfreetype.so.6 | |
9de8c38c | 269 | |
04d7d504 | 270 | %files devel |
d56a454c | 271 | %defattr(644,root,root,755) |
dd2f1cbf | 272 | %doc docs/DEBUG |
12b7debb | 273 | %attr(755,root,root) %{_bindir}/freetype-config |
67a2584c JB |
274 | %attr(755,root,root) %{_libdir}/libfreetype.so |
275 | %{_libdir}/libfreetype.la | |
b26a1506 | 276 | %{_includedir}/freetype2 |
67a2584c JB |
277 | %{_aclocaldir}/freetype2.m4 |
278 | %{_pkgconfigdir}/freetype2.pc | |
12b7debb | 279 | %{_mandir}/man1/freetype-config.1* |
04d7d504 | 280 | |
dd2f1cbf ER |
281 | %if %{with apidocs} |
282 | %files apidocs | |
283 | %defattr(644,root,root,755) | |
284 | %doc docs/reference | |
285 | %endif | |
286 | ||
04d7d504 | 287 | %files static |
e4239bd7 | 288 | %defattr(644,root,root,755) |
67a2584c | 289 | %{_libdir}/libfreetype.a |
64073610 | 290 | |
176e1182 | 291 | %if %{with x11} |
5ac2cd3b JB |
292 | %files demos |
293 | %defattr(644,root,root,755) | |
294 | %attr(755,root,root) %{_bindir}/ft* | |
176e1182 | 295 | %endif |