[cairo-commit] 11 commits - meson.build src/cairoint.h src/cairo-surface.c src/meson.build subprojects/expat.wrap subprojects/.gitignore

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 11:43:04 UTC 2022


 meson.build            |  123 +++++++++++++++++++++++--------------------------
 src/cairo-surface.c    |    4 +
 src/cairoint.h         |    2 
 src/meson.build        |   10 +++
 subprojects/.gitignore |    2 
 subprojects/expat.wrap |    8 +--
 6 files changed, 76 insertions(+), 73 deletions(-)

New commits:
commit 396d258e4104219599c2e196f6a5ce4ea82178fd
Merge: fb3734fac 603cdf939
Author: Emmanuele Bassi <ebassi at gmail.com>
Date:   Fri Feb 11 11:43:02 2022 +0000

    Merge branch 'fix-rtl-color-glyphs' into 'master'
    
    Fix rtl handling for color glyphs
    
    Closes #533
    
    See merge request cairo/cairo!272

commit 603cdf939f164142ef53a0dd49e95057e7df8a6f
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Fri Feb 11 05:44:39 2022 -0500

    Fix rtl handling for color glyphs
    
    When the run contains a mix of color and non-color
    glyphs, composite_color_glyphs returns the non-color
    glyphs unhandled in the same array. In the rtl case,
    the glyphs are processed from the end and the unhandled
    glyphs are accumulated at the end as well, and we
    need to move them to the beginning of the array before
    we return. Add the missing memmove call to do that.
    
    Fixes: #533

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index eea7d6030..d847d772a 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2771,8 +2771,10 @@ composite_color_glyphs (cairo_surface_t             *surface,
             byte_pos += clusters[i].num_bytes;
         }
 
-        if (cluster_flags & CAIRO_TEXT_CLUSTER_FLAG_BACKWARD)
+        if (cluster_flags & CAIRO_TEXT_CLUSTER_FLAG_BACKWARD) {
             memmove (utf8, utf8 + *utf8_len - remaining_bytes, remaining_bytes);
+            memmove (glyphs, glyphs + (*num_glyphs - remaining_glyphs), sizeof (cairo_glyph_t) * remaining_glyphs);
+        }
 
         *utf8_len = remaining_bytes;
         *num_glyphs = remaining_glyphs;
commit fb3734fac0b41eb370911b04cbfa6604a99e6bf7
Merge: a6b2a39f3 57498b301
Author: Emmanuele Bassi <ebassi at gmail.com>
Date:   Fri Jan 21 14:14:23 2022 +0000

    Merge branch 'fix-build-when-pdf-is-disabled' into 'master'
    
    meson: Fix build when PDF backend is disabled
    
    See merge request cairo/cairo!269

commit 57498b301c10fa24b4882c1b2d5785eff3f25c1a
Author: Nirbheek Chauhan <nirbheek at centricular.com>
Date:   Fri Jan 21 11:58:09 2022 +0530

    meson: Fix build when PDF backend is disabled
    
    Symbols from cairo-tag-stack.c are used by cairo-tag-attributes.c, so
    this should be in the same list of sources as that. Fixes this build
    error:
    
    ```
    /usr/bin/ld: src/libcairo.so.2.11705.0.p/cairo-tag-attributes.c.o: in function `parse_array':
    /path/to/cairo/_build/../src/cairo-tag-attributes.c:347: undefined reference to `_cairo_tag_error'
    /usr/bin/ld: src/libcairo.so.2.11705.0.p/cairo-tag-attributes.c.o: in function `parse_name':
    /path/to/cairo/cairo/_build/../src/cairo-tag-attributes.c:359: undefined reference to `_cairo_tag_error'
    /usr/bin/ld: src/libcairo.so.2.11705.0.p/cairo-tag-attributes.c.o: in function `parse_attributes':
    /path/to/cairo/cairo/_build/../src/cairo-tag-attributes.c:410: undefined reference to `_cairo_tag_error'
    /usr/bin/ld: /path/to/cairo/cairo/_build/../src/cairo-tag-attributes.c:431: undefined reference to `_cairo_tag_error'
    /usr/bin/ld: /path/to/cairo/cairo/_build/../src/cairo-tag-attributes.c:441: undefined reference to `_cairo_tag_error'
    /usr/bin/ld: src/libcairo.so.2.11705.0.p/cairo-tag-attributes.c.o:/path/to/cairo/cairo/_build/../src/cairo-tag-attributes.c:455: more undefined references to `_cairo_tag_error' follow
    /usr/bin/ld: src/libcairo.so.2.11705.0: hidden symbol `_cairo_tag_error' isn't defined
    ```

diff --git a/src/meson.build b/src/meson.build
index 99b3a84a6..d0a8853f6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -114,6 +114,7 @@ cairo_sources = [
   'cairo-pdf-operators.c',
   'cairo-pdf-shading.c',
   'cairo-tag-attributes.c',
+  'cairo-tag-stack.c',
   'cairo-deflate-stream.c',
 ]
 
@@ -234,7 +235,6 @@ cairo_feature_sources = {
   'cairo-pdf': [
     'cairo-pdf-surface.c',
     'cairo-pdf-interchange.c',
-    'cairo-tag-stack.c',
   ],
   'cairo-svg': [
     'cairo-svg-surface.c',
commit a6b2a39f36aa2ac9a1d8afec16d042694839f48f
Merge: 5c9112b25 ef149976e
Author: Uli Schlachter <psychon at znc.in>
Date:   Wed Jan 12 16:52:45 2022 +0000

    Merge branch 'fix-doc-warning' into 'master'
    
    Fix a doc comment
    
    See merge request cairo/cairo!263

commit 5c9112b25ea97566e8c8707420dec8f76c02f6d6
Merge: 46c0b8bb4 e3b4db164
Author: Uli Schlachter <psychon at znc.in>
Date:   Sun Jan 9 19:02:22 2022 +0000

    Merge branch 'meson-redundant-version_compare' into 'master'
    
    meson: Remove useless version_compare()
    
    See merge request cairo/cairo!267

commit e3b4db1645775a7c176f1bcf72727b1e946d4dd1
Author: Nirbheek Chauhan <nirbheek at centricular.com>
Date:   Sun Jan 9 17:17:28 2022 +0530

    meson: Remove useless version_compare()
    
    We require meson 0.56 in project() now, all these are redundant.

diff --git a/meson.build b/meson.build
index 3c261d0ff..5999e586f 100644
--- a/meson.build
+++ b/meson.build
@@ -103,15 +103,13 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
 add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
 
 # Make sure source directory hasn't been configured with autotools
-if meson.version().version_compare('>= 0.53')
-  fs = import('fs')
-  if fs.exists('config.h') or fs.exists('src/cairo-features.h') or fs.exists('src/cairo-supported-features.h')
-    error('''
-          The source directory '@0@' appears to contain
-          autotools configuration artifacts. This can cause difficult to
-          debug build problems. Please clean it up and then re-run meson.
-          '''.format(meson.source_root()))
-  endif
+fs = import('fs')
+if fs.exists('config.h') or fs.exists('src/cairo-features.h') or fs.exists('src/cairo-supported-features.h')
+  error('''
+        The source directory '@0@' appears to contain
+        autotools configuration artifacts. This can cause difficult to
+        debug build problems. Please clean it up and then re-run meson.
+        '''.format(meson.source_root()))
 endif
 
 pkgmod = import('pkgconfig')
@@ -975,9 +973,6 @@ if not get_option('tests').disabled() and feature_conf.get('CAIRO_HAS_PNG_FUNCTI
 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
@@ -1000,56 +995,54 @@ foreach feature: built_features
 endforeach
 
 # summary
-if meson.version().version_compare('>= 0.53')
-  summary({
-          'Image': true,
-          'Recording': true,
-          'Observer': true,
-          'Mime': true,
-          'Tee': feature_conf.get('CAIRO_HAS_TEE_SURFACE', 0) == 1,
-          'XML': feature_conf.get('CAIRO_HAS_XML_SURFACE', 0) == 1,
-          'Xlib': feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1,
-          'Xlib Xrender': feature_conf.get('CAIRO_HAS_XLIB_XRENDER_SURFACE', 0) == 1,
-          'Qt': feature_conf.get('CAIRO_HAS_QT_SURFACE', 0) == 1,
-          'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_SURFACE', 0) == 1,
-          'Quartz-image': feature_conf.get('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 0) == 1,
-          'XCB': feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1,
-          'Win32': feature_conf.get('CAIRO_HAS_WIN32_SURFACE', 0) == 1,
-          'OS2': false,
-          'CairoScript': feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1,
-          'PostScript':  feature_conf.get('CAIRO_HAS_PS_SURFACE', 0) == 1,
-          'PDF':  feature_conf.get('CAIRO_HAS_PDF_SURFACE', 0) == 1,
-          'SVG':  feature_conf.get('CAIRO_HAS_SVG_SURFACE', 0) == 1,
-          'OpenGL': feature_conf.get('CAIRO_HAS_GL_SURFACE', 0) == 1,
-          'OpenGL ES 2.0': feature_conf.get('CAIRO_HAS_GLESV2_SURFACE', 0) == 1,
-          'OpenGL ES 3.0': feature_conf.get('CAIRO_HAS_GLESV3_SURFACE', 0) == 1,
-          'BeOS': false,
-          'DirectFB': feature_conf.get('CAIRO_HAS_DIRECTFB_SURFACE', 0) == 1,
-          'OpenVG': feature_conf.get('CAIRO_HAS_VG_SURFACE', 0) == 1,
-          'DRM': feature_conf.get('CAIRO_HAS_DRM_SURFACE', 0) == 1,
-          'Cogl': feature_conf.get('CAIRO_HAS_COGL_SURFACE', 0) == 1,
-          }, section: 'Surface Backends', bool_yn: true)
-
-  summary({
-          'User': true,
-          'FreeType': feature_conf.get('CAIRO_HAS_FT_FONT', 0) == 1,
-          'Fontconfig': feature_conf.get('CAIRO_HAS_FC_FONT', 0) == 1,
-          'Win32': feature_conf.get('CAIRO_HAS_WIN32_FONT', 0) == 1,
-          'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_FONT', 0) == 1,
-          }, section: 'Font Backends', bool_yn: true)
-
-  summary({
-          'PNG functions': feature_conf.get('CAIRO_HAS_PNG_FUNCTIONS', 0) == 1,
-          'GLX functions': feature_conf.get('CAIRO_HAS_GLX_FUNCTIONS', 0) == 1,
-          'WGL functions': feature_conf.get('CAIRO_HAS_WGL_FUNCTIONS', 0) == 1,
-          'EGL functions': feature_conf.get('CAIRO_HAS_EGL_FUNCTIONS', 0) == 1,
-          'X11-xcb': feature_conf.get('CAIRO_HAS_XLIB_XCB_FUNCTIONS', 0) == 1,
-          'XCB-shm': feature_conf.get('CAIRO_HAS_XCB_SHM_FUNCTIONS', 0) == 1,
-          }, section: 'Functions', bool_yn: true)
-
-  summary({
-          'cairo-trace:': conf.get('CAIRO_HAS_TRACE', 0) == 1,
-          'cairo-script-interpreter': conf.get('CAIRO_HAS_INTERPRETER', 0) == 1,
-          'API reference': get_option('gtk_doc'),
-          }, section: 'Features and Utilities', bool_yn: true)
-endif
+summary({
+        'Image': true,
+        'Recording': true,
+        'Observer': true,
+        'Mime': true,
+        'Tee': feature_conf.get('CAIRO_HAS_TEE_SURFACE', 0) == 1,
+        'XML': feature_conf.get('CAIRO_HAS_XML_SURFACE', 0) == 1,
+        'Xlib': feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1,
+        'Xlib Xrender': feature_conf.get('CAIRO_HAS_XLIB_XRENDER_SURFACE', 0) == 1,
+        'Qt': feature_conf.get('CAIRO_HAS_QT_SURFACE', 0) == 1,
+        'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_SURFACE', 0) == 1,
+        'Quartz-image': feature_conf.get('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 0) == 1,
+        'XCB': feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1,
+        'Win32': feature_conf.get('CAIRO_HAS_WIN32_SURFACE', 0) == 1,
+        'OS2': false,
+        'CairoScript': feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1,
+        'PostScript':  feature_conf.get('CAIRO_HAS_PS_SURFACE', 0) == 1,
+        'PDF':  feature_conf.get('CAIRO_HAS_PDF_SURFACE', 0) == 1,
+        'SVG':  feature_conf.get('CAIRO_HAS_SVG_SURFACE', 0) == 1,
+        'OpenGL': feature_conf.get('CAIRO_HAS_GL_SURFACE', 0) == 1,
+        'OpenGL ES 2.0': feature_conf.get('CAIRO_HAS_GLESV2_SURFACE', 0) == 1,
+        'OpenGL ES 3.0': feature_conf.get('CAIRO_HAS_GLESV3_SURFACE', 0) == 1,
+        'BeOS': false,
+        'DirectFB': feature_conf.get('CAIRO_HAS_DIRECTFB_SURFACE', 0) == 1,
+        'OpenVG': feature_conf.get('CAIRO_HAS_VG_SURFACE', 0) == 1,
+        'DRM': feature_conf.get('CAIRO_HAS_DRM_SURFACE', 0) == 1,
+        'Cogl': feature_conf.get('CAIRO_HAS_COGL_SURFACE', 0) == 1,
+        }, section: 'Surface Backends', bool_yn: true)
+
+summary({
+        'User': true,
+        'FreeType': feature_conf.get('CAIRO_HAS_FT_FONT', 0) == 1,
+        'Fontconfig': feature_conf.get('CAIRO_HAS_FC_FONT', 0) == 1,
+        'Win32': feature_conf.get('CAIRO_HAS_WIN32_FONT', 0) == 1,
+        'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_FONT', 0) == 1,
+        }, section: 'Font Backends', bool_yn: true)
+
+summary({
+        'PNG functions': feature_conf.get('CAIRO_HAS_PNG_FUNCTIONS', 0) == 1,
+        'GLX functions': feature_conf.get('CAIRO_HAS_GLX_FUNCTIONS', 0) == 1,
+        'WGL functions': feature_conf.get('CAIRO_HAS_WGL_FUNCTIONS', 0) == 1,
+        'EGL functions': feature_conf.get('CAIRO_HAS_EGL_FUNCTIONS', 0) == 1,
+        'X11-xcb': feature_conf.get('CAIRO_HAS_XLIB_XCB_FUNCTIONS', 0) == 1,
+        'XCB-shm': feature_conf.get('CAIRO_HAS_XCB_SHM_FUNCTIONS', 0) == 1,
+        }, section: 'Functions', bool_yn: true)
+
+summary({
+        'cairo-trace:': conf.get('CAIRO_HAS_TRACE', 0) == 1,
+        'cairo-script-interpreter': conf.get('CAIRO_HAS_INTERPRETER', 0) == 1,
+        'API reference': get_option('gtk_doc'),
+        }, section: 'Features and Utilities', bool_yn: true)
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
index 0cd778d45..cd557edb7 100644
--- a/subprojects/.gitignore
+++ b/subprojects/.gitignore
@@ -1,4 +1,4 @@
-/expat-2.2.5
+/expat-*/
 /freetype2
 /glib
 /gperf
commit 46c0b8bb4fe53422c93619628212717251821f2e
Merge: a04786b93 ca25e9860
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Jan 1 19:37:24 2022 +0000

    Merge branch 'amos/win32-static-build' into 'master'
    
    Set CAIRO_WIN32_STATIC_BUILD when doing a static build on windows
    
    See merge request cairo/cairo!265

commit ca25e9860d569f57e361d7956ae1d819a57493fb
Author: Amos Wenger <amoswenger at gmail.com>
Date:   Wed Dec 8 13:36:05 2021 +0100

    Upgrade to expat-2.2.9-4 wrap
    
    This provides the XML_STATIC definition when cairo is built as a static
    library on Windows, see https://github.com/mesonbuild/wrapdb/pull/237

diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap
index f5f595c02..3f7091485 100644
--- a/subprojects/expat.wrap
+++ b/subprojects/expat.wrap
@@ -3,7 +3,9 @@ directory = expat-2.2.9
 source_url = https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.xz
 source_filename = expat-2.2.9.tar.bz2
 source_hash = 1ea6965b15c2106b6bbe883397271c80dfa0331cdf821b2c319591b55eadc0a4
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/expat/2.2.9/3/get_zip
-patch_filename = expat-2.2.9-3-wrap.zip
-patch_hash = e9aaace62e9a158b5e96f5c38c9f81f369179206acd87697653d777c0d3975d3
+patch_filename = expat_2.2.9-4_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.2.9-4/get_patch
+patch_hash = 8337fcf3928bbf9048a1a6a93b41a55588a5c9838a860bcc7c57f0e2a9517e95
 
+[provide]
+expat = expat_dep
\ No newline at end of file
commit 4d9657ad0df20c4bb56e33a8d4b33b91f7c5a9f7
Author: Amos Wenger <amoswenger at gmail.com>
Date:   Tue Dec 7 12:13:02 2021 +0100

    Set CAIRO_WIN32_STATIC_BUILD when doing a static build on windows

diff --git a/src/meson.build b/src/meson.build
index bfe7c9018..99b3a84a6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -307,9 +307,15 @@ libcairo = library('cairo', cairo_sources,
 
 cairo_headers += [configure_file(output: 'cairo-features.h', configuration: feature_conf)]
 
+cairo_static_args = []
+if get_option('default_library') == 'static' and host_machine.system() == 'windows'
+  cairo_static_args += ['-DCAIRO_WIN32_STATIC_BUILD']
+endif
+
 libcairo_dep = declare_dependency(link_with: libcairo,
   dependencies: deps,
-  include_directories: incsrc
+  include_directories: incsrc,
+  compile_args: cairo_static_args,
 )
 
 pkgmod.generate(libcairo,
commit ef149976e29e5809029d8f98e9506c4af2a8439f
Author: Uli Schlachter <psychon at znc.in>
Date:   Tue Nov 2 20:10:10 2021 +0100

    Fix a doc comment
    
    This commit fixes the following warning from our check-def.sh:
    
    PASS: check-def.sh
    Checking documentation for incorrect syntax
    ./cairoint.h (523): ERROR: Get invalid doc id (should be 'cairo_...:')
    ./cairoint.h (534): ERROR: Get bad line: ' */'
    ./cairoint.h (534): ERROR: Get documentation comment not closed with **/
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairoint.h b/src/cairoint.h
index c5872b8cc..8299bf92d 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -519,7 +519,7 @@ struct _cairo_scaled_font_backend {
     void
     (*fini)		(void			*scaled_font);
 
-/**
+/*
  * Get the requested glyph info.
  * @scaled_font: a #cairo_scaled_font_t
  * @scaled_glyph: a #cairo_scaled_glyph_t the glyph


More information about the cairo-commit mailing list