About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@google.com>2024-12-17 07:36:34 -0800
committerMarge Bot <marge-bot@fdo.invalid>2025-06-17 22:28:54 +0000
commite04026addebb009030889b46852a1a1144dbed31 (patch)
treebaa8ead1ac055ba90b63c52d061ad0824edf0371 /subprojects
parentf02e60409bdc18932e8ada265ff20f729fef2d42 (diff)
subprojects: add linux-raw-sys
Version 0.4.14 or above supported in: - AOSP - Fedora (https://bodhi.fedoraproject.org/updates/?packages=rust-linux-raw-sys) - Debian Acked-by: Aaron Ruby <aruby@qnx.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/linux-raw-sys.wrap6
-rw-r--r--subprojects/packagefiles/linux-raw-sys/meson.build34
2 files changed, 40 insertions, 0 deletions
diff --git a/subprojects/linux-raw-sys.wrap b/subprojects/linux-raw-sys.wrap
new file mode 100644
index 00000000000..ff085fffe14
--- /dev/null
+++ b/subprojects/linux-raw-sys.wrap
@@ -0,0 +1,6 @@
+[wrap-file]
+directory = linux-raw-sys-0.4.14
+source_url = https://crates.io/api/v1/crates/linux-raw-sys/0.4.14/download
+source_filename = linux-raw-sys-0.4.14.tar.gz
+source_hash = 78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89
+patch_directory = linux-raw-sys
diff --git a/subprojects/packagefiles/linux-raw-sys/meson.build b/subprojects/packagefiles/linux-raw-sys/meson.build
new file mode 100644
index 00000000000..321312a21c4
--- /dev/null
+++ b/subprojects/packagefiles/linux-raw-sys/meson.build
@@ -0,0 +1,34 @@
+# Copyright © 2025 Google
+# SPDX-License-Identifier: MIT
+
+project(
+ 'linux-raw-sys',
+ 'rust',
+ version : '0.4.14',
+ license : 'MIT OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception',
+)
+
+rust_args = [
+ '--cfg', 'feature="elf"',
+ '--cfg', 'feature="errno"',
+ '--cfg', 'feature="general"',
+ '--cfg', 'feature="if_ether"',
+ '--cfg', 'feature="ioctl"',
+ '--cfg', 'feature="net"',
+ '--cfg', 'feature="netlink"',
+ '--cfg', 'feature="no_std"',
+ '--cfg', 'feature="xdp"',
+]
+
+lib = static_library(
+ 'linux_raw_sys',
+ 'src/lib.rs',
+ rust_args : rust_args,
+ override_options : ['rust_std=2021', 'build.rust_std=2021'],
+ rust_abi : 'rust',
+ native : true,
+)
+
+dep_linux_raw_sys = declare_dependency(
+ link_with : [lib]
+)