From 2aab5a0076e2269eb492f037d4cedb4ca6584215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 7 Apr 2020 14:50:44 +0200 Subject: [PATCH] Fix build with recent clang versions They look for fallthrough annotations but do not support the falltrough comments that gcc interprets. --- pango.spec | 7 +++- replace-fallthrough-comments.patch | 54 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 replace-fallthrough-comments.patch diff --git a/pango.spec b/pango.spec index e13f921..082832c 100644 --- a/pango.spec +++ b/pango.spec @@ -9,12 +9,13 @@ Name: pango Version: 1.44.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: System for layout and rendering of internationalized text License: LGPLv2+ URL: http://www.pango.org Source0: https://download.gnome.org/sources/%{name}/1.44/%{name}-%{version}.tar.xz +Patch: replace-fallthrough-comments.patch BuildRequires: pkgconfig(cairo) >= %{cairo_version} BuildRequires: pkgconfig(freetype2) >= %{freetype_version} @@ -75,6 +76,7 @@ the functionality of the installed %{name} package. %prep %setup -q -n pango-%{version} +%patch0 -p1 -b .fallthrouch-comments %build @@ -128,6 +130,9 @@ fi %changelog +* Tue Apr 07 2020 Timm Baeder - 1.44.7-3 +- Add fallthrough-comments.patch to fix build with recent clang versions + * Wed Jan 29 2020 Fedora Release Engineering - 1.44.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/replace-fallthrough-comments.patch b/replace-fallthrough-comments.patch new file mode 100644 index 0000000..7279818 --- /dev/null +++ b/replace-fallthrough-comments.patch @@ -0,0 +1,54 @@ +diff -ruN pango-1.44.7.orig/pango/break.c pango-1.44.7/pango/break.c +--- pango-1.44.7.orig/pango/break.c 2020-04-07 13:28:18.558848703 +0200 ++++ pango-1.44.7/pango/break.c 2020-04-07 14:13:03.555033725 +0200 +@@ -405,7 +405,7 @@ + GB_type = GB_Prepend; + break; + } +- /* fall through */ ++ __attribute__((fallthrough)); + case G_UNICODE_CONTROL: + case G_UNICODE_LINE_SEPARATOR: + case G_UNICODE_PARAGRAPH_SEPARATOR: +@@ -421,7 +421,7 @@ + GB_type = GB_ControlCRLF; + break; + } +- /* fall through */ ++ __attribute__((fallthrough)); + + case G_UNICODE_OTHER_LETTER: + if (makes_hangul_syllable) +@@ -594,7 +594,7 @@ + case G_UNICODE_CONTROL: + if (wc != 0x000D && wc != 0x000A && wc != 0x000B && wc != 0x000C && wc != 0x0085) + break; +- /* fall through */ ++ __attribute__((fallthrough)); + case G_UNICODE_LINE_SEPARATOR: + case G_UNICODE_PARAGRAPH_SEPARATOR: + WB_type = WB_NewlineCRLF; /* CR, LF, Newline */ +diff -ruN pango-1.44.7.orig/pango/pango-renderer.c pango-1.44.7/pango/pango-renderer.c +--- pango-1.44.7.orig/pango/pango-renderer.c 2020-04-07 13:28:18.568848677 +0200 ++++ pango-1.44.7/pango/pango-renderer.c 2020-04-07 14:12:53.076064830 +0200 +@@ -222,7 +222,7 @@ + rect->y + 2 * rect->height, + rect->width, + rect->height); +- /* Fall through */ ++ __attribute__((fallthrough)); + case PANGO_UNDERLINE_SINGLE: + case PANGO_UNDERLINE_LOW: + pango_renderer_draw_rectangle (renderer, +diff -ruN pango-1.44.7.orig/tests/testboundaries_ucd.c pango-1.44.7/tests/testboundaries_ucd.c +--- pango-1.44.7.orig/tests/testboundaries_ucd.c 2020-04-07 13:28:18.588848625 +0200 ++++ pango-1.44.7/tests/testboundaries_ucd.c 2020-04-07 14:16:44.621377237 +0200 +@@ -104,7 +104,7 @@ + { + case 0x00f7: /* DIVISION SIGN: boundary here */ + temp_attr.bits |= bits.bits; +- /* fall through */ ++ __attribute__((fallthrough)); + + case 0x00d7: /* MULTIPLICATION SIGN: no boundary here */ + break;