subprojects: add remain

Version 0.2.12 or greater supported in:

  - AOSP
  - Fedora (https://src.fedoraproject.org/rpms/rust-remain)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
This commit is contained in:
Gurchetan Singh 2024-12-17 13:43:44 -08:00 committed by Marge Bot
parent 85f620cabc
commit 15b100770b
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Copyright © 2024 Google
# SPDX-License-Identifier: MIT
project(
'remain',
'rust',
version : '0.2.12',
license : 'MIT OR Apache-2.0',
)
syn = subproject('syn').get_variable('lib')
quote = subproject('quote').get_variable('lib')
proc_macro2 = subproject('proc-macro2').get_variable('lib')
rust = import('rust')
lib = rust.proc_macro(
'remain',
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [syn, quote, proc_macro2]
)
dep_remain = declare_dependency(
link_with : [lib, syn, quote, proc_macro2]
)

6
subprojects/remain.wrap Normal file
View file

@ -0,0 +1,6 @@
[wrap-file]
directory = remain-0.2.12
source_url = https://crates.io/api/v1/crates/remain/0.2.12/download
source_filename = remain-0.2.12.tar.gz
source_hash = 1ad5e011230cad274d0532460c5ab69828ea47ae75681b42a841663efffaf794
patch_directory = remain