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