summaryrefslogtreecommitdiff
path: root/dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2025-03-26 19:47:34 +0100
committerSam James <sam@gentoo.org>2025-03-27 11:48:07 +0000
commitaa313703ee5b9f0067261cf302bff01abf558c6b (patch)
tree435c5cc537cf2ef3b07e41160a10387a664b6559 /dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch
parent6331dbcbd62fd2abec35b48cb4ea68b73ef75f9f (diff)
downloadgentoo-aa313703ee5b9f0067261cf302bff01abf558c6b.tar.gz
gentoo-aa313703ee5b9f0067261cf302bff01abf558c6b.tar.bz2
gentoo-aa313703ee5b9f0067261cf302bff01abf558c6b.zip
dev-libs/blazesym_c: add initial version 0.1.1
blazesym_c is a C API to blazesym, a Rust-based library for address symbolization and related tasks. Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch')
-rw-r--r--dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch b/dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch
new file mode 100644
index 000000000000..2b1ad9d5fb4b
--- /dev/null
+++ b/dev-libs/blazesym_c/files/0.1.1-add-capi-feature-to-enable-building-with-cargo-c.patch
@@ -0,0 +1,43 @@
+
+Patch from:
+https://github.com/libbpf/blazesym/commit/32f136b06b8b71110499073909dd238e577b23d0
+
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Tue, 25 Mar 2025 10:10:56 +0100
+Subject: [PATCH] capi: add capi feature to enable building with cargo-c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Disable generating the header since it already exists,
+and more importantly because we cannot run the required custom
+cbindgen extension from cargo-c.
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+--- a/capi/Cargo.toml
++++ b/capi/Cargo.toml
+@@ -36,6 +36,8 @@ crate-type = ["cdylib", "staticlib", "lib"]
+ default = [
+ "dwarf",
+ ]
++# Required by cargo-c
++capi = []
+ # Check C code documentation snippets.
+ check-doc-snippets = []
+ # Enable this feature to enable blazesym's DWARF support.
+@@ -46,6 +48,15 @@ dwarf = ["blazesym/dwarf"]
+ # changed.
+ generate-c-header = ["dep:cbindgen", "dep:which"]
+
++# cargo-c configuration:
++# skip header generation
++[package.metadata.capi.header]
++generation = false
++subdirectory = false
++# use the existing header for installation
++[package.metadata.capi.install.include]
++asset = [{ from="include/blazesym.h" }]
++
+ [[bench]]
+ name = "capi"
+ path = "benches/capi.rs"