diff options
author | L. E. Segovia <amy@centricular.com> | 2024-12-06 22:44:20 -0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2024-12-13 01:44:03 +0000 |
commit | 37bf4bf1bfe6d3222263180ba50b0b29ba21d2ab (patch) | |
tree | 82428bdd4170a4f28f178545aff7f99d2881ac8a | |
parent | 4a5b0b001fe95fe32f6ed0415c734635a4399a02 (diff) |
librsvg: Update to 2.59.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1664>
3 files changed, 85 insertions, 55 deletions
diff --git a/recipes/librsvg.recipe b/recipes/librsvg.recipe index 41b26e29..9c1a5724 100644 --- a/recipes/librsvg.recipe +++ b/recipes/librsvg.recipe @@ -13,13 +13,13 @@ import tempfile class Recipe(recipe.Recipe): name = 'librsvg' - version = '2.58.94' + version = '2.59.2' licenses = [License.LGPLv2Plus] deps = ['gdk-pixbuf', 'pango', 'cairo', 'libxml2'] btype = BuildType.MESON stype = SourceType.TARBALL url = 'gnome://' - tarball_checksum = '05adf6dc58b3cfb319c2efb02b2bbdff5c75ca47cc941d48098839f20496abed' + tarball_checksum = 'ecd293fb0cc338c170171bbc7bcfbea6725d041c95f31385dc935409933e4597' files_libs = ['librsvg-2'] files_bins = ['rsvg-convert'] @@ -38,10 +38,12 @@ class Recipe(recipe.Recipe): } patches = [ + # https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1067 f"{name}/0001-makedef-rework-flags-to-work-with-Ubuntu-and-Fedora.patch", + # https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1066 f"{name}/0002-meson-Consider-native-dependencies-also-on-Linux.patch", - # https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1040 - f"{name}/0003-meson-Use-a-temporary-directory-instead-of-a-tempora.patch", + # https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1068 + f"{name}/0003-cargo_wrapper-py-Allow-setting-the-optimization-leve.patch", ] def append_config_toml(self, s): diff --git a/recipes/librsvg/0003-cargo_wrapper-py-Allow-setting-the-optimization-leve.patch b/recipes/librsvg/0003-cargo_wrapper-py-Allow-setting-the-optimization-leve.patch new file mode 100644 index 00000000..121597b7 --- /dev/null +++ b/recipes/librsvg/0003-cargo_wrapper-py-Allow-setting-the-optimization-leve.patch @@ -0,0 +1,79 @@ +From 5db1c43b1ecca591222e8ac0e6ca1bbd82f1a5f2 Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" <amy@centricular.com> +Date: Mon, 9 Dec 2024 10:07:14 -0300 +Subject: [PATCH 3/3] cargo_wrapper.py: Allow setting the optimization level + from meson + +--- + meson.build | 11 +++++++++-- + meson/cargo_wrapper.py | 18 ++++++++++++++---- + 2 files changed, 23 insertions(+), 6 deletions(-) + +diff --git a/meson.build b/meson.build +index d2dab37c5..65250b929 100644 +--- a/meson.build ++++ b/meson.build +@@ -444,8 +444,15 @@ cargo_wrapper_args = [ + '--libdir', get_option('libdir'), + ] + +-if not get_option('debug') or \ +- (is_msvc_style and get_option('buildtype') == 'debugoptimized') ++if get_option('debug') ++ optimization = get_option('optimization') ++ if optimization in ['0', '1', '2', '3', 's'] ++ cargo_wrapper_args += ['--optimization', optimization] ++ elif optimization != 'plain' # g ++ cargo_wrapper_args += ['--optimization', '1'] ++ # plain: https://github.com/mesonbuild/meson/issues/7194 ++ endif ++else + cargo_wrapper_args += ['--release'] + endif + +diff --git a/meson/cargo_wrapper.py b/meson/cargo_wrapper.py +index 48ce2f15e..52f228829 100755 +--- a/meson/cargo_wrapper.py ++++ b/meson/cargo_wrapper.py +@@ -57,10 +57,6 @@ parser.add_argument( + "--build-triplet", help="Build toolchain triplet (for cross builds using specific toolchain version)" + ) + +-parser.add_argument( +- "--release", action="store_true", help="Build artifacts in release mode" +-) +- + parser.add_argument( + "--avif", action="store_true", help="Enable AVIF support" + ) +@@ -89,6 +85,15 @@ group.add_argument( + ) + group.add_argument("--bin", help="Name of binary to build") + ++g = parser.add_argument_group("Optimizations") ++group = parser.add_mutually_exclusive_group(required=False) ++group.add_argument( ++ "--release", action="store_true", help="Build artifacts in release mode" ++) ++group.add_argument( ++ '--optimization', type=str, choices=['0', '1', '2', '3', 's'], help="Set optimization level" ++) ++ + args = parser.parse_args() + + if args.toolchain_version is not None and args.target is None and args.build_triplet is None: +@@ -163,6 +168,11 @@ if args.release: + cargo_cmd.extend(['--release']) + else: + buildtype = 'debug' ++ if args.optimization: ++ if 'CARGO_BUILD_RUSTFLAGS' in env: ++ env['CARGO_BUILD_RUSTFLAGS'] = env['CARGO_BUILD_RUSTFLAGS'] + f' -C opt-level={args.optimization}' ++ else: ++ env['CARGO_BUILD_RUSTFLAGS'] = f'-C opt-level={args.optimization}' + + if args.target: + cargo_cmd.extend(['--target', args.target]) +-- +2.47.0.windows.2 + diff --git a/recipes/librsvg/0003-meson-Use-a-temporary-directory-instead-of-a-tempora.patch b/recipes/librsvg/0003-meson-Use-a-temporary-directory-instead-of-a-tempora.patch deleted file mode 100644 index e18fb8ad..00000000 --- a/recipes/librsvg/0003-meson-Use-a-temporary-directory-instead-of-a-tempora.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 245c16450ee402792fcc22aa3d849d87b1f70234 Mon Sep 17 00:00:00 2001 -From: "L. E. Segovia" <amy@centricular.com> -Date: Fri, 18 Oct 2024 11:08:45 -0300 -Subject: [PATCH 3/3] meson: Use a temporary directory instead of a temporary - file for tests - -Rust 1.82 has started to use an ArArchiveBuilder that, instead of -writing to the output, attempts to rename a temporary file. Since Python -has an open handle to reap it on scope exit, all calls with such paths -will always fail. ---- - meson/query-rustc.py | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/meson/query-rustc.py b/meson/query-rustc.py -index 2b169b1..aa55723 100755 ---- a/meson/query-rustc.py -+++ b/meson/query-rustc.py -@@ -64,7 +64,6 @@ def retrive_version_info(output, query): - - if __name__ == "__main__": - args = parser.parse_args() -- dummy_out = tempfile.NamedTemporaryFile() - query = args.query - query_arg = None - rustc_cmd = [Path(args.RUSTC).as_posix()] -@@ -89,13 +88,15 @@ if __name__ == "__main__": - if query == 'native-static-libs': - rustc_cmd.extend(['--crate-type', 'staticlib']) - rustc_cmd.append(os.devnull) -- rustc_cmd.extend(['-o', dummy_out.name]) -+ rustc_cmd.extend(['-o', 'librsvg-query.a']) - -- query_results = subprocess.run( -- rustc_cmd, -- capture_output=True, -- text=True, -- ) -+ with tempfile.TemporaryDirectory() as d: -+ query_results = subprocess.run( -+ rustc_cmd, -+ capture_output=True, -+ text=True, -+ cwd=d -+ ) - if query == 'native-static-libs': - retrieve_native_static_libs_from_output(query_results.stderr) - elif query == 'default-host-toolchain' or query == 'stable-actual-version': --- -2.44.0.windows.1 - |