From e27fdc877a10f0071dcb44f06f6512bb011c450a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 22 2019 23:46:40 +0000 Subject: import cogl-1.22.2-2.el7 --- diff --git a/.cogl.metadata b/.cogl.metadata new file mode 100644 index 0000000..755dde2 --- /dev/null +++ b/.cogl.metadata @@ -0,0 +1 @@ +75f464d5156feb1b6c1fb553d543691711ff01a2 SOURCES/cogl-1.22.2.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5d1e52 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/cogl-1.22.2.tar.xz diff --git a/SOURCES/0001-egl-Use-eglGetPlatformDisplay-not-eglGetDisplay.patch b/SOURCES/0001-egl-Use-eglGetPlatformDisplay-not-eglGetDisplay.patch new file mode 100644 index 0000000..a507b2a --- /dev/null +++ b/SOURCES/0001-egl-Use-eglGetPlatformDisplay-not-eglGetDisplay.patch @@ -0,0 +1,117 @@ +From 988e021960eb372be50038fdf0b2874f063c02b6 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 11 Oct 2016 16:16:38 -0400 +Subject: [PATCH] egl: Use eglGetPlatformDisplay not eglGetDisplay + +The latter requires the implementation to guess which kind of display it +is. Different implementations do different thing, in particular glvnd +does something different from Mesa, and it's better to be explicit about +what we need. + +Signed-off-by: Adam Jackson +--- + cogl/cogl-egl.h | 1 - + cogl/winsys/cogl-winsys-egl-kms.c | 3 ++- + cogl/winsys/cogl-winsys-egl-private.h | 33 +++++++++++++++++++++++++++++++++ + cogl/winsys/cogl-winsys-egl-wayland.c | 3 ++- + cogl/winsys/cogl-winsys-egl-x11.c | 2 +- + 5 files changed, 38 insertions(+), 4 deletions(-) + +diff --git a/cogl/cogl-egl.h b/cogl/cogl-egl.h +index cea7b10..5dac55f 100644 +--- a/cogl/cogl-egl.h ++++ b/cogl/cogl-egl.h +@@ -98,7 +98,6 @@ cogl_egl_context_get_egl_display (CoglContext *context); + EGLContext + cogl_egl_context_get_egl_context (CoglContext *context); + +- + COGL_END_DECLS + + /* The gobject introspection scanner seems to parse public headers in +diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c +index 4da1f14..ae9f6fc 100644 +--- a/cogl/winsys/cogl-winsys-egl-kms.c ++++ b/cogl/winsys/cogl-winsys-egl-kms.c +@@ -342,7 +342,8 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer, + goto fail; + } + +- egl_renderer->edpy = eglGetDisplay ((EGLNativeDisplayType)kms_renderer->gbm); ++ egl_renderer->edpy = cogl_winsys_egl_get_display(EGL_PLATFORM_GBM_KHR, ++ kms_renderer->gbm); + if (egl_renderer->edpy == EGL_NO_DISPLAY) + { + _cogl_set_error (error, COGL_WINSYS_ERROR, +diff --git a/cogl/winsys/cogl-winsys-egl-private.h b/cogl/winsys/cogl-winsys-egl-private.h +index 5d21b4f..27ac25c 100644 +--- a/cogl/winsys/cogl-winsys-egl-private.h ++++ b/cogl/winsys/cogl-winsys-egl-private.h +@@ -200,4 +200,37 @@ CoglBool + _cogl_winsys_egl_renderer_connect_common (CoglRenderer *renderer, + CoglError **error); + ++static inline EGLDisplay ++cogl_winsys_egl_get_display (EGLint type, void *native) ++{ ++ EGLDisplay dpy = NULL; ++ const char *client_exts = eglQueryString (NULL, EGL_EXTENSIONS); ++ ++ if (g_strstr_len (client_exts, -1, "EGL_KHR_platform_base")) ++ { ++ PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = ++ (void *) eglGetProcAddress ("eglGetPlatformDisplay"); ++ ++ if (get_platform_display) ++ dpy = get_platform_display (type, native, NULL); ++ ++ if (dpy) ++ return dpy; ++ } ++ ++ if (g_strstr_len (client_exts, -1, "EGL_EXT_platform_base")) ++ { ++ PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = ++ (void *) eglGetProcAddress ("eglGetPlatformDisplayEXT"); ++ ++ if (get_platform_display) ++ dpy = get_platform_display (type, native, NULL); ++ ++ if (dpy) ++ return dpy; ++ } ++ ++ return eglGetDisplay ((EGLNativeDisplayType) native); ++} ++ + #endif /* __COGL_WINSYS_EGL_PRIVATE_H */ +diff --git a/cogl/winsys/cogl-winsys-egl-wayland.c b/cogl/winsys/cogl-winsys-egl-wayland.c +index 2e22052..463041b 100644 +--- a/cogl/winsys/cogl-winsys-egl-wayland.c ++++ b/cogl/winsys/cogl-winsys-egl-wayland.c +@@ -289,7 +289,8 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer, + } + + egl_renderer->edpy = +- eglGetDisplay ((EGLNativeDisplayType) wayland_renderer->wayland_display); ++ cogl_winsys_egl_get_display (EGL_PLATFORM_WAYLAND_KHR, ++ wayland_renderer->wayland_display); + + if (!_cogl_winsys_egl_renderer_connect_common (renderer, error)) + goto error; +diff --git a/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/winsys/cogl-winsys-egl-x11.c +index 724a4d0..a7e9c2f 100644 +--- a/cogl/winsys/cogl-winsys-egl-x11.c ++++ b/cogl/winsys/cogl-winsys-egl-x11.c +@@ -278,7 +278,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer, + goto error; + + egl_renderer->edpy = +- eglGetDisplay ((EGLNativeDisplayType) xlib_renderer->xdpy); ++ cogl_winsys_egl_get_display (EGL_PLATFORM_X11_KHR, xlib_renderer->xdpy); + + if (!_cogl_winsys_egl_renderer_connect_common (renderer, error)) + goto error; +-- +2.9.3 + diff --git a/SOURCES/cogl-1.22.2-fix-ifdef.patch b/SOURCES/cogl-1.22.2-fix-ifdef.patch new file mode 100644 index 0000000..544e09e --- /dev/null +++ b/SOURCES/cogl-1.22.2-fix-ifdef.patch @@ -0,0 +1,26 @@ +From b583e21d8698dbd58013320cfb47739102efdea7 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Wed, 19 Oct 2016 23:38:28 +0200 +Subject: [PATCH] Fix an incorrect preprocessor conditional + +This fixes the build with wayland wayland egl server support disabled. +--- + cogl/winsys/cogl-winsys-egl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c +index 39bfd88..4a9f3aa 100644 +--- a/cogl/winsys/cogl-winsys-egl.c ++++ b/cogl/winsys/cogl-winsys-egl.c +@@ -1029,7 +1029,7 @@ _cogl_egl_create_image (CoglContext *ctx, + egl_ctx = EGL_NO_CONTEXT; + else + #endif +-#if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT ++#ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT + /* The WL_bind_wayland_display spec states that EGL_NO_CONTEXT is to be used + * in conjunction with the EGL_WAYLAND_BUFFER_WL target */ + if (target == EGL_WAYLAND_BUFFER_WL) +-- +2.7.4 + diff --git a/SPECS/cogl.spec b/SPECS/cogl.spec new file mode 100644 index 0000000..d83fb4f --- /dev/null +++ b/SPECS/cogl.spec @@ -0,0 +1,375 @@ +%global with_wayland 1 +%global with_tests 1 + +Name: cogl +Version: 1.22.2 +Release: 2%{?dist} +Summary: A library for using 3D graphics hardware to draw pretty pictures + +License: LGPLv2+ +URL: http://www.clutter-project.org/ +Source0: http://download.gnome.org/sources/cogl/1.22/cogl-%{version}.tar.xz + +# Vaguely related to https://bugzilla.gnome.org/show_bug.cgi?id=772419 +# but on the 1.22 branch, and the static inline in the header is gross +# ajax promises he'll clean this up. +Patch0: 0001-egl-Use-eglGetPlatformDisplay-not-eglGetDisplay.patch +# Backported from upstream to fix the build +Patch1: cogl-1.22.2-fix-ifdef.patch + +BuildRequires: cairo-devel +BuildRequires: chrpath +BuildRequires: gdk-pixbuf2-devel +BuildRequires: glib2-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gtk-doc +BuildRequires: libXrandr-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXdamage-devel +BuildRequires: libXext-devel +BuildRequires: libXfixes-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libgbm-devel +BuildRequires: pango-devel +BuildRequires: pkgconfig + +%if 0%{?with_wayland} +BuildRequires: libwayland-server-devel +BuildRequires: libwayland-client-devel +BuildRequires: libwayland-cursor-devel +BuildRequires: libwayland-egl-devel +BuildRequires: libxkbcommon-devel +%endif + +%if 0%{?fedora} +# From rhughes-f20-gnome-3-12 copr +Obsoletes: compat-cogl116 < 1.18 +%endif + +%description +Cogl is a small open source library for using 3D graphics hardware to draw +pretty pictures. The API departs from the flat state machine style of +OpenGL and is designed to make it easy to write orthogonal components that +can render without stepping on each others toes. + +As well aiming for a nice API, we think having a single library as opposed +to an API specification like OpenGL has a few advantages too; like being +able to paper over the inconsistencies/bugs of different OpenGL +implementations in a centralized place, not to mention the myriad of OpenGL +extensions. It also means we are in a better position to provide utility +APIs that help software developers since they only need to be implemented +once and there is no risk of inconsistency between implementations. + +Having other backends, besides OpenGL, such as drm, Gallium or D3D are +options we are interested in for the future. + +%package devel +Summary: %{name} development environment +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Header files and libraries for building and developing apps with %{name}. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +This package contains documentation for %{name}. + +%if 0%{?with_tests} +%package tests +Summary: Tests for %{name} + +%description tests +This package contains the installable tests for %{cogl}. +%endif + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +CFLAGS="$RPM_OPT_FLAGS -fPIC" +%configure \ + --enable-cairo=yes \ + --enable-cogl-pango=yes \ + --enable-gdk-pixbuf=yes \ + --enable-glx=yes \ + --enable-gtk-doc \ + --enable-introspection=yes \ + --enable-kms-egl-platform \ +%if 0%{?with_wayland} + --enable-wayland-egl-platform \ + --enable-wayland-egl-server \ +%endif + --enable-xlib-egl-platform \ + %{?with_tests:--enable-installed-tests} + +make %{?_smp_mflags} V=1 + +%install +%make_install + +#Remove libtool archives. +find %{buildroot} -name '*.la' -delete + +# This gets installed by mistake +rm %{buildroot}%{_datadir}/cogl/examples-data/crate.jpg + +# Remove lib64 rpaths +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcogl-path.so +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcogl-pango.so + +%find_lang %{name} + +%check +# make check + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files -f %{name}.lang +%license COPYING +%doc NEWS README +%{_libdir}/libcogl*.so.20* +%{_libdir}/girepository-1.0/Cogl*.typelib + +%files devel +%{_includedir}/cogl +%{_libdir}/libcogl*.so +%{_libdir}/pkgconfig/*.pc +%{_datadir}/gir-1.0/Cogl*.gir + +%files doc +%{_datadir}/gtk-doc/html/cogl +%{_datadir}/gtk-doc/html/cogl-2.0-experimental + +%if 0%{?with_tests} +%files tests +%{_datadir}/installed-tests/%{name} +%{_libexecdir}/installed-tests/%{name} +%endif + +%changelog +* Fri Oct 27 2017 Kalev Lember - 1.22.2-2 +- Enable wayland support +- Resolves: #1488576 + +* Fri Aug 26 2016 Kalev Lember - 1.22.2-1 +- Update to 1.22.2 +- Resolves: #1386835 + +* Wed Jun 29 2016 Owen Taylor - 1.18.2-12 +- Add patches to improve display synchronization on NVIDIA + + When testing quadbuffer stereo patches, GNOME Shell would sometimes + hang up on restart. This turned out to be a problem with display + synchronization on NVIDIA. The patches added here make display + synchronization work much more similarly with the NVIDIA drivers + and the open source drivers, which not only fixes this bug, but should + reduce future bugs. + + Resolves: #1305076 + +- Add patches improving frame completion events in Cogl + +* Wed Jun 15 2016 Rui Matos - 1.18.2-11 +- Add patch to support NV_robustness_video_memory_purge + Resolves: rhbz#1330488 + +* Thu Apr 9 2015 Rui Matos - 1.18.2-10 +- Rebase to 1.18.2 - Resolves: rhbz#1174508 + +* Sun Nov 16 2014 Kalev Lember - 1.18.2-9 +- Obsolete compat-cogl116 from rhughes-f20-gnome-3-12 copr + +* Thu Nov 13 2014 Kalev Lember - 1.18.2-8 +- Disable cogl-gst as long as we don't have clutter-gst3 (#1158676) + +* Sat Nov 01 2014 Richard Hughes - 1.18.2-7 +- Fix compile on RHEL, harder + +* Mon Oct 27 2014 Richard Hughes - 1.18.2-6 +- Fix compile on RHEL + +* Fri Aug 22 2014 Kalev Lember - 1.18.2-5 +- Remove lib64 rpaths (#1132876) + +* Sat Aug 16 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 1.18.2-3 +- Rebuilt for gobject-introspection 1.41.4 + +* Fri Jul 11 2014 Peter Robinson 1.18.2-2 +- Run make check but don't fail build on it + +* Fri Jul 04 2014 Kalev Lember - 1.18.2-1 +- Update to 1.18.2 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.18.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Kalev Lember - 1.18.0-3 +- Backport an upstream fix for a totem crash + +* Thu May 08 2014 Adam Jackson +- Add optional installed-tests subpackage + +* Mon Apr 28 2014 Richard Hughes - 1.18.0-2 +- Build with --enable-cogl-gst + +* Fri Mar 21 2014 Kalev Lember - 1.18.0-1 +- Update to 1.18.0 + +* Fri Mar 21 2014 Kalev Lember - 1.17.5-1.gitbb10532 +- Update to 1.17.5 git snapshot + +* Fri Feb 21 2014 Kalev Lember - 1.17.4-2 +- Drop compat-libcogl19 + +* Thu Feb 20 2014 Kalev Lember - 1.17.4-1 +- Update to 1.17.4, which includes soname bump +- Build a temporary compat-libcogl19 subpackage to ease the rebuilds + +* Wed Feb 05 2014 Richard Hughes - 1.17.2-1 +- Update to 1.17.2 + +* Tue Jan 21 2014 Richard Hughes - 1.16.2-1 +- Update to 1.16.2 + +* Wed Sep 25 2013 Dan HorĂ¡k - 1.16.0-2 +- fix build on big endians (#1011893) + +* Tue Sep 24 2013 Kalev Lember - 1.16.0-1 +- Update to 1.16.0 + +* Thu Sep 12 2013 Kalev Lember - 1.15.10-3 +- More configure options for enabling the gnome-shell Wayland compositor +- Enable parallel build + +* Tue Sep 10 2013 Matthias Clasen - 1.15.10-2 +- Add configure options that are needed to enable the gnome-shell + Wayland compositor + +* Mon Sep 02 2013 Kalev Lember - 1.15.10-1 +- Update to 1.15.10 + +* Thu Aug 22 2013 Kalev Lember - 1.15.8-1 +- Update to 1.15.8 + +* Fri Aug 09 2013 Kalev Lember - 1.15.4-1 +- Update to 1.15.4 + +* Sat Aug 03 2013 Fedora Release Engineering - 1.14.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jun 12 2013 Kalev Lember 1.14.0-3 +- Rebuilt + +* Wed May 22 2013 Adam Jackson 1.14.0-2 +- cogl-1.14.0-21-ge26464f.patch: Sync with 1.14 branch for a crash fix. + +* Mon Mar 25 2013 Kalev Lember 1.14.0-1 +- Update to 1.14.0 + +* Thu Feb 21 2013 Bastien Nocera 1.13.4-1 +- Update to 1.13.4 + +* Wed Feb 13 2013 Fedora Release Engineering - 1.13.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jan 24 2013 Peter Robinson 1.13.2-1 +- Update to 1.13.2 + +* Mon Jan 7 2013 Peter Robinson 1.12.2-1 +- Update to 1.12.2 + +* Tue Sep 25 2012 Kalev Lember - 1.12.0-1 +- Update to 1.12.0 + +* Tue Sep 18 2012 Kalev Lember - 1.11.6-1 +- Update to 1.11.6 +- Drop upstreamed cogl-1.11.4-mesa-strings.patch + +* Mon Sep 17 2012 Adam Jackson 1.11.4-2 +- cogl-1.11.4-mesa-strings.patch: Update match strings for Mesa. + +* Mon Sep 3 2012 Peter Robinson - 1.11.4-1 +- Update to 1.11.4 + +* Tue Aug 21 2012 Richard Hughes - 1.11.2-1 +- Update to 1.11.2 + +* Fri Jul 27 2012 Fedora Release Engineering - 1.10.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jul 18 2012 Kalev Lember - 1.10.4-1 +- Update to 1.10.4 +- Dropped no-framebuffer-blit patch which is included in the release + +* Thu Apr 19 2012 Adel Gadllah - 1.10.2-1 +- Update to 1.10.2 + +* Tue Mar 20 2012 Kalev Lember - 1.10.0-1 +- Update to 1.10.0 + +* Sat Mar 10 2012 Matthias Clasen - 1.9.8-1 +- Update to 1.9.8 + +* Sat Feb 25 2012 Matthias Clasen - 1.9.6-1 +- Update to 1.9.6 + +* Tue Jan 17 2012 Peter Robinson - 1.9.4-1 +- Update to 1.9.4 +- http://ftp.gnome.org/pub/GNOME/sources/cogl/1.9/cogl-1.9.4.news + +* Thu Jan 12 2012 Fedora Release Engineering - 1.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 23 2011 Matthias Clasen 1.9.2-1 +- Update to 1.9.2 + +* Thu Nov 03 2011 Adam Jackson 1.8.2-4 +- cogl-1.8.2-lp-no-framebuffer-blit.patch: Disable the subbuffer blit code + when running on llvmpipe until it's unbroken. + +* Tue Nov 01 2011 Adam Jackson 1.8.2-3 +- cogl-1.8.2-no-drm-hax.patch: Don't try insane direct DRM vblank wait. + +* Wed Oct 26 2011 Fedora Release Engineering - 1.8.2-2 +- Rebuilt for glibc bug#747377 + +* Mon Oct 17 2011 Peter Robinson - 1.8.2-1 +- 1.8.2 stable release +- http://ftp.gnome.org/pub/GNOME/sources/cogl/1.8/cogl-1.8.2.news +- Enable gdk-pixbuf2 support - Fixes RHBZ # 738092 + +* Mon Sep 19 2011 Peter Robinson - 1.8.0-1 +- 1.8.0 stable release +- http://ftp.gnome.org/pub/GNOME/sources/cogl/1.8/cogl-1.8.0.news + +* Mon Sep 5 2011 Peter Robinson - 1.7.8-1 +- Update to 1.7.8 + +* Thu Aug 18 2011 Matthias Clasen - 1.7.6-1 +- Update to 1.7.6 + +* Tue Jul 26 2011 Matthias Clasen - 1.7.4-1 +- Update to 1.7.4 + +* Mon Jul 4 2011 Peter Robinson - 1.7.2-1 +- Update to 1.7.2 + +* Thu Jun 16 2011 Peter Robinson - 1.7.0-3 +- Update spec for review feedback + +* Thu Jun 16 2011 Peter Robinson - 1.7.0-2 +- Update spec for review feedback + +* Wed Jun 15 2011 Peter Robinson - 1.7.0-1 +- Initial Package