]>
Commit | Line | Data |
---|---|---|
c00b5b7c | 1 | # |
2 | # Conditional build: | |
3 | %bcond_with glitz # build with glitz backend | |
4 | # | |
5 | Summary: Cairo - multi-platform 2D graphics library - cross Mingw32 version | |
ed706dfc | 6 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D - skrośna wersja Mingw32 |
8401d423 JB |
7 | %define realname cairo |
8 | Name: crossmingw32-%{realname} | |
87d9b0f9 | 9 | Version: 1.8.0 |
c00b5b7c | 10 | Release: 1 |
87d9b0f9 | 11 | License: LGPL v2.1 or MPL v1.1 |
ed706dfc | 12 | Group: Development/Libraries |
8401d423 | 13 | Source0: http://cairographics.org/releases/%{realname}-%{version}.tar.gz |
87d9b0f9 JB |
14 | # Source0-md5: 4ea70ea87b47e92d318d4e7f5b940f47 |
15 | Patch0: cairo-link.patch | |
c00b5b7c | 16 | URL: http://cairographics.org/ |
53e09db9 JB |
17 | BuildRequires: autoconf >= 2.58 |
18 | BuildRequires: automake >= 1:1.8 | |
c00b5b7c | 19 | BuildRequires: crossmingw32-fontconfig |
87d9b0f9 | 20 | BuildRequires: crossmingw32-freetype >= 2.3.0 |
c00b5b7c | 21 | %{?with_glitz:BuildRequires: crossmingw32-glitz >= 0.5.1} |
22 | BuildRequires: crossmingw32-libpng | |
87d9b0f9 | 23 | BuildRequires: crossmingw32-pixman >= 0.12.0 |
c00b5b7c | 24 | BuildRequires: crossmingw32-zlib |
25 | BuildRequires: libtool | |
36f07f62 | 26 | BuildRequires: pkgconfig >= 1:0.15 |
ed706dfc | 27 | Requires: crossmingw32-fontconfig |
87d9b0f9 | 28 | Requires: crossmingw32-freetype >= 2.3.0 |
ed706dfc JB |
29 | %{?with_glitz:Requires: crossmingw32-glitz >= 0.5.1} |
30 | Requires: crossmingw32-libpng | |
87d9b0f9 | 31 | Requires: crossmingw32-pixman >= 0.12.0 |
c00b5b7c | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %define no_install_post_strip 1 | |
35 | ||
36 | %define target i386-mingw32 | |
37 | %define target_platform i386-pc-mingw32 | |
c00b5b7c | 38 | |
39 | %define _sysprefix /usr | |
40 | %define _prefix %{_sysprefix}/%{target} | |
ab6df3fd | 41 | %define _libdir %{_prefix}/lib |
c00b5b7c | 42 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
ed706dfc | 43 | %define _dlldir /usr/share/wine/windows/system |
c00b5b7c | 44 | %define __cc %{target}-gcc |
45 | %define __cxx %{target}-g++ | |
46 | ||
87d9b0f9 JB |
47 | %ifnarch %{ix86} |
48 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
49 | %define optflags -O2 | |
50 | %endif | |
51 | # -z options are invalid for mingw linker | |
52 | %define filterout_ld -Wl,-z,.* | |
53 | ||
c00b5b7c | 54 | %description |
55 | Cairo provides anti-aliased vector-based rendering for X. Paths | |
56 | consist of line segments and cubic splines and can be rendered at any | |
57 | width with various join and cap styles. All colors may be specified | |
58 | with optional translucence (opacity/alpha) and combined using the | |
59 | extended Porter/Duff compositing algebra as found in the X Render | |
60 | Extension. | |
61 | ||
62 | Cairo exports a stateful rendering API similar in spirit to the path | |
63 | construction, text, and painting operators of PostScript, (with the | |
64 | significant addition of translucence in the imaging model). When | |
65 | complete, the API is intended to support the complete imaging model of | |
66 | PDF 1.4. | |
67 | ||
ed706dfc JB |
68 | This package contains the cross version for Win32. |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
72 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
73 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
74 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
75 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
53e09db9 | 76 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który |
ed706dfc JB |
77 | można znaleźć w rozszerzeniu X Render. |
78 | ||
79 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
80 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
81 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
82 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
83 | ||
84 | Ten pakiet zawiera wersję skrośną dla Win32. | |
85 | ||
86 | %package static | |
53e09db9 JB |
87 | Summary: Static Cairo library (cross mingw32 version) |
88 | Summary(pl.UTF-8): Statyczna biblioteka Cairo (wersja skrośna mingw32) | |
ed706dfc JB |
89 | Group: Development/Libraries |
90 | Requires: %{name} = %{version}-%{release} | |
91 | ||
92 | %description static | |
53e09db9 | 93 | Static Cairo library (cross mingw32 version). |
ed706dfc JB |
94 | |
95 | %description static -l pl.UTF-8 | |
53e09db9 | 96 | Statyczna biblioteka Cairo (wersja skrośna mingw32). |
ed706dfc JB |
97 | |
98 | %package dll | |
53e09db9 JB |
99 | Summary: DLL Cairo library for Windows |
100 | Summary(pl.UTF-8): Biblioteka DLL Cairo dla Windows | |
ed706dfc JB |
101 | Group: Applications/Emulators |
102 | Requires: crossmingw32-fontconfig-dll | |
87d9b0f9 | 103 | Requires: crossmingw32-freetype-dll >= 2.3.0 |
ed706dfc JB |
104 | %{?with_glitz:Requires: crossmingw32-glitz-dll >= 0.5.1} |
105 | Requires: crossmingw32-libpng-dll | |
87d9b0f9 | 106 | Requires: crossmingw32-pixman-dll >= 0.12.0 |
ed706dfc JB |
107 | |
108 | %description dll | |
53e09db9 | 109 | DLL Cairo library for Windows. |
ed706dfc JB |
110 | |
111 | %description dll -l pl.UTF-8 | |
53e09db9 | 112 | Biblioteka DLL Cairo dla Windows. |
c00b5b7c | 113 | |
114 | %prep | |
8401d423 | 115 | %setup -q -n %{realname}-%{version} |
53e09db9 | 116 | %patch0 -p1 |
c00b5b7c | 117 | |
118 | %build | |
36f07f62 | 119 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
c00b5b7c | 120 | %{__libtoolize} |
87d9b0f9 | 121 | %{__aclocal} -I build |
c00b5b7c | 122 | %{__autoheader} |
123 | %{__autoconf} | |
124 | %{__automake} | |
125 | %configure \ | |
ed706dfc | 126 | lt_cv_deplibs_check_method=pass_all \ |
c00b5b7c | 127 | --target=%{target} \ |
594215bd | 128 | --host=%{target} \ |
594215bd | 129 | --disable-gtk-doc \ |
c00b5b7c | 130 | --disable-xlib \ |
131 | --disable-xlib-render \ | |
594215bd | 132 | --enable-freetype \ |
ed706dfc | 133 | %{?with_glitz:--enable-glitz} \ |
594215bd | 134 | --enable-pdf \ |
135 | --enable-png \ | |
136 | --enable-ps \ | |
6da4c596 | 137 | --enable-windows |
594215bd | 138 | |
c00b5b7c | 139 | %{__make} |
140 | ||
141 | %install | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %{__make} install \ | |
145 | DESTDIR=$RPM_BUILD_ROOT | |
146 | ||
ed706dfc JB |
147 | install -d $RPM_BUILD_ROOT%{_dlldir} |
148 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
149 | ||
150 | %if 0%{!?debug:1} | |
151 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
152 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
153 | %endif | |
154 | ||
155 | rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc | |
156 | ||
c00b5b7c | 157 | %clean |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
160 | %files | |
161 | %defattr(644,root,root,755) | |
162 | # COPYING contains only notes, not LGPL/MPL texts | |
53e09db9 | 163 | %doc AUTHORS COPYING ChangeLog NEWS README |
ed706dfc JB |
164 | %{_libdir}/libcairo.dll.a |
165 | %{_libdir}/libcairo.la | |
166 | %{_includedir}/cairo | |
6da4c596 JB |
167 | %{_pkgconfigdir}/cairo.pc |
168 | %{_pkgconfigdir}/cairo-ft.pc | |
169 | %{_pkgconfigdir}/cairo-pdf.pc | |
170 | %{_pkgconfigdir}/cairo-png.pc | |
171 | %{_pkgconfigdir}/cairo-ps.pc | |
172 | %{_pkgconfigdir}/cairo-svg.pc | |
173 | %{_pkgconfigdir}/cairo-win32.pc | |
53e09db9 | 174 | %{_pkgconfigdir}/cairo-win32-font.pc |
ed706dfc JB |
175 | |
176 | %files static | |
177 | %defattr(644,root,root,755) | |
178 | %{_libdir}/libcairo.a | |
179 | ||
180 | %files dll | |
181 | %defattr(644,root,root,755) | |
182 | %{_dlldir}/libcairo-*.dll |