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