# Conditional build
%bcond_without static_libs # static libraries
%bcond_without gdkpixbuf # gdk-pixbuf for image loading [instead of stb_image]
-%bcond_without gles1 # OpenGL-ES 1.1 support
-%bcond_without gles2 # OpenGL-ES 2.0 support
+%bcond_without gles1 # OpenGL-ES 1.1 driver support
+%bcond_without gles2 # OpenGL-ES 2.0 driver support
+%bcond_without kms # KMS EGL platform support
%bcond_without gstreamer # GStreamer support
-%bcond_without wayland # Wayland EGL support
-#
+%bcond_with mir # Mir EGL platform support (conflicts with wayland)
+%bcond_with sdl1 # SDL 1.x winsys support (conflicts with sdl2)
+%bcond_with sdl2 # SDL2 winsys support (conflicts with sdl1)
+%bcond_without wayland # Wayland EGL platform and server support
+
Summary: A library for using 3D graphics hardware to draw pretty pictures
Summary(pl.UTF-8): Biblioteka do rysowania ładnych obrazków przy użyciu sprzętowej grafiki 3D
Name: cogl
-Version: 1.16.0
-Release: 2
+Version: 1.22.8
+Release: 1
License: LGPL v2+
Group: Libraries
-Source0: http://ftp.gnome.org/pub/GNOME/sources/cogl/1.16/%{name}-%{version}.tar.xz
-# Source0-md5: 611a61bed04354cbfffa3dc27feb6d4f
+Source0: https://download.gnome.org/sources/cogl/1.22/%{name}-%{version}.tar.xz
+# Source0-md5: 7dd8b2e24171ef7399f851cea144b569
Patch0: %{name}-link.patch
URL: http://www.clutter-project.org/
-%{?with_wayland:BuildRequires: EGL-devel}
-%{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel >= 1.0.0}
-%{?with_gles1:BuildRequires: OpenGLESv1-devel >= 1.1}
+BuildRequires: EGL-devel
+BuildRequires: Mesa-libEGL-devel
+%{?with_kms:BuildRequires: Mesa-libgbm-devel}
BuildRequires: OpenGL-GLX-devel
+%{?with_gles1:BuildRequires: OpenGLESv1-devel >= 1.1}
+%{?with_sdl1:BuildRequires: SDL-devel >= 1.2}
+%{?with_sdl2:BuildRequires: SDL2-devel >= 2}
BuildRequires: autoconf >= 2.59
-BuildRequires: automake >= 1:1.11
+BuildRequires: automake >= 1:1.14
BuildRequires: cairo-devel >= 1.10
%{?with_gdkpixbuf:BuildRequires: gdk-pixbuf2-devel >= 2.0}
-BuildRequires: gettext-devel >= 0.18.1
+BuildRequires: gettext-tools >= 0.19
BuildRequires: glib2-devel >= 1:2.32.0
BuildRequires: gobject-introspection-devel >= 0.9.5
%{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
BuildRequires: gtk-doc >= 1.13
BuildRequires: libdrm-devel
BuildRequires: libtool >= 2:2.2.6
+# pkgconfig(mirclient)
+%{?with_mir:BuildRequires: mir-devel >= 0.9.0}
BuildRequires: pango-devel >= 1:1.20
BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
BuildRequires: tar >= 1:1.22
# wayland-client >= 1.0.0, wayland-server >= 1.1.90
%{?with_wayland:BuildRequires: wayland-devel >= 1.2.0}
+%{?with_wayland:BuildRequires: wayland-egl-devel >= 1.0.0}
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXcomposite-devel >= 0.4
BuildRequires: xorg-lib-libXdamage-devel
Requires: xorg-lib-libXfixes >= 3
Requires: xorg-lib-libXrandr >= 1.2
Suggests: OpenGL
+%{?with_gles1:Provides: cogl(gles1) = %{version}-%{release}}
+%{?with_gles2:Provides: cogl(gles2) = %{version}-%{release}}
+%{?with_kms:Provides: cogl(kms) = %{version}-%{release}}
+%{?with_wayland:Provides: cogl(wayland) = %{version}-%{release}}
Conflicts: clutter < 1.8.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%{?with_wayland:Requires: EGL-devel}
-%{?with_wayland:Requires: Mesa-libwayland-egl-devel >= 1.0.0}
+%{?with_kms:Requires: Mesa-libgbm-devel}
+%{?with_wayland:Requires: wayland-egl-devel >= 1.0.0}
Requires: cairo-devel >= 1.10
%{?with_gdkpixbuf:Requires: gdk-pixbuf2-devel >= 2.0}
Requires: glib2-devel >= 1:2.32.0
Requires: xorg-lib-libXext-devel
Requires: xorg-lib-libXfixes-devel >= 3
Requires: xorg-lib-libXrandr-devel >= 1.2
+%{?with_gles1:Provides: cogl-devel(gles1) = %{version}-%{release}}
+%{?with_gles2:Provides: cogl-devel(gles2) = %{version}-%{release}}
+%{?with_kms:Provides: cogl-devel(kms) = %{version}-%{release}}
+%{?with_wayland:Provides: cogl-devel(wayland) = %{version}-%{release}}
Conflicts: clutter-devel < 1.8.0
%description devel
Summary(pl.UTF-8): Statyczne biblioteki cogl
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
+%{?with_gles1:Provides: cogl-static(gles1) = %{version}-%{release}}
+%{?with_gles2:Provides: cogl-static(gles2) = %{version}-%{release}}
+%{?with_kms:Provides: cogl-static(kms) = %{version}-%{release}}
+%{?with_wayland:Provides: cogl-static(wayland) = %{version}-%{release}}
Conflicts: clutter-static < 1.8.0
%description static
Summary: Cogl frontend library for OpenGL-ES 2.0
Summary(pl.UTF-8): Biblioteka frontendowa Cogl dla OpenGL-ES 2.0
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}(gles2) = %{version}-%{release}
%description gles2
Cogl frontend library for OpenGL-ES 2.0.
Summary: Header files for cogl-gles2 library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gles2
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-devel(gles2) = %{version}-%{release}
Requires: %{name}-gles2 = %{version}-%{release}
%description gles2-devel
Summary: Static cogl-gles2 library
Summary(pl.UTF-8): Statyczna biblioteka cogl-gles2
Group: Development/Libraries
-Requires: %{name}-gst-devel = %{version}-%{release}
+Requires: %{name}-gles2-devel = %{version}-%{release}
%description gles2-static
Static cogl-gles2 library.
Summary: API documentation for cogl-gst library
Summary(pl.UTF-8): Dokumentacja API biblioteki cogl-gst
Group: Documentation
+BuildArch: noarch
%description gst-apidocs
API documentation for cogl-gst library.
--enable-glx \
--enable-gtk-doc \
--enable-introspection \
+ --enable-kms-egl-platform \
+ %{?with_mir:--enable-mir-egl-platform} \
+ %{?with_sdl1:--enable-sdl} \
+ %{?with_sdl2:--enable-sdl2} \
%{?with_static_libs:--enable-static} \
%{?with_wayland:--enable-wayland-egl-platform} \
%{?with_wayland:--enable-wayland-egl-server} \
+ --enable-xlib-egl-platform \
--with-html-dir=%{_gtkdocdir}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
%if %{with gstreamer}
%defattr(644,root,root,755)
%doc ChangeLog NEWS README
%attr(755,root,root) %{_libdir}/libcogl.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libcogl.so.15
+%attr(755,root,root) %ghost %{_libdir}/libcogl.so.20
%attr(755,root,root) %{_libdir}/libcogl-pango.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.15
+%attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.20
+%attr(755,root,root) %{_libdir}/libcogl-path.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcogl-path.so.20
%{_libdir}/girepository-1.0/Cogl-1.0.typelib
%{_libdir}/girepository-1.0/CoglPango-1.0.typelib
+%{_libdir}/girepository-1.0/Cogl-2.0.typelib
+%{_libdir}/girepository-1.0/CoglPango-2.0.typelib
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcogl.so
%attr(755,root,root) %{_libdir}/libcogl-pango.so
+%attr(755,root,root) %{_libdir}/libcogl-path.so
%dir %{_includedir}/cogl
%{_includedir}/cogl/cogl
%{_includedir}/cogl/cogl-pango
%{_pkgconfigdir}/cogl-gl-1.0.pc
%{_pkgconfigdir}/cogl-pango-1.0.pc
%{_pkgconfigdir}/cogl-pango-2.0-experimental.pc
+%{_pkgconfigdir}/cogl-path-1.0.pc
+%{_pkgconfigdir}/cogl-path-2.0-experimental.pc
%{_datadir}/gir-1.0/Cogl-1.0.gir
%{_datadir}/gir-1.0/CoglPango-1.0.gir
+%{_datadir}/gir-1.0/Cogl-2.0.gir
+%{_datadir}/gir-1.0/CoglPango-2.0.gir
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libcogl.a
%{_libdir}/libcogl-pango.a
+%{_libdir}/libcogl-path.a
%endif
%files doc
%files gles2
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcogl-gles2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.15
+%attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.20
%files gles2-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcogl-gles2.so
%{_includedir}/cogl/cogl-gles2
-%{_pkgconfigdir}/cogl-gles2-experimental.pc
+%{_pkgconfigdir}/cogl-gles2-1.0.pc
+%{_pkgconfigdir}/cogl-gles2-2.0-experimental.pc
%if %{with static_libs}
%files gles2-static
%files gst
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcogl-gst.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.15
+%attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.20
%attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstcogl.so
+%{_libdir}/girepository-1.0/CoglGst-2.0.typelib
%files gst-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcogl-gst.so
%{_includedir}/cogl/cogl-gst
-%{_pkgconfigdir}/cogl-gst.pc
+%{_pkgconfigdir}/cogl-gst-1.0.pc
+%{_pkgconfigdir}/cogl-gst-2.0-experimental.pc
+%{_datadir}/gir-1.0/CoglGst-2.0.gir
%if %{with static_libs}
%files gst-static