]>
Commit | Line | Data |
---|---|---|
3294533f | 1 | # |
2 | # Conditional build: | |
46479e07 | 3 | %bcond_without lcd # without LCD subpixel color filtering (Microsoft patents in USA) |
1e7243e1 | 4 | # |
8bddf7fd | 5 | %define realname freetype |
7b9bae77 JB |
6 | Summary: TrueType font rasterizer - MinGW32 cross version |
7 | Summary(pl.UTF-8): Rasteryzer fontów TrueType - wersja skrośna dla MinGW32 | |
8bddf7fd | 8 | Name: crossmingw32-%{realname} |
055d56e2 JB |
9 | Version: 2.4.12 |
10 | Release: 1 | |
b5e35991 | 11 | License: GPL v2 or FTL |
1e7243e1 | 12 | Group: Development/Libraries |
46479e07 | 13 | Source0: http://downloads.sourceforge.net/freetype/%{realname}-%{version}.tar.bz2 |
055d56e2 | 14 | # Source0-md5: 3463102764315eb86c0d3c2e1f3ffb7d |
3294533f | 15 | URL: http://www.freetype.org/ |
31924283 | 16 | BuildRequires: crossmingw32-bzip2 |
3c4380bc | 17 | BuildRequires: crossmingw32-gcc |
8bddf7fd | 18 | BuildRequires: crossmingw32-zlib >= 1.2.3-2 |
3294533f | 19 | BuildRequires: python |
31924283 | 20 | Requires: crossmingw32-bzip2 |
8bddf7fd | 21 | Requires: crossmingw32-zlib >= 1.2.3-2 |
3294533f | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %define specflags_ia32 -fomit-frame-pointer | |
25 | # see <freetype/internal/ftserv.h>, the real horror | |
26 | %define specflags -fno-strict-aliasing | |
27 | ||
28 | %define no_install_post_strip 1 | |
29 | ||
30 | %define target i386-mingw32 | |
31 | %define target_platform i386-pc-mingw32 | |
3294533f | 32 | |
33 | %define _sysprefix /usr | |
34 | %define _prefix %{_sysprefix}/%{target} | |
b5aa177c JB |
35 | %define _libdir %{_prefix}/lib |
36 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
1e7243e1 | 37 | %define _dlldir /usr/share/wine/windows/system |
3294533f | 38 | %define __cc %{target}-gcc |
39 | %define __cxx %{target}-g++ | |
d230bce9 | 40 | %define __pkgconfig_provides %{nil} |
dce5a0f7 | 41 | %define __pkgconfig_requires %{nil} |
3294533f | 42 | |
46479e07 JB |
43 | %ifnarch %{ix86} |
44 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
45 | %define optflags -O2 | |
46 | %endif | |
4f990096 | 47 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
46479e07 | 48 | %define filterout_ld -Wl,-z,.* |
4f990096 | 49 | %define filterout_c -f[-a-z0-9=]* |
46479e07 | 50 | |
3294533f | 51 | %description |
52 | The FreeType engine is a free and portable TrueType font rendering | |
53 | engine. It has been developed to provide TrueType support to a great | |
54 | variety of platforms and environments. | |
55 | ||
56 | Note that FreeType is a *library*. It is not a font server for your | |
57 | favorite platform, even though it was designed to be used in many of | |
58 | them. Note also that it is *not* a complete text-rendering library. | |
59 | Its purpose is simply to open and manage font files, as well as load, | |
60 | hint and render individual glyphs efficiently. You can also see it as | |
61 | a "TrueType driver" for a higher-level library, though rendering text | |
62 | with it is extremely easy, as demo-ed by the test programs. | |
63 | ||
1e7243e1 | 64 | This package contains the cross version for Win32. |
3294533f | 65 | |
66 | %description -l pl.UTF-8 | |
67 | FreeType jest biblioteką służącą do rasteryzacji fontów | |
68 | TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż | |
69 | została ona zaprojektowana do używania także w takich serwerach. | |
70 | Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej | |
71 | celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz | |
72 | wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych | |
73 | glifów. Może być także uważana za "sterownik TrueType" dla | |
74 | bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType | |
75 | do rasteryzacji jest bardzo proste, co można zobaczyć w programach | |
76 | demonstracyjnych. | |
77 | ||
1e7243e1 JB |
78 | Ten pakiet zawiera wersję skrośną dla Win32. |
79 | ||
80 | %package static | |
7b9bae77 JB |
81 | Summary: Static freetype library (cross MinGW32 version) |
82 | Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna MinGW32) | |
1e7243e1 JB |
83 | Group: Development/Libraries |
84 | Requires: %{name} = %{version}-%{release} | |
85 | ||
86 | %description static | |
7b9bae77 | 87 | Static freetype library (cross MinGW32 version). |
1e7243e1 JB |
88 | |
89 | %description static -l pl.UTF-8 | |
7b9bae77 | 90 | Statyczna biblioteka freetype (wersja skrośna MinGW32). |
1e7243e1 JB |
91 | |
92 | %package dll | |
93 | Summary: DLL freetype library for Windows | |
94 | Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows | |
95 | Group: Applications/Emulators | |
96 | Requires: crossmingw32-zlib-dll | |
97 | Requires: wine | |
98 | ||
99 | %description dll | |
100 | DLL freetype library for Windows. | |
101 | ||
102 | %description dll -l pl.UTF-8 | |
103 | Biblioteka DLL freetype dla Windows. | |
3294533f | 104 | |
105 | %prep | |
8bddf7fd | 106 | %setup -q -n %{realname}-%{version} |
3294533f | 107 | |
108 | %build | |
109 | CFLAGS="%{rpmcflags} \ | |
1c57a66b JB |
110 | %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \ |
111 | -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \ | |
112 | " \ | |
3294533f | 113 | %configure \ |
3294533f | 114 | --target=%{target} \ |
6181c873 | 115 | --build=i686-pc-linux-gnu \ |
116 | --host=%{target} \ | |
117 | --enable-shared | |
3294533f | 118 | |
119 | %{__make} | |
120 | ||
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
3294533f | 123 | |
124 | %{__make} install \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
1e7243e1 | 127 | install -d $RPM_BUILD_ROOT%{_dlldir} |
8bddf7fd | 128 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
1e7243e1 JB |
129 | |
130 | %if 0%{!?debug:1} | |
131 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
132 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
133 | %endif | |
134 | ||
135 | rm -rf $RPM_BUILD_ROOT%{_datadir}/aclocal | |
136 | ||
3294533f | 137 | %clean |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | ||
140 | %files | |
141 | %defattr(644,root,root,755) | |
0443e0ca | 142 | %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,TODO,formats.txt,raster.txt} |
1e7243e1 JB |
143 | %{_libdir}/libfreetype.dll.a |
144 | %{_libdir}/libfreetype.la | |
3294533f | 145 | %{_includedir}/freetype2 |
5bc110d4 JB |
146 | %{_includedir}/ft2build.h |
147 | %{_pkgconfigdir}/freetype2.pc | |
1e7243e1 JB |
148 | |
149 | %files static | |
150 | %defattr(644,root,root,755) | |
151 | %{_libdir}/libfreetype.a | |
152 | ||
153 | %files dll | |
154 | %defattr(644,root,root,755) | |
8bddf7fd | 155 | %{_dlldir}/libfreetype-*.dll |