package/cairo: fix compilation on toolchains without c++ support
PATCH 1/1 package/cairo: fix compilation on toolchains without c++ support
From: Thomas Devoogdt <[email protected]>
Fixes:
- https://lore.kernel.org/buildroot/20240717200926.1a7db2a1@windsurf/
--- ...3-meson-only-require-cpp-for-windows.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/cairo/0003-meson-only-require-cpp-for-windows.patch
package/cairo/0003-meson-only-require-cpp-for-windows.patch new file +38 -0
@@ -0,0 +1,38 @@ +From e93ef3feb69994e3aa4e0ab66ccd66139b097e49 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Thu, 18 Jul 2024 12:16:51 +0200 +Subject: [PATCH] meson: only require cpp for windows + +Allow to compile meson without c++ toolchain. + +Fixes: + - https://lore.kernel.org/buildroot/20240717200926.1a7db2a1@windsurf/ + +Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/573 +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 9100152ee..297482b03 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,4 +1,4 @@ +-project('cairo', 'c', 'cpp', ++project('cairo', 'c', + meson_version: '>= 0.59.0', + version: run_command(find_program('version.py'), check: true).stdout().strip(), + default_options: ['warning_level=2'], +@@ -489,6 +489,8 @@ if host_machine.system() == 'darwin' and not get_option('quartz').disabled() + endif + + if host_machine.system() == 'windows' ++ add_languages('cpp') ++ + add_project_arguments('-DWIN32_LEAN_AND_MEAN', '-DNOMINMAX', language: ['c', 'cpp']) + + win32_extra_deps = [ +-- +2.45.2 +
Signature · 6 lines
2.45.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedHello,
Thanks for the investigation, I had come to the same conclusion earlier today, but you were faster than me at cooking the patch. A couple of comments below, though, for your future contributions.
Quoted 2 lines · On Thu, 18 Jul 2024 12:19:55 +0000 Thomas Devoogdt <[email protected]> wrote:
From: Thomas Devoogdt <[email protected]>
When you submit a fix, you should always explain since when the regression got introduced. Indeed, Peter Korsgaard reviews all commits made on master, and has to decide which commits should be backported to our 2024.02.x maintenance branch. So we need to know if this fix is needed on 2024.02.x or not. In this, it is not needed. So I have added this in the commit message:
This issue was occurring since the conversion of cairo to meson-package in commit 1fa58814c09a71444f961b61a9a2c399b9163fc2 ("package/cairo: move to the meson build system")
Quoted 2 lines
Fixes:
- https://lore.kernel.org/buildroot/20240717200926.1a7db2a1@windsurf/
Here, we want a reference to an autobuilder failure, so:
Fixes:
http://autobuild.buildroot.net/results/98b62ab7ed3092f9f9085f723baf7d6267451e5c/package/cairo/0003-meson-only-require-cpp-for-windows.patch line 6
Quoted 12 lines
package/cairo/0003-meson-only-require-cpp-for-windows.patch new file +6
-0@@ -0,0 +1,38 @@ +From e93ef3feb69994e3aa4e0ab66ccd66139b097e49 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Thu, 18 Jul 2024 12:16:51 +0200 +Subject: [PATCH] meson: only require cpp for windows + +Allow to compile meson without c++ toolchain.
No, it's cairo that you allow to build without C++.
package/cairo/0003-meson-only-require-cpp-for-windows.patch line 9
Quoted 2 lines
package/cairo/0003-meson-only-require-cpp-for-windows.patch new file +2
-0+Fixes: + - https://lore.kernel.org/buildroot/20240717200926.1a7db2a1@windsurf/
We also recommend a reference to an autobuilder failure, or even better as this patch goes upstream (which doesn't care about Buildroot), directly have the error message copy/pasted.
I've applied with those details fixed. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot