From 7d6b6a098b248aed375175b929d1574f7952f345 Mon Sep 17 00:00:00 2001 From: David King Date: Sun, 20 Mar 2022 16:42:13 +0000 Subject: [PATCH] Update to 1.17.6 --- .gitignore | 1 + 125.patch | 58 ------------ cairo-1.17.4-meson-trace.patch | 32 ------- cairo-1.17.4-meson-xcb.patch | 42 --------- cairo-1.17.4-meson-xml.patch | 41 -------- ...oc.patch => cairo-1.17.6-meson-fixes.patch | 93 ++++--------------- cairo.spec | 24 ++--- sources | 2 +- 8 files changed, 31 insertions(+), 262 deletions(-) delete mode 100644 125.patch delete mode 100644 cairo-1.17.4-meson-trace.patch delete mode 100644 cairo-1.17.4-meson-xcb.patch delete mode 100644 cairo-1.17.4-meson-xml.patch rename cairo-1.17.4-meson-gtkdoc.patch => cairo-1.17.6-meson-fixes.patch (62%) diff --git a/.gitignore b/.gitignore index 494f716..1782758 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ cairo-1.9.14.tar.gz /cairo-1.15.14.tar.xz /cairo-1.16.0.tar.xz /cairo-1.17.4.tar.xz +/cairo-1.17.6.tar.xz diff --git a/125.patch b/125.patch deleted file mode 100644 index d5cfe2f..0000000 --- a/125.patch +++ /dev/null @@ -1,58 +0,0 @@ -From a3b69a0215fdface0fd5730872a4b3242d979dca Mon Sep 17 00:00:00 2001 -From: Uli Schlachter -Date: Tue, 9 Feb 2021 16:54:35 +0100 -Subject: [PATCH] pdf font subset: Generate valid font names - -A hash value is encoded in base 26 with upper case letters for font -names. - -Commit ed984146 replaced "numerator = abs (hash);" with "numerator = -hash;" in this code, because hash has type uint32_t and the compiler -warned about taking the absolute value of an unsigned value. However, -abs() is actually defined to take an int argument. Thus, there was some -implicit cast. - -Since numerator has type long, i.e. is signed, it is now actually -possible to get an overflow in the implicit cast and then have a -negative number. The following code is not prepared for this and -produces non-letters when encoding the hash. - -This commit fixes that problem by not using ldiv() and instead using / -and % to directly compute the needed values. This gets rid of the need -to convert to type long. Since now everything works with uint32_t, there -is no more chance for negative numbers messing things up. - -Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/449 -Signed-off-by: Uli Schlachter ---- - src/cairo-pdf-surface.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c -index 6da460878..52c49b6d2 100644 ---- a/src/cairo-pdf-surface.c -+++ b/src/cairo-pdf-surface.c -@@ -5310,18 +5310,14 @@ _create_font_subset_tag (cairo_scaled_font_subset_t *font_subset, - { - uint32_t hash; - int i; -- long numerator; -- ldiv_t d; - - hash = _hash_data ((unsigned char *) font_name, strlen(font_name), 0); - hash = _hash_data ((unsigned char *) (font_subset->glyphs), - font_subset->num_glyphs * sizeof(unsigned long), hash); - -- numerator = hash; - for (i = 0; i < 6; i++) { -- d = ldiv (numerator, 26); -- numerator = d.quot; -- tag[i] = 'A' + d.rem; -+ tag[i] = 'A' + (hash % 26); -+ hash /= 26; - } - tag[i] = 0; - } --- -GitLab - diff --git a/cairo-1.17.4-meson-trace.patch b/cairo-1.17.4-meson-trace.patch deleted file mode 100644 index 524f319..0000000 --- a/cairo-1.17.4-meson-trace.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ca478e03270868d9380f7372df25a0f3357430a4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= -Date: Tue, 9 Mar 2021 10:59:57 +0000 -Subject: [PATCH] meson: make cairo-trace executable - -Install with exec flag set and make sure tool is -executable in build directory as well (by making -the input file in the source directory executable). - -Fixes #462 ---- - util/cairo-trace/cairo-trace.in | 0 - util/cairo-trace/meson.build | 1 + - 2 files changed, 1 insertion(+) - mode change 100644 => 100755 util/cairo-trace/cairo-trace.in - -diff --git a/util/cairo-trace/cairo-trace.in b/util/cairo-trace/cairo-trace.in -old mode 100644 -new mode 100755 -diff --git a/util/cairo-trace/meson.build b/util/cairo-trace/meson.build -index e836f98cf..7048786eb 100644 ---- a/util/cairo-trace/meson.build -+++ b/util/cairo-trace/meson.build -@@ -31,4 +31,5 @@ configure_file(input: 'cairo-trace.in', - configuration: trace_conf, - install: true, - install_dir: join_paths(get_option('prefix'), get_option('bindir')), -+ install_mode: 'rwxr-xr-x', - ) --- -2.35.1 - diff --git a/cairo-1.17.4-meson-xcb.patch b/cairo-1.17.4-meson-xcb.patch deleted file mode 100644 index 5060507..0000000 --- a/cairo-1.17.4-meson-xcb.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3468c67fe91f0c37e0ec5d335082653a6fa609b6 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Thu, 25 Feb 2021 01:27:10 +0000 -Subject: [PATCH] meson: add xlib-xcb option and disable by default - -Just like autotools does. - -Closes #438. ---- - meson.build | 3 +-- - meson_options.txt | 1 + - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 96dd1abd4..b1759b5f3 100644 ---- a/meson.build -+++ b/meson.build -@@ -331,8 +331,7 @@ if xcb_dep.found() and xcb_render_dep.found() - endif - - if feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1 and feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1 -- # FIXME: automagic -- x11xcb_dep = dependency('x11-xcb', required: false) -+ x11xcb_dep = dependency('x11-xcb', required: get_option('xlib-xcb')) - if x11xcb_dep.found() - deps += [x11xcb_dep] - feature_conf.set('CAIRO_HAS_XLIB_XCB_FUNCTIONS', 1) -diff --git a/meson_options.txt b/meson_options.txt -index 2b4b46f7b..7ec0dc92a 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -18,6 +18,7 @@ option('qt', type : 'feature', value : 'disabled') - option('tee', type : 'feature', value : 'disabled') - option('xcb', type : 'feature', value : 'auto') - option('xlib', type : 'feature', value : 'auto') -+option('xlib-xcb', type : 'feature', value : 'disabled') - #option('xml', type : 'feature', value : 'disabled') - option('zlib', type : 'feature', value : 'auto') # script, ps, pdf, xml surfaces - --- -GitLab - diff --git a/cairo-1.17.4-meson-xml.patch b/cairo-1.17.4-meson-xml.patch deleted file mode 100644 index a3c0171..0000000 --- a/cairo-1.17.4-meson-xml.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b5f8d00a20e8f2876e23dc5627df3502eb8e0f90 Mon Sep 17 00:00:00 2001 -From: David King -Date: Tue, 15 Feb 2022 13:31:48 +0000 -Subject: [PATCH] meson: Add xml option and disable by default - -Just like autotools does. ---- - meson.build | 3 +-- - meson_options.txt | 2 +- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 109020bdb..4c642ede6 100644 ---- a/meson.build -+++ b/meson.build -@@ -646,8 +646,7 @@ if zlib_dep.found() - feature_conf.set('CAIRO_HAS_INTERPRETER', 1) - endif - --# TODO: add xml option and disable by default --if zlib_dep.found() and png_dep.found() -+if zlib_dep.found() and png_dep.found() and get_option('xml').enabled() - feature_conf.set('CAIRO_HAS_XML_SURFACE', 1) - built_features += [{ - 'name': 'cairo-xml', -diff --git a/meson_options.txt b/meson_options.txt -index f7361a9df..0ccbdc1ca 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -18,7 +18,7 @@ option('tee', type : 'feature', value : 'disabled') - option('xcb', type : 'feature', value : 'auto') - option('xlib', type : 'feature', value : 'auto') - option('xlib-xcb', type : 'feature', value : 'disabled') --#option('xml', type : 'feature', value : 'disabled') -+option('xml', type : 'feature', value : 'disabled') - option('zlib', type : 'feature', value : 'auto') # script, ps, pdf, xml surfaces - - # Tests --- -2.34.1 - diff --git a/cairo-1.17.4-meson-gtkdoc.patch b/cairo-1.17.6-meson-fixes.patch similarity index 62% rename from cairo-1.17.4-meson-gtkdoc.patch rename to cairo-1.17.6-meson-fixes.patch index 9d61fe5..ea02448 100644 --- a/cairo-1.17.4-meson-gtkdoc.patch +++ b/cairo-1.17.6-meson-fixes.patch @@ -1,33 +1,11 @@ -From 1c1bce40949492a6772470385aa76151500a4dac Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Tue, 27 Apr 2021 12:08:52 +0100 -Subject: [PATCH] meson: Build the API reference - -The Meson build system should build the API reference using gtk-doc, -like the Autotools build does. - -The option is called `gtk_doc`, which matches the existing practices in -various projects using Meson and gtk-doc. ---- - doc/public/meson.build | 157 ++++++++++++++++++++++++++++++++++++++ - doc/public/version.xml.in | 1 + - meson.build | 9 +++ - meson_options.txt | 4 + - 4 files changed, 171 insertions(+) - create mode 100644 doc/public/meson.build - create mode 100644 doc/public/version.xml.in - -diff --git a/doc/public/meson.build b/doc/public/meson.build -new file mode 100644 -index 000000000..2c27105b4 ---- /dev/null -+++ b/doc/public/meson.build -@@ -0,0 +1,157 @@ +diff -urN cairo-1.17.6.old/doc/public/meson.build cairo-1.17.6/doc/public/meson.build +--- cairo-1.17.6.old/doc/public/meson.build 1970-01-01 01:00:00.000000000 +0100 ++++ cairo-1.17.6/doc/public/meson.build 2022-03-20 16:22:31.018317576 +0000 +@@ -0,0 +1,156 @@ +gnome = import('gnome') + +ignore_headers = [ + # Sub-directories -+ 'drm', + 'win32', + + # Internal headers @@ -180,54 +158,21 @@ index 000000000..2c27105b4 + install: true, + check: true, +) -diff --git a/doc/public/version.xml.in b/doc/public/version.xml.in -new file mode 100644 -index 000000000..6bd185791 ---- /dev/null -+++ b/doc/public/version.xml.in +diff -urN cairo-1.17.6.old/doc/public/version.xml.in cairo-1.17.6/doc/public/version.xml.in +--- cairo-1.17.6.old/doc/public/version.xml.in 1970-01-01 01:00:00.000000000 +0100 ++++ cairo-1.17.6/doc/public/version.xml.in 2022-03-20 16:33:04.015756161 +0000 @@ -0,0 +1 @@ +@CAIRO_VERSION@ -diff --git a/meson.build b/meson.build -index b159b4071..8098261ff 100644 ---- a/meson.build -+++ b/meson.build -@@ -862,6 +862,14 @@ if not get_option('tests').disabled() and feature_conf.get('CAIRO_HAS_PNG_FUNCTI - subdir('test') - endif - -+if get_option('gtk_doc') -+ if not meson.version().version_compare('>=0.52.0') -+ error('Building documentation requires Meson >= 0.52.0.') -+ endif -+ doc_srcdir = include_directories('src') -+ subdir('doc/public') -+endif +diff -urN cairo-1.17.6.old/meson-cc-tests/check-unused-result.c cairo-1.17.6/meson-cc-tests/check-unused-result.c +--- cairo-1.17.6.old/meson-cc-tests/check-unused-result.c 1970-01-01 01:00:00.000000000 +0100 ++++ cairo-1.17.6/meson-cc-tests/check-unused-result.c 2022-03-20 15:55:39.285562258 +0000 +@@ -0,0 +1,9 @@ ++__attribute__((__warn_unused_result__)) void f (void) {} ++__attribute__((__warn_unused_result__)) int g; + - configure_file(output: 'config.h', configuration: conf) - - foreach feature: built_features -@@ -931,5 +939,6 @@ if meson.version().version_compare('>= 0.53') - summary({ - 'cairo-trace:': conf.get('CAIRO_HAS_TRACE', 0) == 1, - 'cairo-script-interpreter': feature_conf.get('CAIRO_HAS_INTERPRETER', 0) == 1, -+ 'API reference': get_option('gtk_doc'), - }, section: 'Features and Utilities', bool_yn: true) - endif -diff --git a/meson_options.txt b/meson_options.txt -index ff11fe7ed..30f6e1df8 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -30,6 +30,10 @@ option('gtk2-utils', type : 'feature', value : 'disabled') - option('glib', type : 'feature', value : 'auto') - option('spectre', type : 'feature', value : 'auto') - -+# Documentation -+option('gtk_doc', type : 'boolean', value : false, -+ description: 'Build the Cairo API reference (depends on gtk-doc)') -+ - # FIXME: implement these to avoid automagic - #option('egl', type : 'feature', value : 'auto') - #option('glx', type : 'feature', value : 'auto') --- -2.34.1 - ++int main(int c, char **v) ++{ ++ (void)c; ++ (void)v; ++ return 0; ++} diff --git a/cairo.spec b/cairo.spec index 9a24970..a08e17e 100644 --- a/cairo.spec +++ b/cairo.spec @@ -3,28 +3,19 @@ %define fontconfig_version 2.2.95 Name: cairo -Version: 1.17.4 -Release: 7%{?dist} +Version: 1.17.6 +Release: 1%{?dist} Summary: A 2D graphics library License: LGPLv2 or MPLv1.1 URL: https://cairographics.org -Source0: https://cairographics.org/snapshots/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/%{name}/1.17/%{name}-%{version}.tar.xz Patch0: cairo-multilib.patch # https://gitlab.freedesktop.org/cairo/cairo/merge_requests/1 Patch1: 0001-Set-default-LCD-filter-to-FreeType-s-default.patch -# Fix generating PDF font names -# https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/125 -Patch2: 125.patch -# https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/168 -Patch3: cairo-1.17.4-meson-gtkdoc.patch -# https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/132 -Patch4: cairo-1.17.4-meson-xcb.patch -# https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/275 -Patch5: cairo-1.17.4-meson-xml.patch - -Patch6: cairo-1.17.4-meson-trace.patch +# https://gitlab.freedesktop.org/cairo/cairo/-/issues/547 +Patch2: cairo-1.17.6-meson-fixes.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -104,6 +95,7 @@ This package contains tools for working with the cairo graphics library. -Dglib=enabled \ -Dgtk_doc=true \ -Dspectre=disabled \ + -Dsymbol-lookup=disabled \ -Dtee=enabled \ -Dtests=disabled \ -Dxcb=enabled \ @@ -145,6 +137,7 @@ This package contains tools for working with the cairo graphics library. %{_libdir}/pkgconfig/cairo-pdf.pc %{_libdir}/pkgconfig/cairo-png.pc %{_libdir}/pkgconfig/cairo-ps.pc +%{_libdir}/pkgconfig/cairo-script-interpreter.pc %{_libdir}/pkgconfig/cairo-svg.pc %{_libdir}/pkgconfig/cairo-tee.pc %{_libdir}/pkgconfig/cairo-xlib.pc @@ -168,6 +161,9 @@ This package contains tools for working with the cairo graphics library. %{_libdir}/cairo/ %changelog +* Fri Mar 18 2022 David King - 1.17.6-1 +- Update to 1.17.6 + * Fri Feb 25 2022 David King - 1.17.4-7 - Fix permissions on cairo-trace - Add explicit Requires to tools subpackage diff --git a/sources b/sources index 7a8abb3..1e053d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cairo-1.17.4.tar.xz) = 843dce4f1cb5d9fb0c33240dff658ba2723bf04697045d16669e4b7674a5287ef0eb3d960a688a129902fb714230263e35d085186dc220b65307b5ad7fa09d23 +SHA512 (cairo-1.17.6.tar.xz) = 15d9a82097b9c5a43071ff9fbfe90d7aaee5fddb84f519cdddfe312c5fc7248a50b73a5351922de2aaafa4b2e86f911b3147609538346f8a7635f34d631c9146