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.bz2
15 # Source0-md5: d6b60f06bfc046e43ab2a6cbfd171d65
16 URL: http://www.freetype.org/
17 BuildRequires: crossmingw32-bzip2
18 BuildRequires: crossmingw32-gcc
19 %{?with_harfbuzz:BuildRequires: crossmingw32-harfbuzz >= 0.9.19}
20 BuildRequires: crossmingw32-libpng
21 BuildRequires: crossmingw32-zlib >= 1.2.3-2
22 BuildRequires: pkgconfig
24 Requires: crossmingw32-bzip2
25 %{?with_harfbuzz:Requires: crossmingw32-harfbuzz >= 0.9.19}
26 Requires: crossmingw32-libpng
27 Requires: crossmingw32-zlib >= 1.2.3-2
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define specflags_ia32 -fomit-frame-pointer
31 # see <freetype/internal/ftserv.h>, the real horror
32 %define specflags -fno-strict-aliasing
34 %define no_install_post_strip 1
36 %define target i386-mingw32
37 %define target_platform i386-pc-mingw32
39 %define _sysprefix /usr
40 %define _prefix %{_sysprefix}/%{target}
41 %define _libdir %{_prefix}/lib
42 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
43 %define _dlldir /usr/share/wine/windows/system
44 %define __cc %{target}-gcc
45 %define __cxx %{target}-g++
46 %define __pkgconfig_provides %{nil}
47 %define __pkgconfig_requires %{nil}
50 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
53 # -z options are invalid for mingw linker, most of -f options are Linux-specific
54 %define filterout_ld -Wl,-z,.*
55 %define filterout_c -f[-a-z0-9=]*
58 The FreeType engine is a free and portable TrueType font rendering
59 engine. It has been developed to provide TrueType support to a great
60 variety of platforms and environments.
62 Note that FreeType is a *library*. It is not a font server for your
63 favorite platform, even though it was designed to be used in many of
64 them. Note also that it is *not* a complete text-rendering library.
65 Its purpose is simply to open and manage font files, as well as load,
66 hint and render individual glyphs efficiently. You can also see it as
67 a "TrueType driver" for a higher-level library, though rendering text
68 with it is extremely easy, as demo-ed by the test programs.
70 This package contains the cross version for Win32.
72 %description -l pl.UTF-8
73 FreeType jest biblioteką służącą do rasteryzacji fontów
74 TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż
75 została ona zaprojektowana do używania także w takich serwerach.
76 Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej
77 celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz
78 wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych
79 glifów. Może być także uważana za "sterownik TrueType" dla
80 bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType
81 do rasteryzacji jest bardzo proste, co można zobaczyć w programach
84 Ten pakiet zawiera wersję skrośną dla Win32.
87 Summary: Static freetype library (cross MinGW32 version)
88 Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna MinGW32)
89 Group: Development/Libraries
90 Requires: %{name} = %{version}-%{release}
93 Static freetype library (cross MinGW32 version).
95 %description static -l pl.UTF-8
96 Statyczna biblioteka freetype (wersja skrośna MinGW32).
99 Summary: DLL freetype library for Windows
100 Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows
101 Group: Applications/Emulators
102 Requires: crossmingw32-bzip2-dll
103 %{?with_harfbuzz:Requires: crossmingw32-harfbuzz-dll >= 0.9.19}
104 Requires: crossmingw32-libpng-dll
105 Requires: crossmingw32-zlib-dll
109 DLL freetype library for Windows.
111 %description dll -l pl.UTF-8
112 Biblioteka DLL freetype dla Windows.
115 %setup -q -n %{realname}-%{version}
118 export PKG_CONFIG_LIBDIR=%{_pkgconfigdir}
119 CFLAGS="%{rpmcflags} \
120 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
121 -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
124 LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
125 LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
127 --build=i686-pc-linux-gnu \
130 %{!?with_harfbuzz:--without-harfbuzz}
135 rm -rf $RPM_BUILD_ROOT
138 DESTDIR=$RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT%{_dlldir}
141 %{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
144 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
145 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
148 %{__rm} $RPM_BUILD_ROOT%{_bindir}/freetype-config \
149 $RPM_BUILD_ROOT%{_mandir}/man1/freetype-config.1
151 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal
154 rm -rf $RPM_BUILD_ROOT
157 %defattr(644,root,root,755)
158 %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,TODO,formats.txt,raster.txt}
159 %{_libdir}/libfreetype.dll.a
160 %{_libdir}/libfreetype.la
161 %{_includedir}/freetype2
162 %{_pkgconfigdir}/freetype2.pc
165 %defattr(644,root,root,755)
166 %{_libdir}/libfreetype.a
169 %defattr(644,root,root,755)
170 %{_dlldir}/libfreetype-*.dll