3 %bcond_with gl # OpenGL surface backend
5 Summary: Cairo - multi-platform 2D graphics library - cross MinGW32 version
6 Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D - skrośna wersja MinGW32
8 Name: crossmingw32-%{realname}
11 License: LGPL v2.1 or MPL v1.1
12 Group: Development/Libraries
13 Source0: https://www.cairographics.org/releases/%{realname}-%{version}.tar.xz
14 # Source0-md5: f19e0353828269c22bd72e271243a552
15 Patch0: cairo-link.patch
16 Patch1: cairo-mingw32.patch
17 # https://gitlab.freedesktop.org/cairo/cairo/issues/204
18 Patch2: cairo-mingw32-gl.patch
19 URL: https://www.cairographics.org/
20 BuildRequires: autoconf >= 2.63
21 BuildRequires: automake >= 1:1.11
22 BuildRequires: crossmingw32-fontconfig >= 2.2.95
23 BuildRequires: crossmingw32-freetype >= 2.5.1
24 BuildRequires: crossmingw32-glib2 >= 2.14
25 BuildRequires: crossmingw32-libpng
26 BuildRequires: crossmingw32-pixman >= 0.30.0
27 BuildRequires: crossmingw32-zlib
28 BuildRequires: libtool >= 2:2.2
29 BuildRequires: pkgconfig >= 1:0.18
30 Requires: crossmingw32-fontconfig >= 2.2.95
31 Requires: crossmingw32-freetype >= 2.5.1
32 Requires: crossmingw32-libpng
33 Requires: crossmingw32-pixman >= 0.30.0
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define no_install_post_strip 1
38 %define target i386-mingw32
39 %define target_platform i386-pc-mingw32
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}
52 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
55 # -z options are invalid for mingw linker, most of -f options are Linux-specific
56 # note: although C++ code is not used, failing configure check disables DLL building
57 %define filterout_ld -Wl,-z,.*
58 %define filterout_c -f[-a-z0-9=]*
59 %define filterout_cxx -f[-a-z0-9=]*
62 Cairo provides anti-aliased vector-based rendering for X. Paths
63 consist of line segments and cubic splines and can be rendered at any
64 width with various join and cap styles. All colors may be specified
65 with optional translucence (opacity/alpha) and combined using the
66 extended Porter/Duff compositing algebra as found in the X Render
69 Cairo exports a stateful rendering API similar in spirit to the path
70 construction, text, and painting operators of PostScript, (with the
71 significant addition of translucence in the imaging model). When
72 complete, the API is intended to support the complete imaging model of
75 This package contains the cross version for Win32.
77 %description -l pl.UTF-8
78 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
79 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
80 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
81 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
82 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
83 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
84 można znaleźć w rozszerzeniu X Render.
86 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
87 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
88 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
89 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
91 Ten pakiet zawiera wersję skrośną dla Win32.
94 Summary: Static Cairo library (cross MinGW32 version)
95 Summary(pl.UTF-8): Statyczna biblioteka Cairo (wersja skrośna MinGW32)
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
100 Static Cairo library (cross MinGW32 version).
102 %description static -l pl.UTF-8
103 Statyczna biblioteka Cairo (wersja skrośna MinGW32).
106 Summary: DLL Cairo library for Windows
107 Summary(pl.UTF-8): Biblioteka DLL Cairo dla Windows
108 Group: Applications/Emulators
109 Requires: crossmingw32-fontconfig-dll >= 2.2.95
110 Requires: crossmingw32-freetype-dll >= 2.5.1
111 Requires: crossmingw32-libpng-dll
112 Requires: crossmingw32-pixman-dll >= 0.30.0
115 DLL Cairo library for Windows.
117 %description dll -l pl.UTF-8
118 Biblioteka DLL Cairo dla Windows.
121 Summary: Cairo GObject functions library - cross MinGW32 version
122 Summary(pl.UTF-8): Biblioteka funkcji Cairo GObject - wersja skrośna MinGW32
123 Group: Development/Libraries
124 Requires: %{name} = %{version}-%{release}
125 Requires: crossmingw32-glib2 >= 2.14
128 Cairo GObject functions library - cross MinGW32 version.
130 %description gobject -l pl.UTF-8
131 Biblioteka funkcji Cairo GObject - wersja skrośna MinGW32.
133 %package gobject-static
134 Summary: Static Cairo GObject library (cross MinGW32 version)
135 Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject (wersja skrośna MinGW32)
136 Group: Development/Libraries
137 Requires: %{name}-gobject = %{version}-%{release}
139 %description gobject-static
140 Static Cairo GObject library (cross MinGW32 version).
142 %description gobject-static -l pl.UTF-8
143 Statyczna biblioteka Cairo GObject (wersja skrośna MinGW32).
146 Summary: DLL Cairo GObject library for Windows
147 Summary(pl.UTF-8): Biblioteka DLL Cairo GObject dla Windows
148 Group: Applications/Emulators
149 Requires: %{name}-dll = %{version}-%{release}
150 Requires: crossmingw32-glib2-dll >= 2.14
152 %description gobject-dll
153 DLL Cairo GObject library for Windows.
155 %description gobject-dll -l pl.UTF-8
156 Biblioteka DLL Cairo GObject dla Windows.
159 %setup -q -n %{realname}-%{version}
165 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
167 %{__aclocal} -I build
172 CPPFLAGS="%{rpmcppflags} -Dffs=__builtin_ffs" \
173 lt_cv_deplibs_check_method=pass_all \
177 --disable-silent-rules \
180 %{?with_gl:--enable-gl} \
191 rm -rf $RPM_BUILD_ROOT
194 DESTDIR=$RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT%{_dlldir}
197 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
200 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
201 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
204 rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc
207 rm -rf $RPM_BUILD_ROOT
210 %defattr(644,root,root,755)
211 # COPYING contains only notes, not LGPL/MPL texts
212 %doc AUTHORS COPYING ChangeLog NEWS README
213 %{_libdir}/libcairo.dll.a
214 %{_libdir}/libcairo.la
215 %{_libdir}/libcairo-script-interpreter.dll.a
216 %{_libdir}/libcairo-script-interpreter.la
218 %exclude %{_includedir}/cairo/cairo-gobject.h
219 %{_pkgconfigdir}/cairo.pc
220 %{_pkgconfigdir}/cairo-fc.pc
221 %{_pkgconfigdir}/cairo-ft.pc
222 %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
223 %{_pkgconfigdir}/cairo-pdf.pc
224 %{_pkgconfigdir}/cairo-png.pc
225 %{_pkgconfigdir}/cairo-ps.pc
226 %{_pkgconfigdir}/cairo-script.pc
227 %{_pkgconfigdir}/cairo-svg.pc
228 %{_pkgconfigdir}/cairo-tee.pc
229 %{?with_gl:%{_pkgconfigdir}/cairo-wgl.pc}
230 %{_pkgconfigdir}/cairo-win32.pc
231 %{_pkgconfigdir}/cairo-win32-font.pc
232 %{_pkgconfigdir}/cairo-xml.pc
235 %defattr(644,root,root,755)
236 %{_libdir}/libcairo.a
237 %{_libdir}/libcairo-script-interpreter.a
240 %defattr(644,root,root,755)
241 %{_dlldir}/libcairo-2.dll
242 %{_dlldir}/libcairo-script-interpreter-2.dll
245 %defattr(644,root,root,755)
246 %{_libdir}/libcairo-gobject.dll.a
247 %{_libdir}/libcairo-gobject.la
248 %{_includedir}/cairo/cairo-gobject.h
249 %{_pkgconfigdir}/cairo-gobject.pc
251 %files gobject-static
252 %defattr(644,root,root,755)
253 %{_libdir}/libcairo-gobject.a
256 %defattr(644,root,root,755)
257 %{_dlldir}/libcairo-gobject-2.dll