Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/gtk4.git#05e46452c9959cfd2594ef562828ce075bcb8acb
This commit is contained in:
DistroBaker 2020-12-10 16:16:39 +01:00
parent 1f0f5c282d
commit 930b437b6d
4 changed files with 427 additions and 0 deletions

15
.gitignore vendored
View File

@ -0,0 +1,15 @@
/gtk+-3.91.2.tar.xz
/gtk+-3.92.1.tar.xz
/gtk+-3.94.0.tar.xz
/gtk-3.96.0.tar.xz
/gtk-3.98.0.tar.xz
/gtk-3.98.1.tar.xz
/gtk-3.98.2.tar.xz
/gtk-3.98.3.tar.xz
/gtk-3.98.4.tar.xz
/gtk-3.98.5.tar.xz
/gtk-3.99.0.tar.xz
/gtk-3.99.1.tar.xz
/gtk-3.99.2.tar.xz
/gtk-3.99.3.tar.xz
/gtk-3.99.4.tar.xz

85
gtk4-gcc11.patch Normal file
View File

@ -0,0 +1,85 @@
diff --git a/gtk/css/gtkcssenumtypes.c.template b/gtk/css/gtkcssenumtypes.c.template
index 063b8d0..cb4c9ac 100644
--- a/gtk/css/gtkcssenumtypes.c.template
+++ b/gtk/css/gtkcssenumtypes.c.template
@@ -13,7 +13,7 @@
GType
@enum_name@_get_type (void)
{
- static volatile gsize g_define_type_id__volatile = 0;
+ static gsize g_define_type_id__volatile = 0;
if (g_once_init_enter (&g_define_type_id__volatile))
{
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c
index 4d5e30e..915b991 100644
--- a/gtk/gtktextchild.c
+++ b/gtk/gtktextchild.c
@@ -169,6 +169,12 @@ const GtkTextLineSegmentClass gtk_text_paintable_type = {
GtkTextLineSegment *
_gtk_paintable_segment_new (GdkPaintable *paintable)
{
+ /* gcc-11 issues a diagnostic here because the size allocated
+ for SEG does not cover the entire size of a GtkTextLineSegment
+ and gcc has no way to know that the union will only be used
+ for limited types and the additional space is not needed. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
GtkTextLineSegment *seg;
guint flags;
@@ -204,6 +210,7 @@ _gtk_paintable_segment_new (GdkPaintable *paintable)
g_object_ref (paintable);
return seg;
+#pragma GCC diagnostic pop
}
@@ -280,6 +287,12 @@ const GtkTextLineSegmentClass gtk_text_child_type = {
GtkTextLineSegment *
_gtk_widget_segment_new (GtkTextChildAnchor *anchor)
{
+ /* gcc-11 issues a diagnostic here because the size allocated
+ for SEG does not cover the entire size of a GtkTextLineSegment
+ and gcc has no way to know that the union will only be used
+ for limited types and the additional space is not needed. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
GtkTextLineSegment *seg;
seg = g_slice_alloc (WIDGET_SEG_SIZE);
@@ -303,6 +316,7 @@ _gtk_widget_segment_new (GtkTextChildAnchor *anchor)
g_object_ref (anchor);
return seg;
+#pragma GCC diagnostic pop
}
void
diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c
index a202ab6..aaac291 100644
--- a/gtk/gtktextsegment.c
+++ b/gtk/gtktextsegment.c
@@ -425,6 +425,13 @@ char_segment_check_func (GtkTextLineSegment *segPtr, GtkTextLine *line)
GtkTextLineSegment*
_gtk_toggle_segment_new (GtkTextTagInfo *info, gboolean on)
{
+ /* gcc-11 issues a diagnostic here because the size allocated
+ for SEG does not cover the entire size of a GtkTextLineSegment
+ and gcc has no way to know that the union will only be used
+ for limited types and the additional space is not needed. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+
GtkTextLineSegment *seg;
seg = g_slice_alloc (TSEG_SIZE);
@@ -440,6 +447,7 @@ _gtk_toggle_segment_new (GtkTextTagInfo *info, gboolean on)
seg->body.toggle.inNodeCounts = 0;
return seg;
+#pragma GCC diagnostic pop
}
void

326
gtk4.spec Normal file
View File

@ -0,0 +1,326 @@
%if 0%{?fedora}
%global with_broadway 1
%endif
%global glib2_version 2.65.0
%global pango_version 1.47.0
%global cairo_version 1.14.0
%global gdk_pixbuf_version 2.30.0
%global wayland_protocols_version 1.20
%global wayland_version 1.14.91
%global epoxy_version 1.4
%global bin_version 4.0.0
# Filter provides for private modules
%global __provides_exclude_from ^%{_libdir}/gtk-4.0
Name: gtk4
Version: 3.99.4
Release: 3%{?dist}
Summary: GTK graphical user interface library
License: LGPLv2+
URL: https://www.gtk.org
Source0: https://download.gnome.org/sources/gtk/3.99/gtk-%{version}.tar.xz
Patch0: %{name}-gcc11.patch
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
BuildRequires: docbook-style-xsl
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: meson
BuildRequires: pkgconfig(avahi-gobject)
BuildRequires: pkgconfig(cairo) >= %{cairo_version}
BuildRequires: pkgconfig(cairo-gobject) >= %{cairo_version}
BuildRequires: pkgconfig(colord)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= %{gdk_pixbuf_version}
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(graphene-gobject-1.0)
BuildRequires: pkgconfig(gstreamer-player-1.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(pango) >= %{pango_version}
BuildRequires: pkgconfig(rest-0.7)
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(wayland-client) >= %{wayland_version}
BuildRequires: pkgconfig(wayland-cursor) >= %{wayland_version}
BuildRequires: pkgconfig(wayland-egl) >= %{wayland_version}
BuildRequires: pkgconfig(wayland-protocols) >= %{wayland_protocols_version}
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xrender)
BuildRequires: sassc
BuildRequires: /usr/bin/xsltproc
# standard icons
Requires: adwaita-icon-theme
# required for icon theme apis to work
Requires: hicolor-icon-theme
# split out in a subpackage
Requires: gtk-update-icon-cache
Requires: cairo%{?_isa} >= %{cairo_version}
Requires: cairo-gobject%{?_isa} >= %{cairo_version}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: libepoxy%{?_isa} >= %{epoxy_version}
Requires: libwayland-client%{?_isa} >= %{wayland_version}
Requires: libwayland-cursor%{?_isa} >= %{wayland_version}
Requires: pango%{?_isa} >= %{pango_version}
# required to support all the different image formats
Requires: gdk-pixbuf2-modules%{?_isa}
# make sure we have a reasonable gsettings backend
%if 0%{?fedora}
Recommends: dconf%{?_isa}
%else
Requires: dconf%{?_isa}
%endif
# Removed in F29
Obsoletes: gtk4-immodules < 3.94.0
Obsoletes: gtk4-immodule-xim < 3.94.0
# Removed in F30
Obsoletes: gtk4-tests < 3.96.0
# Removed in F32
Obsoletes: gtk4-devel-docs < 3.98.3
%description
GTK is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK is suitable for
projects ranging from small one-off tools to complete application
suites.
This package contains version 4 of GTK.
%package devel
Summary: Development files for GTK
Requires: gtk4%{?_isa} = %{version}-%{release}
%description devel
This package contains the libraries and header files that are needed
for writing applications with version 4 of the GTK widget toolkit.
%prep
%autosetup -p1 -n gtk-%{version}
%build
export CFLAGS='-fno-strict-aliasing %optflags'
%meson \
-Dx11-backend=true \
-Dwayland-backend=true \
%if 0%{?with_broadway}
-Dbroadway-backend=true \
%endif
-Dmedia-ffmpeg=disabled \
-Dmedia-gstreamer=enabled \
-Dxinerama=enabled \
-Dcolord=enabled \
-Dgtk_doc=false \
-Dman-pages=true \
-Dinstall-tests=false
%meson_build
%install
%meson_install
%find_lang gtk40
%find_lang gtk40-properties
%if !0%{?with_broadway}
rm $RPM_BUILD_ROOT%{_mandir}/man1/gtk4-broadwayd.1*
%endif
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-4.0
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-4.0/modules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-4.0/%{bin_version}/theming-engines
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%ldconfig_scriptlets
%files -f gtk40.lang
%license COPYING
%doc AUTHORS NEWS README.md
%{_bindir}/gtk4-launch
%{_bindir}/gtk4-update-icon-cache
%{_libdir}/libgtk-4.so.*
%dir %{_libdir}/gtk-4.0
%dir %{_libdir}/gtk-4.0/%{bin_version}
%{_libdir}/gtk-4.0/%{bin_version}/media/
%{_libdir}/gtk-4.0/%{bin_version}/printbackends/
%{_libdir}/gtk-4.0/%{bin_version}/theming-engines/
%{_libdir}/gtk-4.0/modules
%{_libdir}/girepository-1.0
%{_mandir}/man1/gtk4-launch.1*
%{_mandir}/man1/gtk4-update-icon-cache.1*
%{_datadir}/glib-2.0/schemas/org.gtk.gtk4.Settings.ColorChooser.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gtk.gtk4.Settings.Debug.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gtk.gtk4.Settings.FileChooser.gschema.xml
%dir %{_datadir}/gtk-4.0
%{_datadir}/gtk-4.0/emoji/
%if 0%{?with_broadway}
%{_bindir}/gtk4-broadwayd
%{_mandir}/man1/gtk4-broadwayd.1*
%endif
%files devel -f gtk40-properties.lang
%{_libdir}/lib*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_bindir}/gtk4-builder-tool
%{_bindir}/gtk4-demo
%{_bindir}/gtk4-encode-symbolic-svg
%{_bindir}/gtk4-icon-browser
%{_bindir}/gtk4-query-settings
%{_datadir}/applications/org.gtk.Demo4.desktop
%{_datadir}/applications/org.gtk.IconBrowser4.desktop
%{_datadir}/applications/org.gtk.PrintEditor4.desktop
%{_datadir}/applications/org.gtk.WidgetFactory4.desktop
%{_datadir}/icons/hicolor/*/apps/org.gtk.Demo4*.svg
%{_datadir}/icons/hicolor/*/apps/org.gtk.IconBrowser4*.svg
%{_datadir}/icons/hicolor/*/apps/org.gtk.PrintEditor4*.svg
%{_datadir}/icons/hicolor/*/apps/org.gtk.WidgetFactory4*.svg
%{_bindir}/gtk4-demo-application
%{_bindir}/gtk4-print-editor
%{_bindir}/gtk4-widget-factory
%{_datadir}/gettext/
%{_datadir}/gir-1.0
%{_datadir}/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
%{_datadir}/gtk-4.0/gtk4builder.rng
%{_datadir}/gtk-4.0/valgrind/
%{_datadir}/metainfo/org.gtk.Demo4.appdata.xml
%{_datadir}/metainfo/org.gtk.IconBrowser4.appdata.xml
%{_datadir}/metainfo/org.gtk.PrintEditor4.appdata.xml
%{_datadir}/metainfo/org.gtk.WidgetFactory4.appdata.xml
%{_mandir}/man1/gtk4-builder-tool.1*
%{_mandir}/man1/gtk4-demo.1*
%{_mandir}/man1/gtk4-demo-application.1*
%{_mandir}/man1/gtk4-encode-symbolic-svg.1*
%{_mandir}/man1/gtk4-icon-browser.1*
%{_mandir}/man1/gtk4-query-settings.1*
%{_mandir}/man1/gtk4-widget-factory.1*
%changelog
* Wed Dec 09 2020 Jeff Law <law@redhat.com> - 3.99.4-3
- Avoid diagnostics for gcc-11 false positive out of bounds accesses
* Sun Nov 15 2020 Jeff Law <law@redhat.com> - 3.99.4-2
- Fix bogus volatile caught by gcc-11
* Thu Nov 5 2020 Kalev Lember <klember@redhat.com> - 3.99.4-1
- Update to 3.99.4
* Fri Oct 16 2020 Kalev Lember <klember@redhat.com> - 3.99.3-1
- Update to 3.99.3
* Thu Oct 01 2020 Kalev Lember <klember@redhat.com> - 3.99.2-2
- Update required pango and glib2 versions
* Tue Sep 29 2020 Kalev Lember <klember@redhat.com> - 3.99.2-1
- Update to 3.99.2
* Mon Sep 28 2020 Jeff Law <law@redhat.com> - 3.99.1-2
- Re-enable LTO as upstream GCC target/96939 has been fixed
* Thu Sep 03 2020 Kalev Lember <klember@redhat.com> - 3.99.1-1
- Update to 3.99.1
- Drop wayland build conditionals
* Mon Aug 17 2020 Jeff Law <law@redhat.com> - 3.99.0-2
- Disable LTO on armv7hl
* Sat Aug 01 2020 Kalev Lember <klember@redhat.com> - 3.99.0-1
- Update to 3.99.0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.98.5-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.98.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun Jun 07 2020 Kalev Lember <klember@redhat.com> - 3.98.5-1
- Update to 3.98.5
* Tue May 19 2020 Kalev Lember <klember@redhat.com> - 3.98.4-1
- Update to 3.98.4
* Tue Apr 21 2020 Kalev Lember <klember@redhat.com> - 3.98.3-1
- Update to 3.98.3
- Temporarily disable built documentation as we don't have new enough gtk-doc
* Wed Apr 01 2020 Kalev Lember <klember@redhat.com> - 3.98.2-1
- Update to 3.98.2
* Sun Mar 22 2020 Kalev Lember <klember@redhat.com> - 3.98.1-1
- Update to 3.98.1
* Thu Mar 12 2020 Kalev Lember <klember@redhat.com> - 3.98.0-2
- Install missing gtkemojichooser.h (#1806509)
* Tue Feb 11 2020 Kalev Lember <klember@redhat.com> - 3.98.0-1
- Update to 3.98.0
- Use https for source URLs
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.96.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.96.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 07 2019 Kalev Lember <klember@redhat.com> - 3.96.0-1
- Update to 3.96.0
- Use GTK instead of GTK+ in descriptions
- Don't ship installed tests as they are currently broken
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.94.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 01 2018 Kalev Lember <klember@redhat.com> - 3.94.0-1
- Update to 3.94.0
- Remove and obsolete immodules subpackages
- Build new gstreamer media backend
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.92.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 3.92.1-3
- Rebuild to fix GCC 8 mis-compilation
See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.92.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Nov 02 2017 Kalev Lember <klember@redhat.com> - 3.92.1-1
- Update to 3.92.1
- Enable installed tests
* Tue Aug 08 2017 Kalev Lember <klember@redhat.com> - 3.91.2-1
- Update to 3.91.2
* Thu Jul 20 2017 Kalev Lember <klember@redhat.com> - 3.91.1-1
- Update to 3.91.1
* Wed Jun 14 2017 Kalev Lember <klember@redhat.com> - 3.91.0-2
- Disable installed tests due to file conflicts between gtk3-tests and
gtk4-tests
* Wed Jun 14 2017 Kalev Lember <klember@redhat.com> - 3.91.0-1
- Initial Fedora packaging

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (gtk-3.99.4.tar.xz) = 85a0999c3ca07a0f6897ffe5d93ed04c953a952dde6f6ca72bf99641532acda38461177b460bda445c76abed66c5a7af07d4dd928084be5a54a7175e8133cd37