3 %bcond_without lcd # without LCD subpixel color filtering (Microsoft patents in USA)
4 %bcond_without harfbuzz # harfbuzz based autohinting
6 %define realname freetype
7 Summary: TrueType font rasterizer - MinGW32 cross version
8 Summary(pl.UTF-8): Rasteryzer fontów TrueType - wersja skrośna dla MinGW32
9 Name: crossmingw32-%{realname}
12 License: GPL v2 or FTL
13 Group: Development/Libraries
14 Source0: http://download.savannah.gnu.org/releases/freetype/%{realname}-%{version}.tar.xz
15 # Source0-md5: 0e6c0e9b218be3ba3e26e1d23b1c80dd
16 URL: http://www.freetype.org/
17 BuildRequires: crossmingw32-bzip2
18 BuildRequires: crossmingw32-gcc
19 %{?with_harfbuzz:BuildRequires: crossmingw32-harfbuzz >= 1.8.0}
20 BuildRequires: crossmingw32-libpng
21 BuildRequires: crossmingw32-zlib >= 1.2.3-2
22 BuildRequires: pkgconfig >= 1:0.24
24 BuildRequires: tar >= 1:1.22
26 Requires: crossmingw32-bzip2
27 %{?with_harfbuzz:Requires: crossmingw32-harfbuzz >= 1.8.0}
28 Requires: crossmingw32-libpng
29 Requires: crossmingw32-zlib >= 1.2.3-2
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define specflags_ia32 -fomit-frame-pointer
33 # see <freetype/internal/ftserv.h>, the real horror
34 %define specflags -fno-strict-aliasing
36 %define no_install_post_strip 1
38 %define target i386-mingw32
39 %define target_platform i386-pc-mingw32
41 %define _sysprefix /usr
42 %define _prefix %{_sysprefix}/%{target}
43 %define _libdir %{_prefix}/lib
44 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
45 %define _dlldir /usr/share/wine/windows/system
46 %define __cc %{target}-gcc
47 %define __cxx %{target}-g++
48 %define __pkgconfig_provides %{nil}
49 %define __pkgconfig_requires %{nil}
52 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
55 # -z options are invalid for mingw linker, most of -f options are Linux-specific
56 %define filterout_ld -Wl,-z,.*
57 %define filterout_c -f[-a-z0-9=]*
60 The FreeType engine is a free and portable TrueType font rendering
61 engine. It has been developed to provide TrueType support to a great
62 variety of platforms and environments.
64 Note that FreeType is a *library*. It is not a font server for your
65 favorite platform, even though it was designed to be used in many of
66 them. Note also that it is *not* a complete text-rendering library.
67 Its purpose is simply to open and manage font files, as well as load,
68 hint and render individual glyphs efficiently. You can also see it as
69 a "TrueType driver" for a higher-level library, though rendering text
70 with it is extremely easy, as demo-ed by the test programs.
72 This package contains the cross version for Win32.
74 %description -l pl.UTF-8
75 FreeType jest biblioteką służącą do rasteryzacji fontów
76 TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż
77 została ona zaprojektowana do używania także w takich serwerach.
78 Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej
79 celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz
80 wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych
81 glifów. Może być także uważana za "sterownik TrueType" dla
82 bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType
83 do rasteryzacji jest bardzo proste, co można zobaczyć w programach
86 Ten pakiet zawiera wersję skrośną dla Win32.
89 Summary: Static freetype library (cross MinGW32 version)
90 Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna MinGW32)
91 Group: Development/Libraries
92 Requires: %{name} = %{version}-%{release}
95 Static freetype library (cross MinGW32 version).
97 %description static -l pl.UTF-8
98 Statyczna biblioteka freetype (wersja skrośna MinGW32).
101 Summary: DLL freetype library for Windows
102 Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows
103 Group: Applications/Emulators
104 Requires: crossmingw32-bzip2-dll
105 %{?with_harfbuzz:Requires: crossmingw32-harfbuzz-dll >= 1.8.0}
106 Requires: crossmingw32-libpng-dll
107 Requires: crossmingw32-zlib-dll
111 DLL freetype library for Windows.
113 %description dll -l pl.UTF-8
114 Biblioteka DLL freetype dla Windows.
117 %setup -q -n %{realname}-%{version}
120 export PKG_CONFIG_LIBDIR=%{_pkgconfigdir}
121 CFLAGS="%{rpmcflags} \
122 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
123 -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
126 LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
127 LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
129 --build=i686-pc-linux-gnu \
132 %{!?with_harfbuzz:--without-harfbuzz}
137 rm -rf $RPM_BUILD_ROOT
140 DESTDIR=$RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT%{_dlldir}
143 %{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
146 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
147 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
150 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal
153 rm -rf $RPM_BUILD_ROOT
156 %defattr(644,root,root,755)
157 %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,TODO,formats.txt,raster.txt}
158 %{_libdir}/libfreetype.dll.a
159 %{_libdir}/libfreetype.la
160 %{_includedir}/freetype2
161 %{_pkgconfigdir}/freetype2.pc
164 %defattr(644,root,root,755)
165 %{_libdir}/libfreetype.a
168 %defattr(644,root,root,755)
169 %{_dlldir}/libfreetype-*.dll