3 %bcond_without bytecode # without TT bytecode interpreter (Apple patents in USA)
4 %bcond_without lcd # without LCD subpixel color filtering (Microsoft patents in USA)
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}
13 Group: Development/Libraries
14 Source0: http://downloads.sourceforge.net/freetype/%{realname}-%{version}.tar.bz2
15 # Source0-md5: e974a82e5939be8e05ee65f07275d7c5
16 URL: http://www.freetype.org/
17 BuildRequires: crossmingw32-gcc
18 BuildRequires: crossmingw32-zlib >= 1.2.3-2
20 Requires: crossmingw32-zlib >= 1.2.3-2
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define specflags_ia32 -fomit-frame-pointer
24 # see <freetype/internal/ftserv.h>, the real horror
25 %define specflags -fno-strict-aliasing
27 %define no_install_post_strip 1
29 %define target i386-mingw32
30 %define target_platform i386-pc-mingw32
32 %define _sysprefix /usr
33 %define _prefix %{_sysprefix}/%{target}
34 %define _libdir %{_prefix}/lib
35 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
36 %define _dlldir /usr/share/wine/windows/system
37 %define __cc %{target}-gcc
38 %define __cxx %{target}-g++
41 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
44 # -z options are invalid for mingw linker
45 %define filterout_ld -Wl,-z,.*
48 The FreeType engine is a free and portable TrueType font rendering
49 engine. It has been developed to provide TrueType support to a great
50 variety of platforms and environments.
52 Note that FreeType is a *library*. It is not a font server for your
53 favorite platform, even though it was designed to be used in many of
54 them. Note also that it is *not* a complete text-rendering library.
55 Its purpose is simply to open and manage font files, as well as load,
56 hint and render individual glyphs efficiently. You can also see it as
57 a "TrueType driver" for a higher-level library, though rendering text
58 with it is extremely easy, as demo-ed by the test programs.
60 This package contains the cross version for Win32.
62 %description -l pl.UTF-8
63 FreeType jest biblioteką służącą do rasteryzacji fontów
64 TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż
65 została ona zaprojektowana do używania także w takich serwerach.
66 Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej
67 celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz
68 wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych
69 glifów. Może być także uważana za "sterownik TrueType" dla
70 bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType
71 do rasteryzacji jest bardzo proste, co można zobaczyć w programach
74 Ten pakiet zawiera wersję skrośną dla Win32.
77 Summary: Static freetype library (cross mingw32 version)
78 Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna mingw32)
79 Group: Development/Libraries
80 Requires: %{name} = %{version}-%{release}
83 Static freetype library (cross mingw32 version).
85 %description static -l pl.UTF-8
86 Statyczna biblioteka freetype (wersja skrośna mingw32).
89 Summary: DLL freetype library for Windows
90 Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows
91 Group: Applications/Emulators
92 Requires: crossmingw32-zlib-dll
96 DLL freetype library for Windows.
98 %description dll -l pl.UTF-8
99 Biblioteka DLL freetype dla Windows.
102 %setup -q -n %{realname}-%{version}
105 CFLAGS="%{rpmcflags} \
106 %{?with_bytecode:-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER} \
107 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING}" \
110 --build=i686-pc-linux-gnu \
117 rm -rf $RPM_BUILD_ROOT
120 DESTDIR=$RPM_BUILD_ROOT
122 install -d $RPM_BUILD_ROOT%{_dlldir}
123 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
126 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
127 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
130 rm -rf $RPM_BUILD_ROOT%{_datadir}/aclocal
133 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,PATENTS,TODO,formats.txt,raster.txt}
138 %{_libdir}/libfreetype.dll.a
139 %{_libdir}/libfreetype.la
140 %{_includedir}/freetype2
141 %{_includedir}/ft2build.h
142 %{_pkgconfigdir}/freetype2.pc
145 %defattr(644,root,root,755)
146 %{_libdir}/libfreetype.a
149 %defattr(644,root,root,755)
150 %{_dlldir}/libfreetype-*.dll