3 %bcond_without static_libs # static libraries
4 %bcond_without gdkpixbuf # gdk-pixbuf for image loading [instead of stb_image]
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
8 %bcond_without gstreamer # GStreamer support
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
14 Summary: A library for using 3D graphics hardware to draw pretty pictures
15 Summary(pl.UTF-8): Biblioteka do rysowania ładnych obrazków przy użyciu sprzętowej grafiki 3D
21 Source0: https://download.gnome.org/sources/cogl/1.22/%{name}-%{version}.tar.xz
22 # Source0-md5: 7dd8b2e24171ef7399f851cea144b569
23 Patch0: %{name}-link.patch
24 URL: http://www.clutter-project.org/
25 BuildRequires: EGL-devel
26 BuildRequires: Mesa-libEGL-devel
27 %{?with_kms:BuildRequires: Mesa-libgbm-devel}
28 BuildRequires: OpenGL-GLX-devel
29 %{?with_gles1:BuildRequires: OpenGLESv1-devel >= 1.1}
30 %{?with_sdl1:BuildRequires: SDL-devel >= 1.2}
31 %{?with_sdl2:BuildRequires: SDL2-devel >= 2}
32 BuildRequires: autoconf >= 2.59
33 BuildRequires: automake >= 1:1.14
34 BuildRequires: cairo-devel >= 1.10
35 %{?with_gdkpixbuf:BuildRequires: gdk-pixbuf2-devel >= 2.0}
36 BuildRequires: gettext-tools >= 0.19
37 BuildRequires: glib2-devel >= 1:2.32.0
38 BuildRequires: gobject-introspection-devel >= 0.9.5
39 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
40 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
41 BuildRequires: gtk-doc >= 1.13
42 BuildRequires: libdrm-devel
43 BuildRequires: libtool >= 2:2.2.6
44 # pkgconfig(mirclient)
45 %{?with_mir:BuildRequires: mir-devel >= 0.9.0}
46 BuildRequires: pango-devel >= 1:1.20
47 BuildRequires: pkgconfig
48 BuildRequires: tar >= 1:1.22
49 # wayland-client >= 1.0.0, wayland-server >= 1.1.90
50 %{?with_wayland:BuildRequires: wayland-devel >= 1.2.0}
51 %{?with_wayland:BuildRequires: wayland-egl-devel >= 1.0.0}
52 BuildRequires: xorg-lib-libX11-devel
53 BuildRequires: xorg-lib-libXcomposite-devel >= 0.4
54 BuildRequires: xorg-lib-libXdamage-devel
55 BuildRequires: xorg-lib-libXext-devel
56 BuildRequires: xorg-lib-libXfixes-devel >= 3
57 BuildRequires: xorg-lib-libXrandr-devel >= 1.2
59 Requires: cairo >= 1.10
60 Requires: glib2 >= 1:2.32.0
61 Requires: pango >= 1:1.20
62 %{?with_wayland:Requires: wayland >= 1.2.0}
63 Requires: xorg-lib-libXcomposite >= 0.4
64 Requires: xorg-lib-libXfixes >= 3
65 Requires: xorg-lib-libXrandr >= 1.2
67 %{?with_gles1:Provides: cogl(gles1) = %{version}-%{release}}
68 %{?with_gles2:Provides: cogl(gles2) = %{version}-%{release}}
69 %{?with_kms:Provides: cogl(kms) = %{version}-%{release}}
70 %{?with_wayland:Provides: cogl(wayland) = %{version}-%{release}}
71 Conflicts: clutter < 1.8.0
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 Cogl is a small open source library for using 3D graphics hardware to
76 draw pretty pictures. The API departs from the flat state machine
77 style of OpenGL and is designed to make it easy to write orthogonal
78 components that can render without stepping on each others toes.
80 %description -l pl.UTF-8
81 Cogl to mała biblioteka o otwartych źródłach, pozwalająca na rysowanie
82 ładnych rysunków przy użyciu sprzętu graficznego 3D. API wywodzi się z
83 automatu skończonego w stylu OpenGL i zostało tak zaprojektowane, aby
84 ułatwić pisanie ortogonalnych komponentów, potrafiących renderować bez
85 przeszkadzania sobie nawzajem.
88 Summary: Header files for cogl library
89 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl
90 Group: Development/Libraries
91 Requires: %{name} = %{version}-%{release}
92 %{?with_wayland:Requires: EGL-devel}
93 %{?with_kms:Requires: Mesa-libgbm-devel}
94 %{?with_wayland:Requires: wayland-egl-devel >= 1.0.0}
95 Requires: cairo-devel >= 1.10
96 %{?with_gdkpixbuf:Requires: gdk-pixbuf2-devel >= 2.0}
97 Requires: glib2-devel >= 1:2.32.0
98 Requires: gobject-introspection-devel >= 0.9.5
99 Requires: libdrm-devel
100 Requires: pango-devel >= 1:1.20
101 %{?with_wayland:Requires: wayland-devel >= 1.2.0}
102 Requires: xorg-lib-libXcomposite-devel >= 0.4
103 Requires: xorg-lib-libXdamage-devel
104 Requires: xorg-lib-libXext-devel
105 Requires: xorg-lib-libXfixes-devel >= 3
106 Requires: xorg-lib-libXrandr-devel >= 1.2
107 %{?with_gles1:Provides: cogl-devel(gles1) = %{version}-%{release}}
108 %{?with_gles2:Provides: cogl-devel(gles2) = %{version}-%{release}}
109 %{?with_kms:Provides: cogl-devel(kms) = %{version}-%{release}}
110 %{?with_wayland:Provides: cogl-devel(wayland) = %{version}-%{release}}
111 Conflicts: clutter-devel < 1.8.0
114 Header files for building and developing applications with cogl.
116 %description devel -l pl.UTF-8
117 Pliki nagłówkowe do tworzenia aplikacji z użyciem biblioteki cogl.
120 Summary: Static cogl libraries
121 Summary(pl.UTF-8): Statyczne biblioteki cogl
122 Group: Development/Libraries
123 Requires: %{name}-devel = %{version}-%{release}
124 %{?with_gles1:Provides: cogl-static(gles1) = %{version}-%{release}}
125 %{?with_gles2:Provides: cogl-static(gles2) = %{version}-%{release}}
126 %{?with_kms:Provides: cogl-static(kms) = %{version}-%{release}}
127 %{?with_wayland:Provides: cogl-static(wayland) = %{version}-%{release}}
128 Conflicts: clutter-static < 1.8.0
131 Static cogl libraries.
133 %description static -l pl.UTF-8
134 Statyczne biblioteki cogl.
137 Summary: API documentation for cogl
138 Summary(pl.UTF-8): Dokumentacja API cogl
142 This package contains API documentation for cogl.
144 %description doc -l pl.UTF-8
145 Ten pakiet zawiera dokumentację API cogl.
148 Summary: Cogl frontend library for OpenGL-ES 2.0
149 Summary(pl.UTF-8): Biblioteka frontendowa Cogl dla OpenGL-ES 2.0
151 Requires: %{name}(gles2) = %{version}-%{release}
154 Cogl frontend library for OpenGL-ES 2.0.
156 %description gles2 -l pl.UTF-8
157 Biblioteka frontendowa Cogl dla OpenGL-ES 2.0.
160 Summary: Header files for cogl-gles2 library
161 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gles2
162 Group: Development/Libraries
163 Requires: %{name}-devel(gles2) = %{version}-%{release}
164 Requires: %{name}-gles2 = %{version}-%{release}
166 %description gles2-devel
167 Header files for cogl-gles2 library.
169 %description gles2-devel -l pl.UTF-8
170 Pliki nagłówkowe biblioteki cogl-gles2.
172 %package gles2-static
173 Summary: Static cogl-gles2 library
174 Summary(pl.UTF-8): Statyczna biblioteka cogl-gles2
175 Group: Development/Libraries
176 Requires: %{name}-gles2-devel = %{version}-%{release}
178 %description gles2-static
179 Static cogl-gles2 library.
181 %description gles2-static -l pl.UTF-8
182 Statyczna biblioteka cogl-gles2.
185 Summary: GStreamer integration library for Cogl
186 Summary(pl.UTF-8): Biblioteka integrująca GStreamera z Cogl
188 Requires: %{name} = %{version}-%{release}
191 GStreamer integration library for Cogl.
193 %description gst -l pl.UTF-8
194 Biblioteka integrująca GStreamera z Cogl.
197 Summary: Header files for cogl-gst library
198 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gst
199 Group: Development/Libraries
200 Requires: %{name}-devel = %{version}-%{release}
201 Requires: %{name}-gst = %{version}-%{release}
202 Requires: gstreamer-devel >= 1.0
203 Requires: gstreamer-plugins-base-devel >= 1.0
205 %description gst-devel
206 Header files for cogl-gst library.
208 %description gst-devel -l pl.UTF-8
209 Pliki nagłówkowe biblioteki cogl-gst.
212 Summary: Static cogl-gst library
213 Summary(pl.UTF-8): Statyczna biblioteka cogl-gst
214 Group: Development/Libraries
215 Requires: %{name}-gst-devel = %{version}-%{release}
217 %description gst-static
218 Static cogl-gst library.
220 %description gst-static -l pl.UTF-8
221 Statyczna biblioteka cogl-gst.
224 Summary: API documentation for cogl-gst library
225 Summary(pl.UTF-8): Dokumentacja API biblioteki cogl-gst
229 %description gst-apidocs
230 API documentation for cogl-gst library.
232 %description gst-apidocs -l pl.UTF-8
233 Dokumentacja API biblioteki cogl-gst.
242 %{__aclocal} -I build/autotools
247 %{!?with_gdkpixbuf:--disable-gdk-pixbuf} \
248 --disable-silent-rules \
250 %{?with_gstreamer:--enable-cogl-gst} \
251 --enable-cogl-pango \
252 %{?with_gles1:--enable-gles1 --with-gles1-libname=libGLESv1_CM.so.1} \
253 %{?with_gles2:--enable-gles2 --with-gles2-libname=libGLESv2.so.2} \
256 --enable-introspection \
257 --enable-kms-egl-platform \
258 %{?with_mir:--enable-mir-egl-platform} \
259 %{?with_sdl1:--enable-sdl} \
260 %{?with_sdl2:--enable-sdl2} \
261 %{?with_static_libs:--enable-static} \
262 %{?with_wayland:--enable-wayland-egl-platform} \
263 %{?with_wayland:--enable-wayland-egl-server} \
264 --enable-xlib-egl-platform \
265 --with-html-dir=%{_gtkdocdir}
269 rm -rf $RPM_BUILD_ROOT
271 %{__make} -j1 install \
272 DESTDIR=$RPM_BUILD_ROOT
274 %if %{with gstreamer}
275 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.la
276 %if %{with static_libs}
277 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.a
280 # obsoleted by pkg-config
281 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcogl*.la
286 rm -rf $RPM_BUILD_ROOT
288 %post -p /sbin/ldconfig
289 %postun -p /sbin/ldconfig
291 %post gles2 -p /sbin/ldconfig
292 %postun gles2 -p /sbin/ldconfig
294 %post gst -p /sbin/ldconfig
295 %postun gst -p /sbin/ldconfig
297 %files -f %{name}.lang
298 %defattr(644,root,root,755)
299 %doc ChangeLog NEWS README
300 %attr(755,root,root) %{_libdir}/libcogl.so.*.*.*
301 %attr(755,root,root) %ghost %{_libdir}/libcogl.so.20
302 %attr(755,root,root) %{_libdir}/libcogl-pango.so.*.*.*
303 %attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.20
304 %attr(755,root,root) %{_libdir}/libcogl-path.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libcogl-path.so.20
306 %{_libdir}/girepository-1.0/Cogl-1.0.typelib
307 %{_libdir}/girepository-1.0/CoglPango-1.0.typelib
308 %{_libdir}/girepository-1.0/Cogl-2.0.typelib
309 %{_libdir}/girepository-1.0/CoglPango-2.0.typelib
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_libdir}/libcogl.so
314 %attr(755,root,root) %{_libdir}/libcogl-pango.so
315 %attr(755,root,root) %{_libdir}/libcogl-path.so
316 %dir %{_includedir}/cogl
317 %{_includedir}/cogl/cogl
318 %{_includedir}/cogl/cogl-pango
319 %{_includedir}/cogl/cogl-path
320 %{_pkgconfigdir}/cogl-1.0.pc
321 %{_pkgconfigdir}/cogl-2.0-experimental.pc
322 %{_pkgconfigdir}/cogl-gl-1.0.pc
323 %{_pkgconfigdir}/cogl-pango-1.0.pc
324 %{_pkgconfigdir}/cogl-pango-2.0-experimental.pc
325 %{_pkgconfigdir}/cogl-path-1.0.pc
326 %{_pkgconfigdir}/cogl-path-2.0-experimental.pc
327 %{_datadir}/gir-1.0/Cogl-1.0.gir
328 %{_datadir}/gir-1.0/CoglPango-1.0.gir
329 %{_datadir}/gir-1.0/Cogl-2.0.gir
330 %{_datadir}/gir-1.0/CoglPango-2.0.gir
332 %if %{with static_libs}
334 %defattr(644,root,root,755)
336 %{_libdir}/libcogl-pango.a
337 %{_libdir}/libcogl-path.a
341 %defattr(644,root,root,755)
343 %{_gtkdocdir}/cogl-2.0-experimental
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libcogl-gles2.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.20
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_libdir}/libcogl-gles2.so
354 %{_includedir}/cogl/cogl-gles2
355 %{_pkgconfigdir}/cogl-gles2-1.0.pc
356 %{_pkgconfigdir}/cogl-gles2-2.0-experimental.pc
358 %if %{with static_libs}
360 %defattr(644,root,root,755)
361 %{_libdir}/libcogl-gles2.a
365 %if %{with gstreamer}
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_libdir}/libcogl-gst.so.*.*.*
369 %attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.20
370 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstcogl.so
371 %{_libdir}/girepository-1.0/CoglGst-2.0.typelib
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_libdir}/libcogl-gst.so
376 %{_includedir}/cogl/cogl-gst
377 %{_pkgconfigdir}/cogl-gst-1.0.pc
378 %{_pkgconfigdir}/cogl-gst-2.0-experimental.pc
379 %{_datadir}/gir-1.0/CoglGst-2.0.gir
381 %if %{with static_libs}
383 %defattr(644,root,root,755)
384 %{_libdir}/libcogl-gst.a
388 %defattr(644,root,root,755)
389 %{_gtkdocdir}/cogl-gst