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