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