diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-10 21:09:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:48:45 +0100 |
commit | 2ff9a053acf9fa9b507d3c80596d20a0f3d064cd (patch) | |
tree | 71e364807a442952dce1c6ec01f3d6c6a4c1896e /meta/recipes-gnome/librsvg/librsvg | |
parent | 5efebf3be01e239f537eee9418a4414e0e4d9ab0 (diff) | |
download | poky-2ff9a053acf9fa9b507d3c80596d20a0f3d064cd.tar.gz |
librsvg: update 2.40.21 -> 2.52.0 (transition to rust!)
After some poking and hacking I have arrived to the settings that work.
Please refer to the commit for details.
Some of these issues may re-occur in other components; in that case
we need to come up with more generic solutions or upstream fixes.
So far, it's a learning exercise for everybody in getting to know the rust toolchain.
(From OE-Core rev: e060ee5ea96f3c3903b8aa018a5a3af3c60e5ab3)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/librsvg/librsvg')
5 files changed, 100 insertions, 125 deletions
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch b/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch deleted file mode 100644 index 954bb60880..0000000000 --- a/meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From b99891e31eb6ce550e7e1cb2ca592095b3050a93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brion Vibber <brion@pobox.com> | ||
3 | Date: Sun, 25 Feb 2018 18:42:36 -0800 | ||
4 | Subject: Auto-detect -Bsymbolic, fixes configure on macOS | ||
5 | |||
6 | The -Bsymbolic linker option is ELF-specific, and was breaking | ||
7 | configure on macOS unless --disable-Bsymbolic was explicitly passed. | ||
8 | |||
9 | Switching the behavior from requiring -Bsymbolic to be available | ||
10 | by default to just warning and continuing on without. | ||
11 | |||
12 | Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/211 | ||
13 | |||
14 | Upstream-Status: Backport | ||
15 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
16 | --- | ||
17 | configure.ac | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 15b26b2d..9f8dce29 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -216,7 +216,7 @@ AM_CONDITIONAL([ENABLE_PIXBUF_LOADER],[test "$enable_pixbuf_loader" = "yes"]) | ||
25 | AC_ARG_ENABLE([Bsymbolic], | ||
26 | [AS_HELP_STRING([--disable-Bsymbolic], | ||
27 | [disable linking with -Bsymbolic])], | ||
28 | - [],[enable_Bsymbolic=yes]) | ||
29 | + [enable_Bsymbolic=no],[enable_Bsymbolic=auto]) | ||
30 | |||
31 | BSYMBOLIC_LDFLAG= | ||
32 | if test "$enable_Bsymbolic" != "no"; then | ||
33 | -- | ||
34 | 2.20.1 | ||
35 | |||
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch b/meta/recipes-gnome/librsvg/librsvg/0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch new file mode 100644 index 0000000000..d7487c234c --- /dev/null +++ b/meta/recipes-gnome/librsvg/librsvg/0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 95b2cd0169cb1b4694c2bce67169b1aa1d5e2be0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 21 Sep 2021 16:27:14 +0200 | ||
4 | Subject: [PATCH] Makefile.am: pass rust target to cargo also when not cross | ||
5 | compiling | ||
6 | |||
7 | Otherwise oe-core's native build doesn't work either. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | --- | ||
12 | Makefile.am | 2 -- | ||
13 | configure.ac | 4 +--- | ||
14 | 2 files changed, 1 insertion(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/Makefile.am b/Makefile.am | ||
17 | index e93714e..effe5d3 100644 | ||
18 | --- a/Makefile.am | ||
19 | +++ b/Makefile.am | ||
20 | @@ -137,9 +137,7 @@ else | ||
21 | CARGO_RELEASE_ARGS=--release | ||
22 | endif | ||
23 | |||
24 | -if CROSS_COMPILING | ||
25 | CARGO_TARGET_ARGS=--target=$(RUST_TARGET) | ||
26 | -endif | ||
27 | |||
28 | CARGO_VERBOSE = $(cargo_verbose_$(V)) | ||
29 | cargo_verbose_ = $(cargo_verbose_$(AM_DEFAULT_VERBOSITY)) | ||
30 | diff --git a/configure.ac b/configure.ac | ||
31 | index 41590ca..84cd56b 100644 | ||
32 | --- a/configure.ac | ||
33 | +++ b/configure.ac | ||
34 | @@ -255,9 +255,7 @@ AC_ARG_VAR(RUST_TARGET, [Set rust target (default=$host)]) | ||
35 | : ${RUST_TARGET:=$host} | ||
36 | |||
37 | AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = xyes]) | ||
38 | -AS_IF([test "x$cross_compiling" = "xyes"], [ | ||
39 | - RUST_TARGET_SUBDIR="$RUST_TARGET/$RUST_TARGET_SUBDIR" | ||
40 | -]) | ||
41 | +RUST_TARGET_SUBDIR="$RUST_TARGET/$RUST_TARGET_SUBDIR" | ||
42 | AC_SUBST([RUST_TARGET_SUBDIR]) | ||
43 | |||
44 | dnl =========================================================================== | ||
45 | -- | ||
46 | 2.20.1 | ||
47 | |||
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch b/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch deleted file mode 100644 index 75fc7f9d0b..0000000000 --- a/meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From bea5156cd7e7122715b26c769c35928141a1da2c Mon Sep 17 00:00:00 2001 | ||
2 | From: Joshua Watt <JPEWhacker@gmail.com> | ||
3 | Date: Mon, 18 Nov 2019 14:46:34 -0600 | ||
4 | Subject: [PATCH] Remove non-reproducible SRCDIR | ||
5 | |||
6 | Removes SRCDIR as the prefix for finding the test font. This wouldn't | ||
7 | work anyway, since that path is not present on the target. | ||
8 | |||
9 | This patch is specific to OE, since it appears that this entire method | ||
10 | of testing was removed when upstream was re-written in rust | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE-specific, no longer present upstream] | ||
13 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
14 | --- | ||
15 | rsvg-cairo-draw.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/rsvg-cairo-draw.c b/rsvg-cairo-draw.c | ||
19 | index caa9104..cfb7ed2 100644 | ||
20 | --- a/rsvg-cairo-draw.c | ||
21 | +++ b/rsvg-cairo-draw.c | ||
22 | @@ -398,7 +398,7 @@ set_font_options_for_testing (PangoContext *context) | ||
23 | static void | ||
24 | create_font_config_for_testing (RsvgCairoRender *render) | ||
25 | { | ||
26 | - const char *font_path = SRCDIR "/tests/resources/LiberationSans-Regular.ttf"; | ||
27 | + const char *font_path = "/tests/resources/LiberationSans-Regular.ttf"; | ||
28 | |||
29 | if (render->font_config_for_testing != NULL) | ||
30 | return; | ||
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch b/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch new file mode 100644 index 0000000000..849dd98c5f --- /dev/null +++ b/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 6d1f0740b111e86e99dcaf0222f3d1d67d3bf1e6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 21 Sep 2021 16:54:23 +0200 | ||
4 | Subject: [PATCH] system-deps/src/lib.rs: do not probe into harcoded list of | ||
5 | targets | ||
6 | |||
7 | Oe-core defines custom targets, and this probe fails. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | --- | ||
12 | vendor/system-deps/.cargo-checksum.json | 2 +- | ||
13 | vendor/system-deps/src/lib.rs | 16 +--------------- | ||
14 | 2 files changed, 2 insertions(+), 16 deletions(-) | ||
15 | |||
16 | diff --git a/vendor/system-deps/.cargo-checksum.json b/vendor/system-deps/.cargo-checksum.json | ||
17 | index ecebb94..30d594e 100644 | ||
18 | --- a/vendor/system-deps/.cargo-checksum.json | ||
19 | +++ b/vendor/system-deps/.cargo-checksum.json | ||
20 | @@ -1 +1 @@ | ||
21 | -{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"015518f4337d80249d12c7e6c55e9063705a0b8805ebf46a445c89253edc5de0","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} | ||
22 | \ No newline at end of file | ||
23 | +{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"594e5f14180590adc9ea0a8ba1cc35f9a8a260322d08de3037efac3ce1dc729b","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} | ||
24 | diff --git a/vendor/system-deps/src/lib.rs b/vendor/system-deps/src/lib.rs | ||
25 | index a0d4f00..a666817 100644 | ||
26 | --- a/vendor/system-deps/src/lib.rs | ||
27 | +++ b/vendor/system-deps/src/lib.rs | ||
28 | @@ -725,21 +725,7 @@ impl Config { | ||
29 | } | ||
30 | |||
31 | fn check_cfg(&self, cfg: &cfg_expr::Expression) -> Result<bool, Error> { | ||
32 | - use cfg_expr::{targets::get_builtin_target_by_triple, Predicate}; | ||
33 | - | ||
34 | - let target = self | ||
35 | - .env | ||
36 | - .get("TARGET") | ||
37 | - .expect("no TARGET env variable defined"); | ||
38 | - let target = get_builtin_target_by_triple(&target) | ||
39 | - .unwrap_or_else(|| panic!("Invalid TARGET: {}", target)); | ||
40 | - | ||
41 | - let res = cfg.eval(|pred| match pred { | ||
42 | - Predicate::Target(tp) => Some(tp.matches(target)), | ||
43 | - _ => None, | ||
44 | - }); | ||
45 | - | ||
46 | - res.ok_or_else(|| Error::UnsupportedCfg(cfg.original().to_string())) | ||
47 | + Ok(true) | ||
48 | } | ||
49 | } | ||
50 | |||
51 | -- | ||
52 | 2.20.1 | ||
53 | |||
diff --git a/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch b/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch deleted file mode 100644 index 6c23071cd3..0000000000 --- a/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 4e0ce3f22d45033a108cbacca3e5ec6728bd44f3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Tue, 11 Aug 2015 16:25:38 +0300 | ||
4 | Subject: [PATCH] configure: add option to enable/disable use of GTK+ | ||
5 | |||
6 | Distro packagers like predictability and automatically detected optional | ||
7 | dependencies are not predicable. Add a --with-gtk3 option (default to "auto") | ||
8 | for forcibly controlling whether GTK+ will be used or not. | ||
9 | |||
10 | Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=712693] | ||
11 | |||
12 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
13 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
14 | --- | ||
15 | configure.ac | 17 +++++++++++------ | ||
16 | 1 file changed, 11 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index e61a952..c3aae84 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -130,17 +130,22 @@ AC_CHECK_FUNCS(strtok_r) | ||
23 | # GTK | ||
24 | # =========================================================================== | ||
25 | |||
26 | -PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no]) | ||
27 | - | ||
28 | GTK3_BINARY_VERSION= | ||
29 | |||
30 | -if test "$have_gtk_3" = "yes"; then | ||
31 | - GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`" | ||
32 | +AC_MSG_CHECKING([whether to use GTK+ 3]) | ||
33 | +AC_ARG_WITH([gtk3], | ||
34 | + [AS_HELP_STRING([--without-gtk3],[Don't build GTK+3 tools (default=auto)])], | ||
35 | + [],[PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK3_REQUIRED],[with_gtk3=yes],[with_gtk3=no])]) | ||
36 | +AC_MSG_RESULT([$with_gtk3]) | ||
37 | + | ||
38 | +if test "$with_gtk3" = "yes"; then | ||
39 | + PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= $GTK3_REQUIRED]) | ||
40 | + GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`" | ||
41 | fi | ||
42 | |||
43 | AC_SUBST([GTK3_BINARY_VERSION]) | ||
44 | |||
45 | -AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"]) | ||
46 | +AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk3" = "yes"]) | ||
47 | |||
48 | dnl =========================================================================== | ||
49 | dnl GDK-Pixbuf SVG loader | ||
50 | @@ -298,6 +303,6 @@ librsvg-$VERSION | ||
51 | Build introspectable bindings: ${found_introspection} | ||
52 | Build Vala bindings: ${enable_vala} | ||
53 | Build GdkPixbuf loader: ${enable_pixbuf_loader} | ||
54 | - GTK+ $GTK3_REQUIRED or later: ${have_gtk_3} | ||
55 | + GTK+ $GTK3_REQUIRED or later: ${with_gtk_3} | ||
56 | Build miscellaneous tools: ${build_misc_tools} | ||
57 | " | ||
58 | -- | ||
59 | 2.1.4 | ||
60 | |||