]>
Commit | Line | Data |
---|---|---|
3b3536d4 JB |
1 | # |
2 | # Conditional build | |
3 | %bcond_without static_libs # static libraries | |
83b18e2d | 4 | %bcond_without gdkpixbuf # gdk-pixbuf for image loading [instead of stb_image] |
ce061459 JB |
5 | %bcond_without gles1 # OpenGL-ES 1.1 driver support |
6 | %bcond_without gles2 # OpenGL-ES 2.0 driver support | |
7 | %bcond_without kms # KMS EGL platform support | |
f877413a | 8 | %bcond_without gstreamer # GStreamer support |
ce061459 JB |
9 | %bcond_with mir # Mir EGL platform support (conflicts with wayland) |
10 | %bcond_with sdl1 # SDL 1.x winsys support (conflicts with sdl2) | |
11 | %bcond_with sdl2 # SDL2 winsys support (conflicts with sdl1) | |
12 | %bcond_without wayland # Wayland EGL platform and server support | |
43c35c42 | 13 | |
a8e45d23 | 14 | Summary: A library for using 3D graphics hardware to draw pretty pictures |
3b3536d4 | 15 | Summary(pl.UTF-8): Biblioteka do rysowania ładnych obrazków przy użyciu sprzętowej grafiki 3D |
a8e45d23 | 16 | Name: cogl |
ce061459 | 17 | Version: 1.20.0 |
0af7bdd6 | 18 | Release: 1 |
a8e45d23 | 19 | License: LGPL v2+ |
3b3536d4 | 20 | Group: Libraries |
ce061459 JB |
21 | Source0: http://ftp.gnome.org/pub/GNOME/sources/cogl/1.20/%{name}-%{version}.tar.xz |
22 | # Source0-md5: 5b28897194d9ff76a574a9493d1f7ee0 | |
646b7883 | 23 | Patch0: %{name}-link.patch |
a8e45d23 | 24 | URL: http://www.clutter-project.org/ |
f877413a | 25 | %{?with_wayland:BuildRequires: EGL-devel} |
b0b44050 | 26 | %{?with_kms:BuildRequires: Mesa-libgbm-devel} |
f877413a | 27 | %{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel >= 1.0.0} |
1ae58ca6 | 28 | BuildRequires: OpenGL-GLX-devel |
aa9131ed | 29 | %{?with_gles1:BuildRequires: OpenGLESv1-devel >= 1.1} |
ce061459 JB |
30 | %{?with_sdl1:BuildRequires: SDL-devel >= 1.2} |
31 | %{?with_sdl2:BuildRequires: SDL2-devel >= 2} | |
aedf1bd3 JB |
32 | BuildRequires: autoconf >= 2.59 |
33 | BuildRequires: automake >= 1:1.11 | |
3b3536d4 | 34 | BuildRequires: cairo-devel >= 1.10 |
bfeaf83d | 35 | %{?with_gdkpixbuf:BuildRequires: gdk-pixbuf2-devel >= 2.0} |
8d921b32 | 36 | BuildRequires: gettext-tools >= 0.18.1 |
774ef314 | 37 | BuildRequires: glib2-devel >= 1:2.32.0 |
3b3536d4 | 38 | BuildRequires: gobject-introspection-devel >= 0.9.5 |
f877413a JB |
39 | %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0} |
40 | %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0} | |
3b3536d4 JB |
41 | BuildRequires: gtk-doc >= 1.13 |
42 | BuildRequires: libdrm-devel | |
aedf1bd3 | 43 | BuildRequires: libtool >= 2:2.2.6 |
ce061459 JB |
44 | # pkgconfig(mirclient) |
45 | %{?with_mir:BuildRequires: mir-devel >= 0.9.0} | |
3b3536d4 | 46 | BuildRequires: pango-devel >= 1:1.20 |
a8e45d23 | 47 | BuildRequires: pkgconfig |
aedf1bd3 | 48 | BuildRequires: tar >= 1:1.22 |
f877413a JB |
49 | # wayland-client >= 1.0.0, wayland-server >= 1.1.90 |
50 | %{?with_wayland:BuildRequires: wayland-devel >= 1.2.0} | |
1ae58ca6 | 51 | BuildRequires: xorg-lib-libX11-devel |
3b3536d4 | 52 | BuildRequires: xorg-lib-libXcomposite-devel >= 0.4 |
a8e45d23 PZ |
53 | BuildRequires: xorg-lib-libXdamage-devel |
54 | BuildRequires: xorg-lib-libXext-devel | |
3b3536d4 | 55 | BuildRequires: xorg-lib-libXfixes-devel >= 3 |
774ef314 | 56 | BuildRequires: xorg-lib-libXrandr-devel >= 1.2 |
aedf1bd3 | 57 | BuildRequires: xz |
3b3536d4 | 58 | Requires: cairo >= 1.10 |
774ef314 | 59 | Requires: glib2 >= 1:2.32.0 |
3b3536d4 | 60 | Requires: pango >= 1:1.20 |
f877413a | 61 | %{?with_wayland:Requires: wayland >= 1.2.0} |
3b3536d4 JB |
62 | Requires: xorg-lib-libXcomposite >= 0.4 |
63 | Requires: xorg-lib-libXfixes >= 3 | |
774ef314 | 64 | Requires: xorg-lib-libXrandr >= 1.2 |
1ae58ca6 | 65 | Suggests: OpenGL |
502bb6a5 JB |
66 | %{?with_gles1:Provides: cogl(gles1) = %{version}-%{release}} |
67 | %{?with_gles2:Provides: cogl(gles2) = %{version}-%{release}} | |
b0b44050 | 68 | %{?with_kms:Provides: cogl(kms) = %{version}-%{release}} |
502bb6a5 | 69 | %{?with_wayland:Provides: cogl(wayland) = %{version}-%{release}} |
9fabc6b2 | 70 | Conflicts: clutter < 1.8.0 |
3b3536d4 | 71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
a8e45d23 PZ |
72 | |
73 | %description | |
74 | Cogl is a small open source library for using 3D graphics hardware to | |
75 | draw pretty pictures. The API departs from the flat state machine | |
76 | style of OpenGL and is designed to make it easy to write orthogonal | |
77 | components that can render without stepping on each others toes. | |
78 | ||
3b3536d4 JB |
79 | %description -l pl.UTF-8 |
80 | Cogl to mała biblioteka o otwartych źródłach, pozwalająca na rysowanie | |
81 | ładnych rysunków przy użyciu sprzętu graficznego 3D. API wywodzi się z | |
82 | automatu skończonego w stylu OpenGL i zostało tak zaprojektowane, aby | |
83 | ułatwić pisanie ortogonalnych komponentów, potrafiących renderować bez | |
84 | przeszkadzania sobie nawzajem. | |
a8e45d23 PZ |
85 | |
86 | %package devel | |
3b3536d4 JB |
87 | Summary: Header files for cogl library |
88 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl | |
a8e45d23 PZ |
89 | Group: Development/Libraries |
90 | Requires: %{name} = %{version}-%{release} | |
f877413a | 91 | %{?with_wayland:Requires: EGL-devel} |
b0b44050 | 92 | %{?with_kms:Requires: Mesa-libgbm-devel} |
f877413a | 93 | %{?with_wayland:Requires: Mesa-libwayland-egl-devel >= 1.0.0} |
3b3536d4 | 94 | Requires: cairo-devel >= 1.10 |
bfeaf83d | 95 | %{?with_gdkpixbuf:Requires: gdk-pixbuf2-devel >= 2.0} |
774ef314 | 96 | Requires: glib2-devel >= 1:2.32.0 |
3b3536d4 JB |
97 | Requires: gobject-introspection-devel >= 0.9.5 |
98 | Requires: libdrm-devel | |
99 | Requires: pango-devel >= 1:1.20 | |
f877413a | 100 | %{?with_wayland:Requires: wayland-devel >= 1.2.0} |
3b3536d4 JB |
101 | Requires: xorg-lib-libXcomposite-devel >= 0.4 |
102 | Requires: xorg-lib-libXdamage-devel | |
103 | Requires: xorg-lib-libXext-devel | |
104 | Requires: xorg-lib-libXfixes-devel >= 3 | |
774ef314 | 105 | Requires: xorg-lib-libXrandr-devel >= 1.2 |
502bb6a5 JB |
106 | %{?with_gles1:Provides: cogl-devel(gles1) = %{version}-%{release}} |
107 | %{?with_gles2:Provides: cogl-devel(gles2) = %{version}-%{release}} | |
b0b44050 | 108 | %{?with_kms:Provides: cogl-devel(kms) = %{version}-%{release}} |
502bb6a5 | 109 | %{?with_wayland:Provides: cogl-devel(wayland) = %{version}-%{release}} |
9fabc6b2 | 110 | Conflicts: clutter-devel < 1.8.0 |
a8e45d23 PZ |
111 | |
112 | %description devel | |
3b3536d4 JB |
113 | Header files for building and developing applications with cogl. |
114 | ||
115 | %description devel -l pl.UTF-8 | |
116 | Pliki nagłówkowe do tworzenia aplikacji z użyciem biblioteki cogl. | |
117 | ||
118 | %package static | |
119 | Summary: Static cogl libraries | |
120 | Summary(pl.UTF-8): Statyczne biblioteki cogl | |
121 | Group: Development/Libraries | |
122 | Requires: %{name}-devel = %{version}-%{release} | |
502bb6a5 JB |
123 | %{?with_gles1:Provides: cogl-static(gles1) = %{version}-%{release}} |
124 | %{?with_gles2:Provides: cogl-static(gles2) = %{version}-%{release}} | |
b0b44050 | 125 | %{?with_kms:Provides: cogl-static(kms) = %{version}-%{release}} |
502bb6a5 | 126 | %{?with_wayland:Provides: cogl-static(wayland) = %{version}-%{release}} |
9fabc6b2 | 127 | Conflicts: clutter-static < 1.8.0 |
3b3536d4 JB |
128 | |
129 | %description static | |
130 | Static cogl libraries. | |
131 | ||
132 | %description static -l pl.UTF-8 | |
133 | Statyczne biblioteki cogl. | |
a8e45d23 | 134 | |
3b3536d4 JB |
135 | %package doc |
136 | Summary: API documentation for cogl | |
137 | Summary(pl.UTF-8): Dokumentacja API cogl | |
a8e45d23 | 138 | Group: Documentation |
a8e45d23 | 139 | |
3b3536d4 JB |
140 | %description doc |
141 | This package contains API documentation for cogl. | |
142 | ||
143 | %description doc -l pl.UTF-8 | |
144 | Ten pakiet zawiera dokumentację API cogl. | |
a8e45d23 | 145 | |
646b7883 JB |
146 | %package gles2 |
147 | Summary: Cogl frontend library for OpenGL-ES 2.0 | |
148 | Summary(pl.UTF-8): Biblioteka frontendowa Cogl dla OpenGL-ES 2.0 | |
149 | Group: Libraries | |
502bb6a5 | 150 | Requires: %{name}(gles2) = %{version}-%{release} |
646b7883 JB |
151 | |
152 | %description gles2 | |
153 | Cogl frontend library for OpenGL-ES 2.0. | |
154 | ||
155 | %description gles2 -l pl.UTF-8 | |
156 | Biblioteka frontendowa Cogl dla OpenGL-ES 2.0. | |
157 | ||
158 | %package gles2-devel | |
159 | Summary: Header files for cogl-gles2 library | |
160 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gles2 | |
161 | Group: Development/Libraries | |
502bb6a5 | 162 | Requires: %{name}-devel(gles2) = %{version}-%{release} |
646b7883 JB |
163 | Requires: %{name}-gles2 = %{version}-%{release} |
164 | ||
165 | %description gles2-devel | |
166 | Header files for cogl-gles2 library. | |
167 | ||
168 | %description gles2-devel -l pl.UTF-8 | |
169 | Pliki nagłówkowe biblioteki cogl-gles2. | |
170 | ||
171 | %package gles2-static | |
172 | Summary: Static cogl-gles2 library | |
173 | Summary(pl.UTF-8): Statyczna biblioteka cogl-gles2 | |
174 | Group: Development/Libraries | |
502bb6a5 | 175 | Requires: %{name}-gles2-devel = %{version}-%{release} |
646b7883 JB |
176 | |
177 | %description gles2-static | |
178 | Static cogl-gles2 library. | |
179 | ||
180 | %description gles2-static -l pl.UTF-8 | |
181 | Statyczna biblioteka cogl-gles2. | |
182 | ||
f877413a JB |
183 | %package gst |
184 | Summary: GStreamer integration library for Cogl | |
185 | Summary(pl.UTF-8): Biblioteka integrująca GStreamera z Cogl | |
186 | Group: Libraries | |
187 | Requires: %{name} = %{version}-%{release} | |
188 | ||
189 | %description gst | |
190 | GStreamer integration library for Cogl. | |
191 | ||
192 | %description gst -l pl.UTF-8 | |
193 | Biblioteka integrująca GStreamera z Cogl. | |
194 | ||
195 | %package gst-devel | |
196 | Summary: Header files for cogl-gst library | |
197 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gst | |
198 | Group: Development/Libraries | |
199 | Requires: %{name}-devel = %{version}-%{release} | |
200 | Requires: %{name}-gst = %{version}-%{release} | |
201 | Requires: gstreamer-devel >= 1.0 | |
202 | Requires: gstreamer-plugins-base-devel >= 1.0 | |
203 | ||
204 | %description gst-devel | |
205 | Header files for cogl-gst library. | |
206 | ||
207 | %description gst-devel -l pl.UTF-8 | |
208 | Pliki nagłówkowe biblioteki cogl-gst. | |
209 | ||
210 | %package gst-static | |
211 | Summary: Static cogl-gst library | |
212 | Summary(pl.UTF-8): Statyczna biblioteka cogl-gst | |
213 | Group: Development/Libraries | |
214 | Requires: %{name}-gst-devel = %{version}-%{release} | |
215 | ||
216 | %description gst-static | |
217 | Static cogl-gst library. | |
218 | ||
219 | %description gst-static -l pl.UTF-8 | |
220 | Statyczna biblioteka cogl-gst. | |
221 | ||
222 | %package gst-apidocs | |
223 | Summary: API documentation for cogl-gst library | |
224 | Summary(pl.UTF-8): Dokumentacja API biblioteki cogl-gst | |
225 | Group: Documentation | |
43c35c42 ER |
226 | %if "%{_rpmversion}" >= "5" |
227 | BuildArch: noarch | |
228 | %endif | |
f877413a JB |
229 | |
230 | %description gst-apidocs | |
231 | API documentation for cogl-gst library. | |
232 | ||
233 | %description gst-apidocs -l pl.UTF-8 | |
234 | Dokumentacja API biblioteki cogl-gst. | |
235 | ||
a8e45d23 PZ |
236 | %prep |
237 | %setup -q | |
646b7883 | 238 | %patch0 -p1 |
a8e45d23 PZ |
239 | |
240 | %build | |
aedf1bd3 JB |
241 | %{__gettextize} |
242 | %{__libtoolize} | |
243 | %{__aclocal} -I build/autotools | |
244 | %{__autoconf} | |
245 | %{__autoheader} | |
246 | %{__automake} | |
a8e45d23 | 247 | %configure \ |
bfeaf83d | 248 | %{!?with_gdkpixbuf:--disable-gdk-pixbuf} \ |
3b3536d4 JB |
249 | --disable-silent-rules \ |
250 | --enable-cairo \ | |
f877413a | 251 | %{?with_gstreamer:--enable-cogl-gst} \ |
3b3536d4 | 252 | --enable-cogl-pango \ |
646b7883 JB |
253 | %{?with_gles1:--enable-gles1 --with-gles1-libname=libGLESv1_CM.so.1} \ |
254 | %{?with_gles2:--enable-gles2 --with-gles2-libname=libGLESv2.so.2} \ | |
3b3536d4 | 255 | --enable-glx \ |
a8e45d23 | 256 | --enable-gtk-doc \ |
3b3536d4 | 257 | --enable-introspection \ |
b0b44050 | 258 | --enable-kms-egl-platform \ |
ce061459 JB |
259 | %{?with_mir:--enable-mir-egl-platform} \ |
260 | %{?with_sdl1:--enable-sdl} \ | |
261 | %{?with_sdl2:--enable-sdl2} \ | |
3b3536d4 | 262 | %{?with_static_libs:--enable-static} \ |
f877413a JB |
263 | %{?with_wayland:--enable-wayland-egl-platform} \ |
264 | %{?with_wayland:--enable-wayland-egl-server} \ | |
f05709a8 | 265 | --enable-xlib-egl-platform \ |
a8e45d23 PZ |
266 | --with-html-dir=%{_gtkdocdir} |
267 | %{__make} | |
268 | ||
269 | %install | |
270 | rm -rf $RPM_BUILD_ROOT | |
3b3536d4 | 271 | |
611aea59 | 272 | %{__make} -j1 install \ |
a8e45d23 PZ |
273 | DESTDIR=$RPM_BUILD_ROOT |
274 | ||
f877413a JB |
275 | %if %{with gstreamer} |
276 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.la | |
277 | %if %{with static_libs} | |
278 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.a | |
279 | %endif | |
280 | %endif | |
3b3536d4 | 281 | # obsoleted by pkg-config |
f877413a | 282 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcogl*.la |
a8e45d23 PZ |
283 | |
284 | %find_lang %{name} | |
285 | ||
3b3536d4 JB |
286 | %clean |
287 | rm -rf $RPM_BUILD_ROOT | |
a8e45d23 | 288 | |
3b3536d4 JB |
289 | %post -p /sbin/ldconfig |
290 | %postun -p /sbin/ldconfig | |
a8e45d23 | 291 | |
646b7883 JB |
292 | %post gles2 -p /sbin/ldconfig |
293 | %postun gles2 -p /sbin/ldconfig | |
294 | ||
295 | %post gst -p /sbin/ldconfig | |
296 | %postun gst -p /sbin/ldconfig | |
297 | ||
a8e45d23 PZ |
298 | %files -f %{name}.lang |
299 | %defattr(644,root,root,755) | |
3b3536d4 | 300 | %doc ChangeLog NEWS README |
a8e45d23 | 301 | %attr(755,root,root) %{_libdir}/libcogl.so.*.*.* |
e3b17614 | 302 | %attr(755,root,root) %ghost %{_libdir}/libcogl.so.20 |
a8e45d23 | 303 | %attr(755,root,root) %{_libdir}/libcogl-pango.so.*.*.* |
e3b17614 | 304 | %attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.20 |
07fb2d8c JR |
305 | %attr(755,root,root) %{_libdir}/libcogl-path.so.*.*.* |
306 | %attr(755,root,root) %ghost %{_libdir}/libcogl-path.so.20 | |
a8e45d23 PZ |
307 | %{_libdir}/girepository-1.0/Cogl-1.0.typelib |
308 | %{_libdir}/girepository-1.0/CoglPango-1.0.typelib | |
aa9131ed AM |
309 | %{_libdir}/girepository-1.0/Cogl-2.0.typelib |
310 | %{_libdir}/girepository-1.0/CoglPango-2.0.typelib | |
a8e45d23 PZ |
311 | |
312 | %files devel | |
313 | %defattr(644,root,root,755) | |
3b3536d4 JB |
314 | %attr(755,root,root) %{_libdir}/libcogl.so |
315 | %attr(755,root,root) %{_libdir}/libcogl-pango.so | |
07fb2d8c | 316 | %attr(755,root,root) %{_libdir}/libcogl-path.so |
f877413a JB |
317 | %dir %{_includedir}/cogl |
318 | %{_includedir}/cogl/cogl | |
319 | %{_includedir}/cogl/cogl-pango | |
320 | %{_includedir}/cogl/cogl-path | |
a8e45d23 PZ |
321 | %{_pkgconfigdir}/cogl-1.0.pc |
322 | %{_pkgconfigdir}/cogl-2.0-experimental.pc | |
323 | %{_pkgconfigdir}/cogl-gl-1.0.pc | |
324 | %{_pkgconfigdir}/cogl-pango-1.0.pc | |
325 | %{_pkgconfigdir}/cogl-pango-2.0-experimental.pc | |
07fb2d8c JR |
326 | %{_pkgconfigdir}/cogl-path-1.0.pc |
327 | %{_pkgconfigdir}/cogl-path-2.0-experimental.pc | |
a8e45d23 PZ |
328 | %{_datadir}/gir-1.0/Cogl-1.0.gir |
329 | %{_datadir}/gir-1.0/CoglPango-1.0.gir | |
aa9131ed AM |
330 | %{_datadir}/gir-1.0/Cogl-2.0.gir |
331 | %{_datadir}/gir-1.0/CoglPango-2.0.gir | |
a8e45d23 | 332 | |
3b3536d4 JB |
333 | %if %{with static_libs} |
334 | %files static | |
335 | %defattr(644,root,root,755) | |
336 | %{_libdir}/libcogl.a | |
337 | %{_libdir}/libcogl-pango.a | |
07fb2d8c | 338 | %{_libdir}/libcogl-path.a |
3b3536d4 JB |
339 | %endif |
340 | ||
a8e45d23 PZ |
341 | %files doc |
342 | %defattr(644,root,root,755) | |
343 | %{_gtkdocdir}/cogl | |
344 | %{_gtkdocdir}/cogl-2.0-experimental | |
f877413a | 345 | |
646b7883 JB |
346 | %if %{with gles2} |
347 | %files gles2 | |
348 | %defattr(644,root,root,755) | |
349 | %attr(755,root,root) %{_libdir}/libcogl-gles2.so.*.*.* | |
e3b17614 | 350 | %attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.20 |
646b7883 JB |
351 | |
352 | %files gles2-devel | |
353 | %defattr(644,root,root,755) | |
354 | %attr(755,root,root) %{_libdir}/libcogl-gles2.so | |
355 | %{_includedir}/cogl/cogl-gles2 | |
07fb2d8c JR |
356 | %{_pkgconfigdir}/cogl-gles2-1.0.pc |
357 | %{_pkgconfigdir}/cogl-gles2-2.0-experimental.pc | |
646b7883 JB |
358 | |
359 | %if %{with static_libs} | |
360 | %files gles2-static | |
361 | %defattr(644,root,root,755) | |
362 | %{_libdir}/libcogl-gles2.a | |
363 | %endif | |
364 | %endif | |
365 | ||
f877413a JB |
366 | %if %{with gstreamer} |
367 | %files gst | |
368 | %defattr(644,root,root,755) | |
369 | %attr(755,root,root) %{_libdir}/libcogl-gst.so.*.*.* | |
e3b17614 | 370 | %attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.20 |
f877413a | 371 | %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstcogl.so |
aa9131ed AM |
372 | %{_libdir}/girepository-1.0/CoglGst-2.0.typelib |
373 | ||
f877413a JB |
374 | %files gst-devel |
375 | %defattr(644,root,root,755) | |
376 | %attr(755,root,root) %{_libdir}/libcogl-gst.so | |
377 | %{_includedir}/cogl/cogl-gst | |
07fb2d8c JR |
378 | %{_pkgconfigdir}/cogl-gst-1.0.pc |
379 | %{_pkgconfigdir}/cogl-gst-2.0-experimental.pc | |
aa9131ed | 380 | %{_datadir}/gir-1.0/CoglGst-2.0.gir |
f877413a JB |
381 | |
382 | %if %{with static_libs} | |
383 | %files gst-static | |
384 | %defattr(644,root,root,755) | |
385 | %{_libdir}/libcogl-gst.a | |
386 | %endif | |
387 | ||
388 | %files gst-apidocs | |
389 | %defattr(644,root,root,755) | |
390 | %{_gtkdocdir}/cogl-gst | |
391 | %endif |