From 84a4f637e40c59fe9d9ff4ec787dd95666f32c95 Mon Sep 17 00:00:00 2001
From: NoisyCoil <noisycoil@tutanota.com>
Date: Tue, 29 Jul 2025 01:16:35 +0200
Subject: [PATCH] Bump bindgen to v0.72

---
 ...022-Relax-bindgen-dependency-to-0.72.patch | 28 +++++++++++++++++++
 debian/patches/series                         |  1 +
 debian/tests/control                          |  2 +-
 lib/Cargo.toml                                |  2 +-
 xtask/Cargo.toml                              |  2 +-
 5 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 debian/patches/0022-Relax-bindgen-dependency-to-0.72.patch

diff --git a/debian/patches/0022-Relax-bindgen-dependency-to-0.72.patch b/debian/patches/0022-Relax-bindgen-dependency-to-0.72.patch
new file mode 100644
index 00000000..378782e0
--- /dev/null
+++ b/debian/patches/0022-Relax-bindgen-dependency-to-0.72.patch
@@ -0,0 +1,28 @@
+Description: Relax bindgen dependency to 0.72
+Author: NoisyCoil <noisycoil@tutanota.com>
+Forwarded: not-needed
+Last-Update: 2025-07-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib/Cargo.toml
++++ b/lib/Cargo.toml
+@@ -50,7 +50,7 @@
+ streaming-iterator = "0.1.9"
+ 
+ [build-dependencies]
+-bindgen = { version = "0.71.1", optional = true }
++bindgen = { version = "0.72", optional = true }
+ cc.workspace = true
+ serde_json.workspace = true
+ 
+--- a/xtask/Cargo.toml
++++ b/xtask/Cargo.toml
+@@ -17,7 +17,7 @@
+ [dependencies]
+ anstyle.workspace = true
+ anyhow.workspace = true
+-bindgen = { version = "0.71.1" }
++bindgen = { version = "0.72" }
+ cc.workspace = true
+ clap.workspace = true
+ git2.workspace = true
diff --git a/debian/patches/series b/debian/patches/series
index 256f121f..a2734aa7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,3 +19,4 @@
 0019-tree-sitter-generate-Remove-url-dependency.patch
 0020-fix-loader-fix-no-default-features-build-4505.patch
 0021-build-rust-use-CARGO_PKG_RUST_VERSION-when-generatin.patch
+0022-Relax-bindgen-dependency-to-0.72.patch
diff --git a/debian/tests/control b/debian/tests/control
index e4476a45..7e210fa2 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -3,7 +3,7 @@ Features:
  test-name=librust-tree-sitter-dev:@,
 Depends:
  dh-rust,
- librust-bindgen-0.71+default-dev (>= 0.71.1-~~),
+ librust-bindgen-0.72+default-dev (>= 0.72.0-~~),
  librust-tree-sitter-0.25.6-dev,
  rustc (>= 1.76),
 Restrictions:
diff --git a/lib/Cargo.toml b/lib/Cargo.toml
index ab6d6151..d6634b0c 100644
--- a/lib/Cargo.toml
+++ b/lib/Cargo.toml
@@ -50,7 +50,7 @@ tree-sitter-language = { version = "0.1", path = "language" }
 streaming-iterator = "0.1.9"
 
 [build-dependencies]
-bindgen = { version = "0.71.1", optional = true }
+bindgen = { version = "0.72", optional = true }
 cc.workspace = true
 serde_json.workspace = true
 
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml
index a4000f90..ecfa6e6a 100644
--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -17,7 +17,7 @@ workspace = true
 [dependencies]
 anstyle.workspace = true
 anyhow.workspace = true
-bindgen = { version = "0.71.1" }
+bindgen = { version = "0.72" }
 cc.workspace = true
 clap.workspace = true
 git2.workspace = true
-- 
2.47.2

