From 03563b2e56beab2876f22eb570c682d0f3375da7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 5 Nov 2021 10:09:24 +0000 Subject: [PATCH] Rebase patch series, dropping patches that were applied upstream --- ...to-get-compose-parse-input-from-libX.patch | 23 --- ...ndian-dependent-compact-Compose-data.patch | 141 ------------------ ...e-Update-sequences-from-libX11-1.7.2.patch | 79 ---------- .../debian/Disable-web-fonts-for-now.patch | 15 +- .../debian/templates-Remove-html5shiv.patch | 2 +- ...-colour-channels-as-undefined-if-alp.patch | 37 ----- ...ces-Report-how-much-the-images-diffe.patch | 4 +- ...ow-minor-differences-to-be-tolerated.patch | 4 +- debian/patches/series | 4 - 9 files changed, 13 insertions(+), 296 deletions(-) delete mode 100644 debian/patches/compose-Document-how-to-get-compose-parse-input-from-libX.patch delete mode 100644 debian/patches/compose-Generate-endian-dependent-compact-Compose-data.patch delete mode 100644 debian/patches/compose-Update-sequences-from-libX11-1.7.2.patch delete mode 100644 debian/patches/reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch diff --git a/debian/patches/compose-Document-how-to-get-compose-parse-input-from-libX.patch b/debian/patches/compose-Document-how-to-get-compose-parse-input-from-libX.patch deleted file mode 100644 index 911a89f53d..0000000000 --- a/debian/patches/compose-Document-how-to-get-compose-parse-input-from-libX.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Simon McVittie -Date: Mon, 30 Aug 2021 10:48:49 +0100 -Subject: compose: Document how to get compose-parse input from libX11 source - -Signed-off-by: Simon McVittie -Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3902 -Applied-upstream: 4.5.0 ---- - gtk/compose/compose-parse.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gtk/compose/compose-parse.c b/gtk/compose/compose-parse.c -index a1ec09d..385a34f 100644 ---- a/gtk/compose/compose-parse.c -+++ b/gtk/compose/compose-parse.c -@@ -7,6 +7,7 @@ - * character data, and definitions for the builtin compose table of GTK. - * Run it like this: - * -+ * cpp -DXCOMM='#' Compose.pre | sed -e 's/^ *#/#/' > Compose - * compose-parse Compose sequences-little-endian sequences-big-endian chars gtkcomposedata.h - * - * The GTK build expects the output files to be in the source tree, in diff --git a/debian/patches/compose-Generate-endian-dependent-compact-Compose-data.patch b/debian/patches/compose-Generate-endian-dependent-compact-Compose-data.patch deleted file mode 100644 index 99b7eefe64..0000000000 --- a/debian/patches/compose-Generate-endian-dependent-compact-Compose-data.patch +++ /dev/null @@ -1,141 +0,0 @@ -From: Simon McVittie -Date: Mon, 30 Aug 2021 10:13:33 +0100 -Subject: compose: Generate endian-dependent compact Compose data - -The GtkComposeTable cache is always in big-endian format and is -byteswapped on load for the more common little-endian CPUs, but -init_builtin_table() in GtkIMContextSimple can't byteswap the built-in -data without copying it, which is undesirable. Pregenerate both big- -and little-endian compose data, and compile the correct flavour into -each build of GTK. This fixes failure of the composetable test when -building for a big-endian architecture such as s390x and (traditional, -big-endian) powerpc. - -Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217 -Signed-off-by: Simon McVittie -Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3902 -Applied-upstream: 4.5.0 ---- - gtk/compose/compose-parse.c | 30 +++++++++++++++++++++++++----- - gtk/gen-gtk-gresources-xml.py | 9 +++++---- - gtk/meson.build | 1 + - 3 files changed, 31 insertions(+), 9 deletions(-) - -diff --git a/gtk/compose/compose-parse.c b/gtk/compose/compose-parse.c -index 7a3d511..a1ec09d 100644 ---- a/gtk/compose/compose-parse.c -+++ b/gtk/compose/compose-parse.c -@@ -7,7 +7,7 @@ - * character data, and definitions for the builtin compose table of GTK. - * Run it like this: - * -- * compose-parse Compose sequences chars gtkcomposedata.h -+ * compose-parse Compose sequences-little-endian sequences-big-endian chars gtkcomposedata.h - * - * The GTK build expects the output files to be in the source tree, in - * the gtk/compose directory. -@@ -15,15 +15,19 @@ - int - main (int argc, char *argv[]) - { -+ const guint16 *sequences_le; -+ const guint16 *sequences_be; -+ guint16 *other_sequences; - GtkComposeTable *table; - GError *error = NULL; - GString *str; -+ gsize i; - - setlocale (LC_ALL, ""); - - if (argc < 5) - { -- g_print ("Usage: compose-parse INPUT OUTPUT1 OUTPUT2 OUTPUT3\n"); -+ g_print ("Usage: compose-parse INPUT SEQUENCES-LE SEQUENCES-BE CHARS HEADER\n"); - exit (1); - } - -@@ -31,11 +35,26 @@ main (int argc, char *argv[]) - if (!table) - g_error ("Failed to parse %s", argv[1]); - -+#if G_BYTE_ORDER == G_BIG_ENDIAN -+ sequences_le = other_sequences = g_new0 (guint16, table->data_size); -+ sequences_be = (const guint16 *) table->data; -+#else -+ sequences_le = (const guint16 *) table->data; -+ sequences_be = other_sequences = g_new0 (guint16, table->data_size); -+#endif -+ -+ for (i = 0; i < table->data_size; i++) -+ other_sequences[i] = GUINT16_SWAP_LE_BE (table->data[i]); -+ -+ /* data_size is the size in guint16 */ -+ if (!g_file_set_contents (argv[2], (char *) sequences_le, 2 * table->data_size, &error)) -+ g_error ("%s", error->message); -+ - /* data_size is the size in guint16 */ -- if (!g_file_set_contents (argv[2], (char *)table->data, 2 * table->data_size, &error)) -+ if (!g_file_set_contents (argv[3], (char *) sequences_be, 2 * table->data_size, &error)) - g_error ("%s", error->message); - -- if (!g_file_set_contents (argv[3], table->char_data, table->n_chars + 1, &error)) -+ if (!g_file_set_contents (argv[4], table->char_data, table->n_chars + 1, &error)) - g_error ("%s", error->message); - - str = g_string_new (""); -@@ -55,10 +74,11 @@ main (int argc, char *argv[]) - "\n" - "#endif\n"); - -- if (!g_file_set_contents (argv[4], str->str, str->len, &error)) -+ if (!g_file_set_contents (argv[5], str->str, str->len, &error)) - g_error ("%s", error->message); - - g_string_free (str, TRUE); -+ g_free (other_sequences); - - return 0; - } -diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py -index 8a8da42..81c0663 100644 ---- a/gtk/gen-gtk-gresources-xml.py -+++ b/gtk/gen-gtk-gresources-xml.py -@@ -21,6 +21,7 @@ def replace_if_changed(new, old): - os.remove(new) - - srcdir = sys.argv[1] -+endian = sys.argv[2] - - xml = ''' - -@@ -84,13 +85,13 @@ for f in get_files('inspector', '.ui'): - xml += ''' - inspector/inspector.css - emoji/en.data -- compose/sequences -+ compose/sequences-{0}-endian - compose/chars - --''' -+'''.format(endian) - --if len(sys.argv) > 2: -- outfile = sys.argv[2] -+if len(sys.argv) > 3: -+ outfile = sys.argv[3] - tmpfile = outfile + '~' - with open(tmpfile, 'w') as f: - f.write(xml) -diff --git a/gtk/meson.build b/gtk/meson.build -index 18fbe6a..b123e06 100644 ---- a/gtk/meson.build -+++ b/gtk/meson.build -@@ -835,6 +835,7 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml', - command: [ - gen_gtk_gresources_xml, - meson.current_source_dir(), -+ host_machine.endian(), - '@OUTPUT@' - ], - ) diff --git a/debian/patches/compose-Update-sequences-from-libX11-1.7.2.patch b/debian/patches/compose-Update-sequences-from-libX11-1.7.2.patch deleted file mode 100644 index ea2ae7c633..0000000000 --- a/debian/patches/compose-Update-sequences-from-libX11-1.7.2.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Simon McVittie -Date: Mon, 30 Aug 2021 10:54:43 +0100 -Subject: compose: Update sequences from libX11 1.7.2 - -This adds support for sequences like ,G,u -> capital G with -breve. Previously, only a capital U was accepted for E, G, I and O -(but a lower-case u was accepted for A and U for some reason). - -Signed-off-by: Simon McVittie -Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3902 -Applied-upstream: 4.5.0 ---- - gtk/compose/gtkcomposedata.h | 2 +- - testsuite/gtk/compose/system.expected | 14 ++++++++++++-- - 2 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/gtk/compose/gtkcomposedata.h b/gtk/compose/gtkcomposedata.h -index 4426962..09b0263 100644 ---- a/gtk/compose/gtkcomposedata.h -+++ b/gtk/compose/gtkcomposedata.h -@@ -3,7 +3,7 @@ - - #define MAX_SEQ_LEN 5 - #define N_INDEX_SIZE 30 --#define DATA_SIZE 16447 -+#define DATA_SIZE 16477 - #define N_CHARS 1241 - - #endif -diff --git a/testsuite/gtk/compose/system.expected b/testsuite/gtk/compose/system.expected -index c807827..93c51eb 100644 ---- a/testsuite/gtk/compose/system.expected -+++ b/testsuite/gtk/compose/system.expected -@@ -1,7 +1,7 @@ --# n_sequences: 4874 -+# n_sequences: 4884 - # max_seq_len: 5 - # n_index_size: 30 --# data_size: 16447 -+# data_size: 16477 - # n_chars: 1241 - : "ΐ" # U390 - : "ΰ" # U3b0 -@@ -1959,6 +1959,7 @@ - : "Ġ" # U120 - : ">" # U3e - : "Ğ" # U11e -+ : "Ğ" # U11e - : "Ğ" # U11e - : "Ḩ" # U1e28 - : "Ï" # Ucf -@@ -2512,6 +2513,7 @@ - : "ġ" # U121 - : "ğ" # U11f - : ">" # U3e -+ : "ğ" # U11f - : "ğ" # U11f - : "ḩ" # U1e29 - : "ï" # Uef -@@ -2611,11 +2613,19 @@ - : "ų" # U173 - : "û" # Ufb - : "Ă" # U102 -+ : "Ĕ" # U114 -+ : "Ğ" # U11e -+ : "Ĭ" # U12c -+ : "Ŏ" # U14e - : "Ŭ" # U16c - : "û" # Ufb - : "ū" # U16b - : "ù" # Uf9 - : "ă" # U103 -+ : "ĕ" # U115 -+ : "ğ" # U11f -+ : "ĭ" # U12d -+ : "ŏ" # U14f - : "ŭ" # U16d - : "ũ" # U169 - : "ü" # Ufc diff --git a/debian/patches/debian/Disable-web-fonts-for-now.patch b/debian/patches/debian/Disable-web-fonts-for-now.patch index 5c91ce9b1c..9bec7eab0f 100644 --- a/debian/patches/debian/Disable-web-fonts-for-now.patch +++ b/debian/patches/debian/Disable-web-fonts-for-now.patch @@ -9,8 +9,8 @@ is not really in the scope of packaging gi-docgen. Forwarded: not-needed, Debian-specific --- .../gi-docgen/gidocgen/templates/basic/fonts.css | 176 --------------------- - .../gi-docgen/gidocgen/templates/basic/style.css | 1 - - 2 files changed, 177 deletions(-) + .../gi-docgen/gidocgen/templates/basic/style.css | 2 - + 2 files changed, 178 deletions(-) diff --git a/subprojects/gi-docgen/gidocgen/templates/basic/fonts.css b/subprojects/gi-docgen/gidocgen/templates/basic/fonts.css index ce790e7..0a01b93 100644 @@ -197,14 +197,15 @@ index ce790e7..0a01b93 100644 - font-display: swap; -} diff --git a/subprojects/gi-docgen/gidocgen/templates/basic/style.css b/subprojects/gi-docgen/gidocgen/templates/basic/style.css -index 8ff4bf1..434c2a9 100644 +index 889bbe8..89f0e4e 100644 --- a/subprojects/gi-docgen/gidocgen/templates/basic/style.css +++ b/subprojects/gi-docgen/gidocgen/templates/basic/style.css -@@ -5,7 +5,6 @@ - */ +@@ -7,8 +7,6 @@ + @import url("solarized-light.css") (prefers-color-scheme: light); + @import url("solarized-dark.css") (prefers-color-scheme: dark); - @import url("pygment.css"); -@import url("fonts.css"); - +- /********************************* * LIGHT THEME + *********************************/ diff --git a/debian/patches/debian/templates-Remove-html5shiv.patch b/debian/patches/debian/templates-Remove-html5shiv.patch index 95dd66bb5e..87df271b3f 100644 --- a/debian/patches/debian/templates-Remove-html5shiv.patch +++ b/debian/patches/debian/templates-Remove-html5shiv.patch @@ -9,7 +9,7 @@ references to external resources that can be a privacy breach. 1 file changed, 1 deletion(-) diff --git a/subprojects/gi-docgen/gidocgen/templates/basic/base.html b/subprojects/gi-docgen/gidocgen/templates/basic/base.html -index e353208..7c83cae 100644 +index 963a73e..ace1da3 100644 --- a/subprojects/gi-docgen/gidocgen/templates/basic/base.html +++ b/subprojects/gi-docgen/gidocgen/templates/basic/base.html @@ -47,7 +47,6 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later diff --git a/debian/patches/reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch b/debian/patches/reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch deleted file mode 100644 index cfcdab4b38..0000000000 --- a/debian/patches/reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Simon McVittie -Date: Thu, 2 Sep 2021 22:34:14 +0100 -Subject: reftest-compare: Treat colour channels as undefined if alpha is zero - -If the alpha channel is zero, it doesn't matter what the values of the -red, green and blue channels are: the pixel is still fully transparent. -On most architectures, fully transparent pixels end up all-zeroes -(fully transparent black), matching what's in the reference PNG file; -but on mips*el the blend-difference and blend-normal tests get all-ones -(fully transparent white) and a test failure. - -Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227 -Signed-off-by: Simon McVittie -Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3914 -Applied-upstream: 4.5.0 ---- - testsuite/reftests/reftest-compare.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/testsuite/reftests/reftest-compare.c b/testsuite/reftests/reftest-compare.c -index 5c682e1..5bccb69 100644 ---- a/testsuite/reftests/reftest-compare.c -+++ b/testsuite/reftests/reftest-compare.c -@@ -104,7 +104,12 @@ buffer_diff_core (const guchar *buf_a, - /* check if the pixels are the same */ - if (row_a[x] == row_b[x]) - continue; -- -+ -+ /* even if they're not literally the same, fully-transparent -+ * pixels are effectively the same regardless of colour */ -+ if ((row_a[x] & 0xff000000) == 0 && (row_b[x] & 0xff000000) == 0) -+ continue; -+ - if (diff == NULL) - { - diff = cairo_image_surface_create (CAIRO_FORMAT_RGB24, diff --git a/debian/patches/reftest_compare_surfaces-Report-how-much-the-images-diffe.patch b/debian/patches/reftest_compare_surfaces-Report-how-much-the-images-diffe.patch index 4c2a9fc6fe..47811abfe7 100644 --- a/debian/patches/reftest_compare_surfaces-Report-how-much-the-images-diffe.patch +++ b/debian/patches/reftest_compare_surfaces-Report-how-much-the-images-diffe.patch @@ -17,10 +17,10 @@ Applied-upstream: no, upstream want reftests to be a strict pass/fail with ident 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/testsuite/gsk/compare-render.c b/testsuite/gsk/compare-render.c -index 5494c61..f3c3568 100644 +index a62252a..9742358 100644 --- a/testsuite/gsk/compare-render.c +++ b/testsuite/gsk/compare-render.c -@@ -234,11 +234,19 @@ main (int argc, char **argv) +@@ -236,11 +236,19 @@ main (int argc, char **argv) } else { diff --git a/debian/patches/reftests-Allow-minor-differences-to-be-tolerated.patch b/debian/patches/reftests-Allow-minor-differences-to-be-tolerated.patch index 6572498e41..ac73d110e8 100644 --- a/debian/patches/reftests-Allow-minor-differences-to-be-tolerated.patch +++ b/debian/patches/reftests-Allow-minor-differences-to-be-tolerated.patch @@ -28,7 +28,7 @@ Applied-upstream: no, upstream want reftests to be a strict pass/fail with ident 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/testsuite/gsk/compare-render.c b/testsuite/gsk/compare-render.c -index f3c3568..6766a01 100644 +index 9742358..cd6bf50 100644 --- a/testsuite/gsk/compare-render.c +++ b/testsuite/gsk/compare-render.c @@ -98,6 +98,12 @@ get_output_file (const char *file, @@ -44,7 +44,7 @@ index f3c3568..6766a01 100644 static void save_image (cairo_surface_t *surface, const char *test_name, -@@ -244,12 +250,35 @@ main (int argc, char **argv) +@@ -246,12 +252,35 @@ main (int argc, char **argv) if (diff_surface) { diff --git a/debian/patches/series b/debian/patches/series index 67a3976cb9..125a73b22d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,3 @@ -compose-Generate-endian-dependent-compact-Compose-data.patch -compose-Document-how-to-get-compose-parse-input-from-libX.patch -compose-Update-sequences-from-libX11-1.7.2.patch -reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch reftest_compare_surfaces-Report-how-much-the-images-diffe.patch reftests-Allow-minor-differences-to-be-tolerated.patch debian/Disable-web-fonts-for-now.patch -- 2.30.2