]> git.pld-linux.org Git - packages/crossmingw32-freetype.git/blob - crossmingw32-freetype.spec
- updated to 2.5.2
[packages/crossmingw32-freetype.git] / crossmingw32-freetype.spec
1 #
2 # Conditional build:
3 %bcond_without  lcd             # without LCD subpixel color filtering (Microsoft patents in USA)
4 #
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}
9 Version:        2.5.2
10 Release:        1
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
21 BuildRequires:  python
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)
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
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}
45
46 %ifnarch %{ix86}
47 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
48 %define         optflags        -O2
49 %endif
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=]*
53
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
67 This package contains the cross version for Win32.
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
81 Ten pakiet zawiera wersję skrośną dla Win32.
82
83 %package static
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}
88
89 %description static
90 Static freetype library (cross MinGW32 version).
91
92 %description static -l pl.UTF-8
93 Statyczna biblioteka freetype (wersja skrośna MinGW32).
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
99 Requires:       crossmingw32-bzip2-dll
100 Requires:       crossmingw32-libpng-dll
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.
109
110 %prep
111 %setup -q -n %{realname}-%{version}
112
113 %build
114 export PKG_CONFIG_LIBDIR=%{_pkgconfigdir}
115 CFLAGS="%{rpmcflags} \
116 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
117 -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
118 " \
119 %configure \
120         LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
121         LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
122         --target=%{target} \
123         --build=i686-pc-linux-gnu \
124         --host=%{target} \
125         --enable-shared
126
127 %{__make}
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %{__make} install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 install -d $RPM_BUILD_ROOT%{_dlldir}
136 %{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
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
143 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %files
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
155
156 %files static
157 %defattr(644,root,root,755)
158 %{_libdir}/libfreetype.a
159
160 %files dll
161 %defattr(644,root,root,755)
162 %{_dlldir}/libfreetype-*.dll
This page took 1.829054 seconds and 3 git commands to generate.