|
| 1 | +From f8565069d61ae79a8c87cd19621b7bb486f20a7f Mon Sep 17 00:00:00 2001 |
| 2 | +From: Philippe Normand < [email protected]> |
| 3 | +Date: Mon, 15 Sep 2025 11:06:12 +0100 |
| 4 | +Subject: [PATCH] Revert "meson: Isolate built plugins from cargo target |
| 5 | + directory" |
| 6 | + |
| 7 | +This reverts commit b73a46c95a34dfde4d830bba0b9108e8379c7e80. |
| 8 | +--- |
| 9 | + cargo_wrapper.py | 7 +------ |
| 10 | + meson.build | 27 +++++++++++++++++++++++++-- |
| 11 | + plugins/meson.build | 27 --------------------------- |
| 12 | + 3 files changed, 26 insertions(+), 35 deletions(-) |
| 13 | + delete mode 100644 plugins/meson.build |
| 14 | + |
| 15 | +diff --git a/cargo_wrapper.py b/cargo_wrapper.py |
| 16 | +index c40c2e2e..843f0bee 100644 |
| 17 | +--- a/cargo_wrapper.py |
| 18 | ++++ b/cargo_wrapper.py |
| 19 | +@@ -27,7 +27,6 @@ PARSER.add_argument('--examples', nargs="+", default=[]) |
| 20 | + PARSER.add_argument('--lib-suffixes', nargs="+", default=[]) |
| 21 | + PARSER.add_argument('--exe-suffix') |
| 22 | + PARSER.add_argument('--depfile') |
| 23 | +-PARSER.add_argument('--target-dir', type=P, default=None) |
| 24 | + PARSER.add_argument('--disable-doc', action="store_true", default=False) |
| 25 | + |
| 26 | + |
| 27 | +@@ -80,11 +79,7 @@ if __name__ == "__main__": |
| 28 | + logfile = open(logfile_path, mode="w", buffering=1, encoding='utf-8') |
| 29 | + |
| 30 | + print(opts, file=logfile) |
| 31 | +- # Use explicitly passed target dir or default to build_dir/target |
| 32 | +- if opts.target_dir: |
| 33 | +- cargo_target_dir = opts.target_dir |
| 34 | +- else: |
| 35 | +- cargo_target_dir = opts.build_dir / 'target' |
| 36 | ++ cargo_target_dir = opts.build_dir / 'target' |
| 37 | + |
| 38 | + env = os.environ.copy() |
| 39 | + if 'PKG_CONFIG_PATH' in env: |
| 40 | +diff --git a/meson.build b/meson.build |
| 41 | +index 465b4253..3fdaa9b7 100644 |
| 42 | +--- a/meson.build |
| 43 | ++++ b/meson.build |
| 44 | +@@ -619,8 +619,31 @@ endif |
| 45 | + # get cmdline for rust |
| 46 | + extra_env += {'RUSTC': ' '.join(rustc.cmd_array())} |
| 47 | + |
| 48 | +-# Build plugins in the plugins subdirectory |
| 49 | +-subdir('plugins') |
| 50 | ++plugins = [] |
| 51 | ++if output.length() > 0 |
| 52 | ++ rs_plugins = custom_target('gst-plugins-rs', |
| 53 | ++ build_by_default: true, |
| 54 | ++ output: output, |
| 55 | ++ console: true, |
| 56 | ++ install: true, |
| 57 | ++ install_dir: plugins_install_dir, |
| 58 | ++ depends: depends, |
| 59 | ++ depfile: 'gst-plugins-rs.dep', |
| 60 | ++ env: extra_env, |
| 61 | ++ command: [cargo_wrapper, |
| 62 | ++ 'build', |
| 63 | ++ meson.current_build_dir(), |
| 64 | ++ meson.current_source_dir(), |
| 65 | ++ meson.global_build_root(), |
| 66 | ++ target, |
| 67 | ++ get_option('prefix'), |
| 68 | ++ get_option('libdir'), |
| 69 | ++ '--packages', packages, |
| 70 | ++ '--depfile', '@DEPFILE@', |
| 71 | ++ '--lib-suffixes', library_suffixes, |
| 72 | ++ ] + feature_args + extra_args) |
| 73 | ++ plugins = rs_plugins.to_list() |
| 74 | ++endif |
| 75 | + |
| 76 | + # This is used by GStreamer to static link Rust plugins into gst-full |
| 77 | + gst_plugins = [] |
| 78 | +diff --git a/plugins/meson.build b/plugins/meson.build |
| 79 | +deleted file mode 100644 |
| 80 | +index 3fc16f25..00000000 |
| 81 | +--- a/plugins/meson.build |
| 82 | ++++ /dev/null |
| 83 | +@@ -1,27 +0,0 @@ |
| 84 | +-plugins = [] |
| 85 | +-rs_plugins = [] |
| 86 | +-if output.length() > 0 |
| 87 | +- rs_plugins = custom_target('gst-plugins-rs', |
| 88 | +- build_by_default: true, |
| 89 | +- output: output, |
| 90 | +- console: true, |
| 91 | +- install: true, |
| 92 | +- install_dir: plugins_install_dir, |
| 93 | +- depends: depends, |
| 94 | +- depfile: 'gst-plugins-rs.dep', |
| 95 | +- env: extra_env, |
| 96 | +- command: [cargo_wrapper, |
| 97 | +- 'build', |
| 98 | +- meson.current_build_dir(), |
| 99 | +- meson.current_source_dir() / '..', |
| 100 | +- meson.global_build_root(), |
| 101 | +- target, |
| 102 | +- get_option('prefix'), |
| 103 | +- get_option('libdir'), |
| 104 | +- '--packages', packages, |
| 105 | +- '--depfile', '@DEPFILE@', |
| 106 | +- '--lib-suffixes', library_suffixes, |
| 107 | +- '--target-dir', meson.current_build_dir() / '..' / 'target', |
| 108 | +- ] + feature_args + extra_args) |
| 109 | +- plugins = rs_plugins.to_list() |
| 110 | +-endif |
| 111 | +-- |
| 112 | +2.51.0 |
| 113 | + |
0 commit comments