]>
Commit | Line | Data |
---|---|---|
3294533f | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without bytecode # without TT bytecode interpreter | |
4 | # (patents pending in USA, Japan etc., but now it includes | |
5 | # also patent-free hinting workaround) | |
6 | %bcond_without lcd # disable filters reducing color fringes when | |
7 | # subpixel rendering for LCD (only used with a new 2.3.0 API; | |
8 | # patents pending) | |
1e7243e1 | 9 | # |
3294533f | 10 | %define _realname freetype |
11 | Summary: TrueType font rasterizer - Mingw32 cross version | |
3294533f | 12 | Summary(pl.UTF-8):Rasteryzer fontów TrueType - wersja skrośna dla Mingw32 |
3294533f | 13 | Name: crossmingw32-%{_realname} |
72f2b396 | 14 | Version: 2.3.5 |
3294533f | 15 | Release: 1 |
16 | License: GPL or FTL | |
1e7243e1 | 17 | Group: Development/Libraries |
3294533f | 18 | Source0: http://savannah.nongnu.org/download/freetype/%{_realname}-%{version}.tar.bz2 |
72f2b396 | 19 | # Source0-md5: 65234327c5ac46ee00ebda15995d4c1c |
3294533f | 20 | URL: http://www.freetype.org/ |
3c4380bc | 21 | BuildRequires: crossmingw32-gcc |
3294533f | 22 | BuildRequires: crossmingw32-zlib |
23 | BuildRequires: python | |
1e7243e1 | 24 | Requires: crossmingw32-zlib |
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 | |
35 | %define arch %{_prefix}/%{target} | |
3294533f | 36 | |
37 | %define _sysprefix /usr | |
38 | %define _prefix %{_sysprefix}/%{target} | |
3294533f | 39 | %define _pkgconfigdir %{_libdir}/pkgconfig |
1e7243e1 | 40 | %define _dlldir /usr/share/wine/windows/system |
3294533f | 41 | %define __cc %{target}-gcc |
42 | %define __cxx %{target}-g++ | |
43 | ||
44 | %description | |
45 | The FreeType engine is a free and portable TrueType font rendering | |
46 | engine. It has been developed to provide TrueType support to a great | |
47 | variety of platforms and environments. | |
48 | ||
49 | Note that FreeType is a *library*. It is not a font server for your | |
50 | favorite platform, even though it was designed to be used in many of | |
51 | them. Note also that it is *not* a complete text-rendering library. | |
52 | Its purpose is simply to open and manage font files, as well as load, | |
53 | hint and render individual glyphs efficiently. You can also see it as | |
54 | a "TrueType driver" for a higher-level library, though rendering text | |
55 | with it is extremely easy, as demo-ed by the test programs. | |
56 | ||
1e7243e1 | 57 | This package contains the cross version for Win32. |
3294533f | 58 | |
59 | %description -l pl.UTF-8 | |
60 | FreeType jest biblioteką służącą do rasteryzacji fontów | |
61 | TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż | |
62 | została ona zaprojektowana do używania także w takich serwerach. | |
63 | Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej | |
64 | celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz | |
65 | wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych | |
66 | glifów. Może być także uważana za "sterownik TrueType" dla | |
67 | bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType | |
68 | do rasteryzacji jest bardzo proste, co można zobaczyć w programach | |
69 | demonstracyjnych. | |
70 | ||
1e7243e1 JB |
71 | Ten pakiet zawiera wersję skrośną dla Win32. |
72 | ||
73 | %package static | |
74 | Summary: Static freetype library (cross mingw32 version) | |
75 | Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna mingw32) | |
76 | Group: Development/Libraries | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Static freetype library (cross mingw32 version). | |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka freetype (wersja skrośna mingw32). | |
84 | ||
85 | %package dll | |
86 | Summary: DLL freetype library for Windows | |
87 | Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows | |
88 | Group: Applications/Emulators | |
89 | Requires: crossmingw32-zlib-dll | |
90 | Requires: wine | |
91 | ||
92 | %description dll | |
93 | DLL freetype library for Windows. | |
94 | ||
95 | %description dll -l pl.UTF-8 | |
96 | Biblioteka DLL freetype dla Windows. | |
3294533f | 97 | |
98 | %prep | |
99 | %setup -q -n %{_realname}-%{version} | |
100 | ||
101 | %build | |
102 | CFLAGS="%{rpmcflags} \ | |
103 | %{?with_bytecode:-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER} \ | |
104 | %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING}" \ | |
105 | %configure \ | |
3294533f | 106 | --target=%{target} \ |
6181c873 | 107 | --build=i686-pc-linux-gnu \ |
108 | --host=%{target} \ | |
109 | --enable-shared | |
3294533f | 110 | |
111 | %{__make} | |
112 | ||
cac282a9 | 113 | # link shared library |
114 | cd objs/.libs | |
115 | %{__cc} \ | |
116 | --shared *.o -llualib50 -llua50 -lm -o libfreetype.dll \ | |
117 | -Wl,--enable-auto-image-base -Wl,--out-implib,libfreetype.dll.a -lz | |
118 | cd ../.. | |
119 | ||
120 | cat << "EOF" >> libfreetype.la | |
121 | # libfreetype.la - a libtool library file | |
122 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | |
123 | ||
124 | # The name that we can dlopen(3). | |
125 | dlname='' | |
126 | ||
127 | # Names of this library. | |
128 | library_names='libfreetype.dll.a' | |
129 | ||
130 | # The name of the static archive. | |
131 | old_library='libfreetype.a' | |
132 | ||
133 | # Libraries that this one depends upon. | |
134 | dependency_libs=' -lz' | |
135 | ||
136 | # Version information for libfreetype. | |
137 | current=9 | |
138 | age=3 | |
139 | revision=16 | |
140 | ||
141 | # Is this an already installed library? | |
142 | installed=yes | |
143 | ||
144 | # Should we warn about portability when linking against -modules? | |
145 | shouldnotlink=no | |
146 | ||
147 | # Files to dlopen/dlpreopen | |
148 | dlopen='' | |
149 | dlpreopen='' | |
150 | ||
151 | # Directory that this library needs to be installed in: | |
152 | libdir='%{_libdir}' | |
153 | EOF | |
154 | ||
3294533f | 155 | %install |
156 | rm -rf $RPM_BUILD_ROOT | |
3294533f | 157 | |
158 | %{__make} install \ | |
159 | DESTDIR=$RPM_BUILD_ROOT | |
160 | ||
cac282a9 | 161 | install libfreetype.la $RPM_BUILD_ROOT%{_libdir} |
162 | ||
1e7243e1 | 163 | install -d $RPM_BUILD_ROOT%{_dlldir} |
cac282a9 | 164 | install objs/.libs/libfreetype.dll $RPM_BUILD_ROOT%{_dlldir} |
165 | install objs/.libs/libfreetype.dll.a $RPM_BUILD_ROOT%{_libdir} | |
1e7243e1 JB |
166 | |
167 | %if 0%{!?debug:1} | |
168 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
169 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
170 | %endif | |
171 | ||
172 | rm -rf $RPM_BUILD_ROOT%{_datadir}/aclocal | |
173 | ||
3294533f | 174 | %clean |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | ||
177 | %files | |
178 | %defattr(644,root,root,755) | |
6181c873 | 179 | %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,PATENTS,TODO,formats.txt,raster.txt} |
cac282a9 | 180 | %{_bindir}/freetype-config |
1e7243e1 JB |
181 | %{_libdir}/libfreetype.dll.a |
182 | %{_libdir}/libfreetype.la | |
3294533f | 183 | %{_includedir}/freetype2 |
184 | %{_includedir}/*.h | |
3294533f | 185 | %{_pkgconfigdir}/*.pc |
1e7243e1 JB |
186 | |
187 | %files static | |
188 | %defattr(644,root,root,755) | |
189 | %{_libdir}/libfreetype.a | |
190 | ||
191 | %files dll | |
192 | %defattr(644,root,root,755) | |
cac282a9 | 193 | %{_dlldir}/libfreetype.dll |