]> git.pld-linux.org Git - packages/crossmingw32-cairo.git/blob - crossmingw32-cairo.spec
- updated to 1.16.0
[packages/crossmingw32-cairo.git] / crossmingw32-cairo.spec
1 #
2 # Conditional build:
3 %bcond_with     gl              # OpenGL surface backend
4
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
7 %define         realname   cairo
8 Name:           crossmingw32-%{realname}
9 Version:        1.16.0
10 Release:        1
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)
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 # 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=]*
60
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
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
83 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
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
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}
98
99 %description static
100 Static Cairo library (cross MinGW32 version).
101
102 %description static -l pl.UTF-8
103 Statyczna biblioteka Cairo (wersja skrośna MinGW32).
104
105 %package dll
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
113
114 %description dll
115 DLL Cairo library for Windows.
116
117 %description dll -l pl.UTF-8
118 Biblioteka DLL Cairo dla Windows.
119
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}
125 Requires:       crossmingw32-glib2 >= 2.14
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}
150 Requires:       crossmingw32-glib2-dll >= 2.14
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
158 %prep
159 %setup -q -n %{realname}-%{version}
160 %patch0 -p1
161 %patch1 -p1
162 %patch2 -p1
163
164 %build
165 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
166 %{__libtoolize}
167 %{__aclocal} -I build
168 %{__autoheader}
169 %{__autoconf}
170 %{__automake}
171 %configure \
172         CPPFLAGS="%{rpmcppflags} -Dffs=__builtin_ffs" \
173         lt_cv_deplibs_check_method=pass_all \
174         --target=%{target} \
175         --host=%{target} \
176         --disable-gtk-doc \
177         --disable-silent-rules \
178         --disable-xlib \
179         --enable-ft \
180         %{?with_gl:--enable-gl} \
181         --enable-pdf \
182         --enable-png \
183         --enable-ps \
184         --enable-tee \
185         --enable-windows \
186         --enable-xml
187
188 %{__make}
189
190 %install
191 rm -rf $RPM_BUILD_ROOT
192
193 %{__make} install \
194         DESTDIR=$RPM_BUILD_ROOT
195
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
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
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
217 %{_includedir}/cairo
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
233
234 %files static
235 %defattr(644,root,root,755)
236 %{_libdir}/libcairo.a
237 %{_libdir}/libcairo-script-interpreter.a
238
239 %files dll
240 %defattr(644,root,root,755)
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
This page took 0.078844 seconds and 3 git commands to generate.