main/rust-bindgen: upgrade to 0.71.1

This commit is contained in:
ptrcnull 2024-12-09 23:03:52 +01:00 committed by Patrycja Rosa
parent 7f74d0af74
commit 6e5ccb5bb4
2 changed files with 3 additions and 98 deletions

View File

@ -2,8 +2,8 @@
# Maintainer: team/rust <alpine@ptrcnull.me>
maintainer="team/rust <alpine@ptrcnull.me>"
pkgname=rust-bindgen
pkgver=0.71.0
pkgrel=1
pkgver=0.71.1
pkgrel=0
pkgdesc="automatically generates Rust FFI bindings to C (and some C++) libraries"
url="https://github.com/rust-lang/rust-bindgen"
makedepends="cargo clang cargo-auditable"
@ -18,7 +18,6 @@ subpackages="
"
source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/rust-bindgen/archive/v$pkgver.tar.gz
disable-test_wrap_static_fns-patch
unbreak-shell-completion-and--version-without-leader.patch
"
options="net" # cargo fetch
@ -64,7 +63,6 @@ package() {
}
sha512sums="
87213c8c8f362d11cd88a0570b8aaa188e9e51197d9aeb7f9cfbae0a7539f4e1ed40a36c11e15bd9bf5fb78938c571f08b40f250419fe018fdee19733b5eb433 rust-bindgen-0.71.0.tar.gz
c900bd3780074c9f8df5dfb349cdfd59a8a71b5ac7fd63b18eb31c7fa3ab1fb5e656ff05bb7461ddc70c40a65ef73155007abea566c9d5deb41cda901a9fd57d rust-bindgen-0.71.1.tar.gz
1c5578b0935e84f75ebd04f2c4186d835d2e6363f16439ef4ea29c9448d803779ad40cc577b4b1c0f8757d08e7d0013f3a1267ca00410ca39e86e3ad199826a5 disable-test_wrap_static_fns-patch
38b21b4778e676baaa75a623cabb98d0efae8dc9cb71191c9080fd0f2860af778926e2a5b09e29bc30c5219eb185897213e8a1ab710fa2c8f11cb8a912b166c5 unbreak-shell-completion-and--version-without-leader.patch
"

View File

@ -1,93 +0,0 @@
From 2e154e7e2af2f5c40f195c3ec5b468ae2259c1c7 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 7 Dec 2024 18:54:51 +0100
Subject: [PATCH] Unbreak shell completion and --version without header
This regressed again in #2984. Partially revert d75fe271418e and
42a86e288c43 and restore the previous behavior.
Fixes: https://github.com/rust-lang/rust-bindgen/issues/3037
Fixes: https://github.com/rust-lang/rust-bindgen/issues/3039
---
bindgen/options/cli.rs | 52 +++++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/bindgen/options/cli.rs b/bindgen/options/cli.rs
index 9d5cea3dc6..8c4c05bc84 100644
--- a/bindgen/options/cli.rs
+++ b/bindgen/options/cli.rs
@@ -146,7 +146,7 @@ fn parse_custom_attribute(
#[allow(clippy::doc_markdown)]
struct BindgenCommand {
/// C or C++ header file.
- header: String,
+ header: Option<String>,
/// Path to write depfile to.
#[arg(long)]
depfile: Option<String>,
@@ -657,6 +657,33 @@ where
clang_args,
} = command;
+ if let Some(shell) = generate_shell_completions {
+ clap_complete::generate(
+ shell,
+ &mut BindgenCommand::command(),
+ "bindgen",
+ &mut io::stdout(),
+ );
+
+ exit(0)
+ }
+
+ if version {
+ println!(
+ "bindgen {}",
+ option_env!("CARGO_PKG_VERSION").unwrap_or("unknown")
+ );
+ if verbose {
+ println!("Clang: {}", crate::clang_version().full);
+ }
+
+ exit(0)
+ }
+
+ if header.is_none() {
+ return Err(io::Error::new(io::ErrorKind::Other, "Header not found"));
+ }
+
let mut builder = builder();
#[derive(Debug)]
@@ -804,31 +831,8 @@ where
}
}
- let header = Some(header);
-
builder = apply_args!(
builder {
- generate_shell_completions => |_, shell| {
- clap_complete::generate(
- shell,
- &mut BindgenCommand::command(),
- "bindgen",
- &mut io::stdout(),
- );
-
- exit(0)
- },
- version => |_, _| {
- println!(
- "bindgen {}",
- option_env!("CARGO_PKG_VERSION").unwrap_or("unknown")
- );
- if verbose {
- println!("Clang: {}", crate::clang_version().full);
- }
-
- exit(0)
- },
header,
rust_target,
rust_edition,