]>
Commit | Line | Data |
---|---|---|
1d3dbd49 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with gl # OpenGL surface backend | |
4 | ||
75ae79e7 JB |
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 | |
8401d423 JB |
7 | %define realname cairo |
8 | Name: crossmingw32-%{realname} | |
1d3dbd49 JB |
9 | Version: 1.16.0 |
10 | Release: 1 | |
87d9b0f9 | 11 | License: LGPL v2.1 or MPL v1.1 |
ed706dfc | 12 | Group: Development/Libraries |
23041acc | 13 | Source0: https://www.cairographics.org/releases/%{realname}-%{version}.tar.xz |
1d3dbd49 | 14 | # Source0-md5: f19e0353828269c22bd72e271243a552 |
87d9b0f9 | 15 | Patch0: cairo-link.patch |
ead09fb0 | 16 | Patch1: cairo-mingw32.patch |
1d3dbd49 JB |
17 | # https://gitlab.freedesktop.org/cairo/cairo/issues/204 |
18 | Patch2: cairo-mingw32-gl.patch | |
23041acc | 19 | URL: https://www.cairographics.org/ |
c0f86d72 JB |
20 | BuildRequires: autoconf >= 2.63 |
21 | BuildRequires: automake >= 1:1.11 | |
75ae79e7 | 22 | BuildRequires: crossmingw32-fontconfig >= 2.2.95 |
1d3dbd49 | 23 | BuildRequires: crossmingw32-freetype >= 2.5.1 |
2414ec55 | 24 | BuildRequires: crossmingw32-glib2 >= 2.14 |
c00b5b7c | 25 | BuildRequires: crossmingw32-libpng |
2414ec55 | 26 | BuildRequires: crossmingw32-pixman >= 0.30.0 |
c00b5b7c | 27 | BuildRequires: crossmingw32-zlib |
c0f86d72 | 28 | BuildRequires: libtool >= 2:2.2 |
2414ec55 | 29 | BuildRequires: pkgconfig >= 1:0.18 |
75ae79e7 | 30 | Requires: crossmingw32-fontconfig >= 2.2.95 |
1d3dbd49 | 31 | Requires: crossmingw32-freetype >= 2.5.1 |
ed706dfc | 32 | Requires: crossmingw32-libpng |
2414ec55 | 33 | Requires: crossmingw32-pixman >= 0.30.0 |
c00b5b7c | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %define no_install_post_strip 1 | |
37 | ||
38 | %define target i386-mingw32 | |
39 | %define target_platform i386-pc-mingw32 | |
c00b5b7c | 40 | |
41 | %define _sysprefix /usr | |
42 | %define _prefix %{_sysprefix}/%{target} | |
ab6df3fd | 43 | %define _libdir %{_prefix}/lib |
c00b5b7c | 44 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
ed706dfc | 45 | %define _dlldir /usr/share/wine/windows/system |
c00b5b7c | 46 | %define __cc %{target}-gcc |
47 | %define __cxx %{target}-g++ | |
1e3558d6 | 48 | %define __pkgconfig_provides %{nil} |
d932e68c | 49 | %define __pkgconfig_requires %{nil} |
c00b5b7c | 50 | |
87d9b0f9 JB |
51 | %ifnarch %{ix86} |
52 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
53 | %define optflags -O2 | |
54 | %endif | |
45f76160 | 55 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
c38236d6 | 56 | # note: although C++ code is not used, failing configure check disables DLL building |
87d9b0f9 | 57 | %define filterout_ld -Wl,-z,.* |
45f76160 | 58 | %define filterout_c -f[-a-z0-9=]* |
681bdb00 | 59 | %define filterout_cxx -f[-a-z0-9=]* |
87d9b0f9 | 60 | |
c00b5b7c | 61 | %description |
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 | |
67 | Extension. | |
68 | ||
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 | |
73 | PDF 1.4. | |
74 | ||
ed706dfc JB |
75 | This package contains the cross version for Win32. |
76 | ||
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 | |
53e09db9 | 83 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który |
ed706dfc JB |
84 | można znaleźć w rozszerzeniu X Render. |
85 | ||
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. | |
90 | ||
91 | Ten pakiet zawiera wersję skrośną dla Win32. | |
92 | ||
93 | %package static | |
75ae79e7 JB |
94 | Summary: Static Cairo library (cross MinGW32 version) |
95 | Summary(pl.UTF-8): Statyczna biblioteka Cairo (wersja skrośna MinGW32) | |
ed706dfc JB |
96 | Group: Development/Libraries |
97 | Requires: %{name} = %{version}-%{release} | |
98 | ||
99 | %description static | |
75ae79e7 | 100 | Static Cairo library (cross MinGW32 version). |
ed706dfc JB |
101 | |
102 | %description static -l pl.UTF-8 | |
75ae79e7 | 103 | Statyczna biblioteka Cairo (wersja skrośna MinGW32). |
ed706dfc JB |
104 | |
105 | %package dll | |
53e09db9 JB |
106 | Summary: DLL Cairo library for Windows |
107 | Summary(pl.UTF-8): Biblioteka DLL Cairo dla Windows | |
ed706dfc | 108 | Group: Applications/Emulators |
75ae79e7 | 109 | Requires: crossmingw32-fontconfig-dll >= 2.2.95 |
1d3dbd49 | 110 | Requires: crossmingw32-freetype-dll >= 2.5.1 |
ed706dfc | 111 | Requires: crossmingw32-libpng-dll |
2414ec55 | 112 | Requires: crossmingw32-pixman-dll >= 0.30.0 |
ed706dfc JB |
113 | |
114 | %description dll | |
53e09db9 | 115 | DLL Cairo library for Windows. |
ed706dfc JB |
116 | |
117 | %description dll -l pl.UTF-8 | |
53e09db9 | 118 | Biblioteka DLL Cairo dla Windows. |
c00b5b7c | 119 | |
75ae79e7 JB |
120 | %package gobject |
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} | |
2414ec55 | 125 | Requires: crossmingw32-glib2 >= 2.14 |
75ae79e7 JB |
126 | |
127 | %description gobject | |
128 | Cairo GObject functions library - cross MinGW32 version. | |
129 | ||
130 | %description gobject -l pl.UTF-8 | |
131 | Biblioteka funkcji Cairo GObject - wersja skrośna MinGW32. | |
132 | ||
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} | |
138 | ||
139 | %description gobject-static | |
140 | Static Cairo GObject library (cross MinGW32 version). | |
141 | ||
142 | %description gobject-static -l pl.UTF-8 | |
143 | Statyczna biblioteka Cairo GObject (wersja skrośna MinGW32). | |
144 | ||
145 | %package gobject-dll | |
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} | |
2414ec55 | 150 | Requires: crossmingw32-glib2-dll >= 2.14 |
75ae79e7 JB |
151 | |
152 | %description gobject-dll | |
153 | DLL Cairo GObject library for Windows. | |
154 | ||
155 | %description gobject-dll -l pl.UTF-8 | |
156 | Biblioteka DLL Cairo GObject dla Windows. | |
157 | ||
c00b5b7c | 158 | %prep |
8401d423 | 159 | %setup -q -n %{realname}-%{version} |
53e09db9 | 160 | %patch0 -p1 |
ead09fb0 | 161 | %patch1 -p1 |
ff93a0af | 162 | %patch2 -p1 |
c00b5b7c | 163 | |
164 | %build | |
36f07f62 | 165 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
c00b5b7c | 166 | %{__libtoolize} |
87d9b0f9 | 167 | %{__aclocal} -I build |
c00b5b7c | 168 | %{__autoheader} |
169 | %{__autoconf} | |
170 | %{__automake} | |
171 | %configure \ | |
75ae79e7 | 172 | CPPFLAGS="%{rpmcppflags} -Dffs=__builtin_ffs" \ |
ed706dfc | 173 | lt_cv_deplibs_check_method=pass_all \ |
c00b5b7c | 174 | --target=%{target} \ |
594215bd | 175 | --host=%{target} \ |
594215bd | 176 | --disable-gtk-doc \ |
75ae79e7 | 177 | --disable-silent-rules \ |
c00b5b7c | 178 | --disable-xlib \ |
1d3dbd49 JB |
179 | --enable-ft \ |
180 | %{?with_gl:--enable-gl} \ | |
594215bd | 181 | --enable-pdf \ |
182 | --enable-png \ | |
183 | --enable-ps \ | |
d8d1430b JB |
184 | --enable-tee \ |
185 | --enable-windows \ | |
186 | --enable-xml | |
594215bd | 187 | |
c00b5b7c | 188 | %{__make} |
189 | ||
190 | %install | |
191 | rm -rf $RPM_BUILD_ROOT | |
192 | ||
193 | %{__make} install \ | |
194 | DESTDIR=$RPM_BUILD_ROOT | |
195 | ||
ed706dfc JB |
196 | install -d $RPM_BUILD_ROOT%{_dlldir} |
197 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
198 | ||
199 | %if 0%{!?debug:1} | |
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 | |
202 | %endif | |
203 | ||
204 | rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc | |
205 | ||
c00b5b7c | 206 | %clean |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | ||
209 | %files | |
210 | %defattr(644,root,root,755) | |
211 | # COPYING contains only notes, not LGPL/MPL texts | |
53e09db9 | 212 | %doc AUTHORS COPYING ChangeLog NEWS README |
ed706dfc JB |
213 | %{_libdir}/libcairo.dll.a |
214 | %{_libdir}/libcairo.la | |
75ae79e7 JB |
215 | %{_libdir}/libcairo-script-interpreter.dll.a |
216 | %{_libdir}/libcairo-script-interpreter.la | |
ed706dfc | 217 | %{_includedir}/cairo |
75ae79e7 | 218 | %exclude %{_includedir}/cairo/cairo-gobject.h |
6da4c596 | 219 | %{_pkgconfigdir}/cairo.pc |
75ae79e7 | 220 | %{_pkgconfigdir}/cairo-fc.pc |
6da4c596 | 221 | %{_pkgconfigdir}/cairo-ft.pc |
1d3dbd49 | 222 | %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc} |
6da4c596 JB |
223 | %{_pkgconfigdir}/cairo-pdf.pc |
224 | %{_pkgconfigdir}/cairo-png.pc | |
225 | %{_pkgconfigdir}/cairo-ps.pc | |
ead09fb0 | 226 | %{_pkgconfigdir}/cairo-script.pc |
6da4c596 | 227 | %{_pkgconfigdir}/cairo-svg.pc |
d8d1430b | 228 | %{_pkgconfigdir}/cairo-tee.pc |
1d3dbd49 | 229 | %{?with_gl:%{_pkgconfigdir}/cairo-wgl.pc} |
6da4c596 | 230 | %{_pkgconfigdir}/cairo-win32.pc |
53e09db9 | 231 | %{_pkgconfigdir}/cairo-win32-font.pc |
d8d1430b | 232 | %{_pkgconfigdir}/cairo-xml.pc |
ed706dfc JB |
233 | |
234 | %files static | |
235 | %defattr(644,root,root,755) | |
236 | %{_libdir}/libcairo.a | |
75ae79e7 | 237 | %{_libdir}/libcairo-script-interpreter.a |
ed706dfc JB |
238 | |
239 | %files dll | |
240 | %defattr(644,root,root,755) | |
75ae79e7 JB |
241 | %{_dlldir}/libcairo-2.dll |
242 | %{_dlldir}/libcairo-script-interpreter-2.dll | |
243 | ||
244 | %files gobject | |
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 | |
250 | ||
251 | %files gobject-static | |
252 | %defattr(644,root,root,755) | |
253 | %{_libdir}/libcairo-gobject.a | |
254 | ||
255 | %files gobject-dll | |
256 | %defattr(644,root,root,755) | |
257 | %{_dlldir}/libcairo-gobject-2.dll |