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