diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/fix-tests-permission-denied.patch | 12 | ||||
-rw-r--r-- | debian/patches/relax-dep.diff | 22 | ||||
-rw-r--r-- | debian/patches/series | 3 | ||||
-rw-r--r-- | debian/patches/use-cython3-for-tests.patch | 13 |
4 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches/fix-tests-permission-denied.patch b/debian/patches/fix-tests-permission-denied.patch new file mode 100644 index 0000000..4eb44d4 --- /dev/null +++ b/debian/patches/fix-tests-permission-denied.patch @@ -0,0 +1,12 @@ +--- rust-cbindgen-0.26.0.orig/tests/tests.rs ++++ rust-cbindgen-0.26.0/tests/tests.rs +@@ -204,6 +204,9 @@ fn run_compile_test( + let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); + let tests_path = Path::new(&crate_dir).join("tests"); + let mut generated_file = tests_path.join("expectations"); ++ if let Some(cargo_target_tmpdir) = option_env!("CARGO_TARGET_TMPDIR") { ++ generated_file = Path::new(cargo_target_tmpdir).join("expectations"); ++ } + fs::create_dir_all(&generated_file).unwrap(); + + let style_ext = style diff --git a/debian/patches/relax-dep.diff b/debian/patches/relax-dep.diff new file mode 100644 index 0000000..c321b12 --- /dev/null +++ b/debian/patches/relax-dep.diff @@ -0,0 +1,22 @@ +Index: cbindgen/Cargo.toml +=================================================================== +--- cbindgen.orig/Cargo.toml ++++ cbindgen/Cargo.toml +@@ -53,7 +53,7 @@ optional = true + version = "0.4" + + [dependencies.indexmap] +-version = "1" ++version = ">= 1" + + [dependencies.log] + version = "0.4" +@@ -91,7 +91,7 @@ version = "3" + version = "0.5" + + [dev-dependencies.serial_test] +-version = "0.5.0" ++version = ">= 0.5.0, < 3" + + [features] + default = ["clap"] diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..587c4c0 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +use-cython3-for-tests.patch +relax-dep.diff +fix-tests-permission-denied.patch diff --git a/debian/patches/use-cython3-for-tests.patch b/debian/patches/use-cython3-for-tests.patch new file mode 100644 index 0000000..7ba5269 --- /dev/null +++ b/debian/patches/use-cython3-for-tests.patch @@ -0,0 +1,13 @@ +Index: build/cbindgen/tests/tests.rs +=================================================================== +--- cbindgen/tests/tests.rs ++++ cbindgen/tests/tests.rs +@@ -71,7 +71,7 @@ fn compile( + let cc = match language { + Language::Cxx => env::var("CXX").unwrap_or_else(|_| "g++".to_owned()), + Language::C => env::var("CC").unwrap_or_else(|_| "gcc".to_owned()), +- Language::Cython => env::var("CYTHON").unwrap_or_else(|_| "cython".to_owned()), ++ Language::Cython => env::var("CYTHON").unwrap_or_else(|_| "cython3".to_owned()), + }; + + let file_name = cbindgen_output |