]>
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} |
e563c1b9 | 9 | Version: 2.5.2 |
bbd9e633 | 10 | Release: 1 |
b5e35991 | 11 | License: GPL v2 or FTL |
1e7243e1 | 12 | Group: Development/Libraries |
bbd9e633 | 13 | Source0: http://download.savannah.gnu.org/releases/freetype/%{realname}-%{version}.tar.bz2 |
e563c1b9 | 14 | # Source0-md5: 10e8f4d6a019b124088d18bc26123a25 |
3294533f | 15 | URL: http://www.freetype.org/ |
31924283 | 16 | BuildRequires: crossmingw32-bzip2 |
3c4380bc | 17 | BuildRequires: crossmingw32-gcc |
1f1d4f67 | 18 | BuildRequires: crossmingw32-libpng |
8bddf7fd | 19 | BuildRequires: crossmingw32-zlib >= 1.2.3-2 |
1f1d4f67 | 20 | BuildRequires: pkgconfig |
3294533f | 21 | BuildRequires: python |
31924283 | 22 | Requires: crossmingw32-bzip2 |
1f1d4f67 | 23 | Requires: crossmingw32-libpng |
8bddf7fd | 24 | Requires: crossmingw32-zlib >= 1.2.3-2 |
3294533f | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %define specflags_ia32 -fomit-frame-pointer | |
28 | # see <freetype/internal/ftserv.h>, the real horror | |
29 | %define specflags -fno-strict-aliasing | |
30 | ||
31 | %define no_install_post_strip 1 | |
32 | ||
33 | %define target i386-mingw32 | |
34 | %define target_platform i386-pc-mingw32 | |
3294533f | 35 | |
36 | %define _sysprefix /usr | |
37 | %define _prefix %{_sysprefix}/%{target} | |
b5aa177c JB |
38 | %define _libdir %{_prefix}/lib |
39 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
1e7243e1 | 40 | %define _dlldir /usr/share/wine/windows/system |
3294533f | 41 | %define __cc %{target}-gcc |
42 | %define __cxx %{target}-g++ | |
d230bce9 | 43 | %define __pkgconfig_provides %{nil} |
dce5a0f7 | 44 | %define __pkgconfig_requires %{nil} |
3294533f | 45 | |
46479e07 JB |
46 | %ifnarch %{ix86} |
47 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
48 | %define optflags -O2 | |
49 | %endif | |
4f990096 | 50 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
46479e07 | 51 | %define filterout_ld -Wl,-z,.* |
1f1d4f67 | 52 | %define filterout_c -f[-a-z0-9=]* |
46479e07 | 53 | |
3294533f | 54 | %description |
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. | |
58 | ||
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. | |
66 | ||
1e7243e1 | 67 | This package contains the cross version for Win32. |
3294533f | 68 | |
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 | |
79 | demonstracyjnych. | |
80 | ||
1e7243e1 JB |
81 | Ten pakiet zawiera wersję skrośną dla Win32. |
82 | ||
83 | %package static | |
7b9bae77 JB |
84 | Summary: Static freetype library (cross MinGW32 version) |
85 | Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna MinGW32) | |
1e7243e1 JB |
86 | Group: Development/Libraries |
87 | Requires: %{name} = %{version}-%{release} | |
88 | ||
89 | %description static | |
7b9bae77 | 90 | Static freetype library (cross MinGW32 version). |
1e7243e1 JB |
91 | |
92 | %description static -l pl.UTF-8 | |
7b9bae77 | 93 | Statyczna biblioteka freetype (wersja skrośna MinGW32). |
1e7243e1 JB |
94 | |
95 | %package dll | |
96 | Summary: DLL freetype library for Windows | |
97 | Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows | |
98 | Group: Applications/Emulators | |
1f1d4f67 JB |
99 | Requires: crossmingw32-bzip2-dll |
100 | Requires: crossmingw32-libpng-dll | |
1e7243e1 JB |
101 | Requires: crossmingw32-zlib-dll |
102 | Requires: wine | |
103 | ||
104 | %description dll | |
105 | DLL freetype library for Windows. | |
106 | ||
107 | %description dll -l pl.UTF-8 | |
108 | Biblioteka DLL freetype dla Windows. | |
3294533f | 109 | |
110 | %prep | |
8bddf7fd | 111 | %setup -q -n %{realname}-%{version} |
3294533f | 112 | |
113 | %build | |
1f1d4f67 | 114 | export PKG_CONFIG_LIBDIR=%{_pkgconfigdir} |
3294533f | 115 | CFLAGS="%{rpmcflags} \ |
1c57a66b JB |
116 | %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \ |
117 | -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \ | |
118 | " \ | |
3294533f | 119 | %configure \ |
1f1d4f67 JB |
120 | LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \ |
121 | LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \ | |
3294533f | 122 | --target=%{target} \ |
6181c873 | 123 | --build=i686-pc-linux-gnu \ |
124 | --host=%{target} \ | |
125 | --enable-shared | |
3294533f | 126 | |
127 | %{__make} | |
128 | ||
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
3294533f | 131 | |
132 | %{__make} install \ | |
133 | DESTDIR=$RPM_BUILD_ROOT | |
134 | ||
1e7243e1 | 135 | install -d $RPM_BUILD_ROOT%{_dlldir} |
1f1d4f67 | 136 | %{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
1e7243e1 JB |
137 | |
138 | %if 0%{!?debug:1} | |
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 | |
141 | %endif | |
142 | ||
1f1d4f67 | 143 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal |
1e7243e1 | 144 | |
3294533f | 145 | %clean |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %files | |
149 | %defattr(644,root,root,755) | |
0443e0ca | 150 | %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,TODO,formats.txt,raster.txt} |
1e7243e1 JB |
151 | %{_libdir}/libfreetype.dll.a |
152 | %{_libdir}/libfreetype.la | |
3294533f | 153 | %{_includedir}/freetype2 |
5bc110d4 | 154 | %{_pkgconfigdir}/freetype2.pc |
1e7243e1 JB |
155 | |
156 | %files static | |
157 | %defattr(644,root,root,755) | |
158 | %{_libdir}/libfreetype.a | |
159 | ||
160 | %files dll | |
161 | %defattr(644,root,root,755) | |
8bddf7fd | 162 | %{_dlldir}/libfreetype-*.dll |