Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Perez de Castro <aperez@igalia.com>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>,
	Thomas Devoogdt <thomas@devoogdt.com>,
	yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com,
	buildroot@buildroot.org,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: Re: [Buildroot] [PATCH v6 3/3] package/cairo: bump to 1.18.0
Date: Wed, 17 Jan 2024 00:39:33 +0200	[thread overview]
Message-ID: <20240117003933.GF606830@igalia.com> (raw)
In-Reply-To: <20240107105539.1214363-3-thomas@devoogdt.com>


[-- Attachment #1.1: Type: text/plain, Size: 11204 bytes --]

On Sun, 07 Jan 2024 11:55:39 +0100 Thomas Devoogdt <thomas@devoogdt.com> wrote:
> News:
>  - https://www.cairographics.org/news/cairo-1.17.8/
>  - https://www.cairographics.org/news/cairo-1.18.0/
> 
> Some options are renamed/dropped so fix that along.
>  - GL and GLES drawing has been dropped in 1.17.8.
>  - The XML surface has been removed in 1.18.0.
> 
> Patches:
>  - drop 0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch, upstream: [1]
>  - drop 0002-Fix-mask-usage-in-image-compositor.patch, upstream: [2]
>  - add 0002-meson.build-fix-x11-build.patch, upstream: [3]
> 
> [1]: https://gitlab.freedesktop.org/cairo/cairo/-/commit/ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0
> [2]: https://gitlab.freedesktop.org/cairo/cairo/-/commit/03a820b173ed1fdef6ff14b4468f5dbc02ff59be
> [3]: https://gitlab.freedesktop.org/cairo/cairo/-/issues/613
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>

Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
Tested-by: Adrian Perez de Castro <aperez@igalia.com>

For testing I did a build using raspberrypi3_64_defconfig, then added WPE
WebKit + Cog + Cage and tested the image loading a few web sites and two
benchmarks (MotionMark and Speedometer).

> ---
> v5: split in 3 commits: https://lore.kernel.org/buildroot/20240105101105.6a181dcd@windsurf/
> ---
>  ...or_tolerance_normalized-fix-infinite.patch | 39 -------------
>  ...rivate.h-fix-missing-FT_Color-error.patch} |  0
>  ...2-Fix-mask-usage-in-image-compositor.patch | 56 -------------------
>  .../0002-meson.build-fix-x11-build.patch      | 29 ++++++++++
>  package/cairo/cairo.hash                      |  6 +-
>  package/cairo/cairo.mk                        | 21 ++++---
>  6 files changed, 43 insertions(+), 108 deletions(-)
>  delete mode 100644 package/cairo/0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch
>  rename package/cairo/{0003-cairo-ft-private.h-fix-missing-FT_Color-error.patch => 0001-cairo-ft-private.h-fix-missing-FT_Color-error.patch} (100%)
>  delete mode 100644 package/cairo/0002-Fix-mask-usage-in-image-compositor.patch
>  create mode 100644 package/cairo/0002-meson.build-fix-x11-build.patch
> 
> diff --git a/package/cairo/0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch b/package/cairo/0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch
> deleted file mode 100644
> index 078e90fa42..0000000000
> --- a/package/cairo/0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001
> -From: Heiko Lewin <hlewin@gmx.de>
> -Date: Sun, 1 Aug 2021 11:16:03 +0000
> -Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
> -
> -[Retrieved from:
> -https://gitlab.freedesktop.org/cairo/cairo/-/commit/ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0]
> -Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ----
> - src/cairo-arc.c | 4 +++-
> - 1 file changed, 3 insertions(+), 1 deletion(-)
> -
> -diff --git a/src/cairo-arc.c b/src/cairo-arc.c
> -index 390397bae..1c891d1a0 100644
> ---- a/src/cairo-arc.c
> -+++ b/src/cairo-arc.c
> -@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
> - 	{ M_PI / 11.0,  9.81410988043554039085e-09 },
> -     };
> -     int table_size = ARRAY_LENGTH (table);
> -+    const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
> - 
> -     for (i = 0; i < table_size; i++)
> - 	if (table[i].error < tolerance)
> - 	    return table[i].angle;
> - 
> -     ++i;
> -+
> -     do {
> - 	angle = M_PI / i++;
> - 	error = _arc_error_normalized (angle);
> --    } while (error > tolerance);
> -+    } while (error > tolerance && i < max_segments);
> - 
> -     return angle;
> - }
> --- 
> -2.38.1
> -
> diff --git a/package/cairo/0003-cairo-ft-private.h-fix-missing-FT_Color-error.patch b/package/cairo/0001-cairo-ft-private.h-fix-missing-FT_Color-error.patch
> similarity index 100%
> rename from package/cairo/0003-cairo-ft-private.h-fix-missing-FT_Color-error.patch
> rename to package/cairo/0001-cairo-ft-private.h-fix-missing-FT_Color-error.patch
> diff --git a/package/cairo/0002-Fix-mask-usage-in-image-compositor.patch b/package/cairo/0002-Fix-mask-usage-in-image-compositor.patch
> deleted file mode 100644
> index 54a95593c5..0000000000
> --- a/package/cairo/0002-Fix-mask-usage-in-image-compositor.patch
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
> -From: Heiko Lewin <heiko.lewin@worldiety.de>
> -Date: Tue, 15 Dec 2020 16:48:19 +0100
> -Subject: [PATCH] Fix mask usage in image-compositor
> -
> -[Retrieved from
> -https://gitlab.freedesktop.org/cairo/cairo/-/commit/03a820b173ed1fdef6ff14b4468f5dbc02ff59be]
> -[Removed changes in test/ directory to remove binary diff so that the
> -patch can be applied by `patch` tool]
> -Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ----
> - src/cairo-image-compositor.c | 8 ++++----
> - 1 file changed, 4 insertions(+), 4 deletions(-)
> -
> -diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
> -index bbf4cf228..2352c478e 100644
> ---- a/src/cairo-image-compositor.c
> -+++ b/src/cairo-image-compositor.c
> -@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
> - 		    unsigned num_spans)
> - {
> -     cairo_image_span_renderer_t *r = abstract_renderer;
> --    uint8_t *m;
> -+    uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
> -     int x0;
> - 
> -     if (num_spans == 0)
> - 	return CAIRO_STATUS_SUCCESS;
> - 
> -     x0 = spans[0].x;
> --    m = r->_buf;
> -+    m = base;
> -     do {
> - 	int len = spans[1].x - spans[0].x;
> - 	if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
> -@@ -2646,7 +2646,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
> - 				      spans[0].x, y,
> - 				      spans[1].x - spans[0].x, h);
> - 
> --	    m = r->_buf;
> -+	    m = base;
> - 	    x0 = spans[1].x;
> - 	} else if (spans[0].coverage == 0x0) {
> - 	    if (spans[0].x != x0) {
> -@@ -2675,7 +2675,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
> - #endif
> - 	    }
> - 
> --	    m = r->_buf;
> -+	    m = base;
> - 	    x0 = spans[1].x;
> - 	} else {
> - 	    *m++ = spans[0].coverage;
> --- 
> -2.38.1
> -
> diff --git a/package/cairo/0002-meson.build-fix-x11-build.patch b/package/cairo/0002-meson.build-fix-x11-build.patch
> new file mode 100644
> index 0000000000..fd17397586
> --- /dev/null
> +++ b/package/cairo/0002-meson.build-fix-x11-build.patch
> @@ -0,0 +1,29 @@
> +From 840e3ad20f8536d9857876ca2f5161896b68ab9b Mon Sep 17 00:00:00 2001
> +From: Thomas Devoogdt <thomas@devoogdt.com>
> +Date: Sun, 12 Nov 2023 10:44:13 +0100
> +Subject: [PATCH] meson.build: fix x11 build
> +
> +../../br-test-pkg/arm-aarch64/build/cairo-1.18.0/meson.build:381:13: ERROR: Can not run test applications in this cross environment.
> +
> +Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/issues/613
> +Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> +---
> + meson.build | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 9efe91978..9864b8699 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -369,7 +369,7 @@ if x11_dep.found() and xext_dep.found()
> + 
> +   # Can skip the run check by providing the result in a cross file or
> +   # native file as bool property value.
> +-  prop = meson.get_external_property('ipc_rmid_deferred_release', 'auto')
> ++  prop = meson.get_external_property('ipc_rmid_deferred_release', 'false')
> +   # We don't know the type of prop (bool, string) but need to differentiate
> +   # between a set value (bool) or the fallback value (string), so convert to
> +   # a string and check the string value.
> +-- 
> +2.34.1
> +
> diff --git a/package/cairo/cairo.hash b/package/cairo/cairo.hash
> index fca9ff678c..df9c693bad 100644
> --- a/package/cairo/cairo.hash
> +++ b/package/cairo/cairo.hash
> @@ -1,7 +1,5 @@
> -# From https://www.cairographics.org/snapshots/cairo-1.17.4.tar.xz.sha1
> -sha1  68712ae1039b114347be3b7200bc1c901d47a636  cairo-1.17.4.tar.xz
> -# Calculated based on the hash above
> -sha256  74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705  cairo-1.17.4.tar.xz
> +# From https://www.cairographics.org/releases/cairo-1.18.0.tar.xz.sha256sum
> +sha256  243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64  cairo-1.18.0.tar.xz
>  
>  # Hash for license files:
>  sha256  67228a9f7c5f9b67c58f556f1be178f62da4d9e2e6285318d8c74d567255abdf  COPYING
> diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
> index 190af15da0..a1e649e8e4 100644
> --- a/package/cairo/cairo.mk
> +++ b/package/cairo/cairo.mk
> @@ -4,19 +4,14 @@
>  #
>  ################################################################################
>  
> -CAIRO_VERSION = 1.17.4
> +CAIRO_VERSION = 1.18.0
>  CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz
>  CAIRO_LICENSE = LGPL-2.1 or MPL-1.1 (library)
>  CAIRO_LICENSE_FILES = COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
>  CAIRO_CPE_ID_VENDOR = cairographics
> -CAIRO_SITE = http://cairographics.org/snapshots
> +CAIRO_SITE = http://cairographics.org/releases
>  CAIRO_INSTALL_STAGING = YES
>  
> -# 0001-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch
> -CAIRO_IGNORE_CVES += CVE-2019-6462
> -# 0002-Fix-mask-usage-in-image-compositor.patch
> -CAIRO_IGNORE_CVES += CVE-2020-35492
> -
>  CAIRO_CFLAGS = $(TARGET_CFLAGS)
>  CAIRO_LDFLAGS = $(TARGET_LDFLAGS)
>  
> @@ -32,9 +27,13 @@ CAIRO_LDFLAGS += -latomic
>  endif
>  
>  CAIRO_CONF_OPTS = \
> +	-Ddwrite=disabled \
>  	-Dfontconfig=enabled \
> +	-Dquartz=disabled \
>  	-Dtests=disabled \
>  	-Dspectre=disabled \
> +	-Dsymbol-lookup=disabled \
> +	-Dgtk_doc=false \
>  	-Dc_std=gnu11
>  CAIRO_DEPENDENCIES = \
>  	host-pkgconf \
> @@ -43,9 +42,11 @@ CAIRO_DEPENDENCIES = \
>  
>  # Just the bare minimum to make other host-* packages happy
>  HOST_CAIRO_CONF_OPTS = \
> +	-Ddwrite=disabled \
>  	-Dfontconfig=enabled \
>  	-Dfreetype=enabled \
>  	-Dpng=enabled \
> +	-Dquartz=disabled \
>  	-Dtee=disabled \
>  	-Dxcb=disabled \
>  	-Dxlib=disabled \
> @@ -53,6 +54,8 @@ HOST_CAIRO_CONF_OPTS = \
>  	-Dtests=disabled \
>  	-Dglib=enabled \
>  	-Dspectre=disabled \
> +	-Dsymbol-lookup=disabled \
> +	-Dgtk_doc=false \
>  	-Dc_std=gnu11
>  HOST_CAIRO_DEPENDENCIES = \
>  	host-freetype \
> @@ -88,10 +91,10 @@ CAIRO_CONF_OPTS += -Dtee=disabled
>  endif
>  
>  ifeq ($(BR2_PACKAGE_XORG7),y)
> -CAIRO_CONF_OPTS += -Dxcb=enabled -Dxlib=enabled
> +CAIRO_CONF_OPTS += -Dxcb=enabled -Dxlib=enabled -Dxlib-xcb=enabled
>  CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXrender
>  else
> -CAIRO_CONF_OPTS += -Dxcb=disabled -Dxlib=disabled
> +CAIRO_CONF_OPTS += -Dxcb=disabled -Dxlib=disabled -Dxlib-xcb=disabled
>  endif
>  
>  ifeq ($(BR2_PACKAGE_CAIRO_ZLIB),y)
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

Cheers,
—Adrián

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-01-16 22:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05  9:06 [Buildroot] bump webkitgtk Thomas Devoogdt
2024-01-05  9:11 ` Thomas Petazzoni via buildroot
2024-01-06 13:47   ` [Buildroot] [PATCH v5 1/3] package/cairo: bump to 1.17.4 Thomas Devoogdt
2024-01-06 13:47     ` [Buildroot] [PATCH v5 2/3] package/cairo: move to the meson build system Thomas Devoogdt
2024-01-06 13:48     ` [Buildroot] [PATCH v5 3/3] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-01-07 10:55   ` [Buildroot] [PATCH v6 1/3] package/cairo: bump to 1.17.4 Thomas Devoogdt
2024-01-07 10:55     ` [Buildroot] [PATCH v6 2/3] package/cairo: move to the meson build system Thomas Devoogdt
2024-01-16 22:39       ` Adrian Perez de Castro
2024-02-05 14:49       ` Peter Korsgaard
2024-02-05 21:22         ` [Buildroot] [PATCH v7 1/2] " Thomas Devoogdt
2024-02-05 21:23           ` [Buildroot] [PATCH v7 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-02-05 21:30             ` [Buildroot] [PATCH v8 1/2] package/cairo: move to the meson build system Thomas Devoogdt
2024-02-05 21:30               ` [Buildroot] [PATCH v8 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-02-07 16:17               ` [Buildroot] [PATCH v8 1/2] package/cairo: move to the meson build system Peter Korsgaard
2024-02-07 19:15                 ` Thomas Devoogdt
2024-02-07 19:31                   ` [Buildroot] [PATCH v9 " Thomas Devoogdt
2024-02-07 19:31                     ` [Buildroot] [PATCH v9 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-07-14 22:07                     ` [Buildroot] [PATCH v9 1/2] package/cairo: move to the meson build system Arnout Vandecappelle via buildroot
2024-07-17 18:09                       ` Thomas Petazzoni via buildroot
2024-07-17 21:07                         ` Thomas Devoogdt
2024-01-07 10:55     ` [Buildroot] [PATCH v6 3/3] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-01-16 22:39       ` Adrian Perez de Castro [this message]
2024-01-16 22:38     ` [Buildroot] [PATCH v6 1/3] package/cairo: bump to 1.17.4 Adrian Perez de Castro
2024-02-05 14:38     ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240117003933.GF606830@igalia.com \
    --to=aperez@igalia.com \
    --cc=buildroot@buildroot.org \
    --cc=eric.le.bihan.dev@free.fr \
    --cc=fontaine.fabrice@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas@devoogdt.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox