summaryrefslogtreecommitdiffstats
path: root/vendor/miniz_oxide/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/miniz_oxide/debian/patches')
-rw-r--r--vendor/miniz_oxide/debian/patches/fix-tests-no-default-features.patch66
-rw-r--r--vendor/miniz_oxide/debian/patches/remove-compiler-builtins.patch20
-rw-r--r--vendor/miniz_oxide/debian/patches/remove-rustc-dep-of-std-etc.patch21
-rw-r--r--vendor/miniz_oxide/debian/patches/remove-simd-adler32.patch10
-rw-r--r--vendor/miniz_oxide/debian/patches/series4
5 files changed, 121 insertions, 0 deletions
diff --git a/vendor/miniz_oxide/debian/patches/fix-tests-no-default-features.patch b/vendor/miniz_oxide/debian/patches/fix-tests-no-default-features.patch
new file mode 100644
index 0000000..f9dfb72
--- /dev/null
+++ b/vendor/miniz_oxide/debian/patches/fix-tests-no-default-features.patch
@@ -0,0 +1,66 @@
+Index: miniz-oxide/src/inflate/mod.rs
+===================================================================
+--- miniz-oxide.orig/src/inflate/mod.rs
++++ miniz-oxide/src/inflate/mod.rs
+@@ -277,25 +277,31 @@ pub fn decompress_slice_iter_to_slice<'o
+ #[cfg(test)]
+ mod test {
+ use super::{
+- decompress_slice_iter_to_slice, decompress_to_vec_zlib, decompress_to_vec_zlib_with_limit,
+- DecompressError, TINFLStatus,
++ decompress_slice_iter_to_slice, TINFLStatus,
++ };
++ #[cfg(feature = "with-alloc")]
++ use super::{
++ decompress_to_vec_zlib, decompress_to_vec_zlib_with_limit, DecompressError,
+ };
+ const ENCODED: [u8; 20] = [
+ 120, 156, 243, 72, 205, 201, 201, 215, 81, 168, 202, 201, 76, 82, 4, 0, 27, 101, 4, 19,
+ ];
+
++ #[cfg(feature = "with-alloc")]
+ #[test]
+ fn decompress_vec() {
+ let res = decompress_to_vec_zlib(&ENCODED[..]).unwrap();
+ assert_eq!(res.as_slice(), &b"Hello, zlib!"[..]);
+ }
+
++ #[cfg(feature = "with-alloc")]
+ #[test]
+ fn decompress_vec_with_high_limit() {
+ let res = decompress_to_vec_zlib_with_limit(&ENCODED[..], 100_000).unwrap();
+ assert_eq!(res.as_slice(), &b"Hello, zlib!"[..]);
+ }
+
++ #[cfg(feature = "with-alloc")]
+ #[test]
+ fn fail_to_decompress_with_limit() {
+ let res = decompress_to_vec_zlib_with_limit(&ENCODED[..], 8);
+Index: miniz-oxide/src/inflate/stream.rs
+===================================================================
+--- miniz-oxide.orig/src/inflate/stream.rs
++++ miniz-oxide/src/inflate/stream.rs
+@@ -369,8 +369,10 @@ fn push_dict_out(state: &mut InflateStat
+ mod test {
+ use super::{inflate, InflateState};
+ use crate::{DataFormat, MZFlush, MZStatus};
++ #[cfg(feature = "with-alloc")]
+ use alloc::vec;
+
++ #[cfg(feature = "with-alloc")]
+ #[test]
+ fn test_state() {
+ let encoded = [
+Index: miniz-oxide/src/inflate/core.rs
+===================================================================
+--- miniz-oxide.orig/src/inflate/core.rs
++++ miniz-oxide/src/inflate/core.rs
+@@ -1700,7 +1700,7 @@ pub fn decompress(
+ )
+ }
+
+-#[cfg(test)]
++#[cfg(all(test,any(feature = "std",feature = "with-alloc")))]
+ mod test {
+ use super::*;
+
diff --git a/vendor/miniz_oxide/debian/patches/remove-compiler-builtins.patch b/vendor/miniz_oxide/debian/patches/remove-compiler-builtins.patch
new file mode 100644
index 0000000..93ee4a7
--- /dev/null
+++ b/vendor/miniz_oxide/debian/patches/remove-compiler-builtins.patch
@@ -0,0 +1,20 @@
+Description: remove compiler-builtins feature.
+ The feature fails to build and the ftpmasters are rejecting new rust
+ feature packages.
+Author: Peter Michael Green <plugwash@debian.org>
+
+Index: miniz-oxide/Cargo.toml
+===================================================================
+--- miniz-oxide.orig/Cargo.toml
++++ miniz-oxide/Cargo.toml
+@@ -42,10 +42,6 @@ name = "miniz_oxide"
+ version = "1.0"
+ default-features = false
+
+-[dependencies.compiler_builtins]
+-version = "0.1.2"
+-optional = true
+-
+ [dependencies.simd-adler32]
+ version = "0.3"
+ optional = true
diff --git a/vendor/miniz_oxide/debian/patches/remove-rustc-dep-of-std-etc.patch b/vendor/miniz_oxide/debian/patches/remove-rustc-dep-of-std-etc.patch
new file mode 100644
index 0000000..dce9536
--- /dev/null
+++ b/vendor/miniz_oxide/debian/patches/remove-rustc-dep-of-std-etc.patch
@@ -0,0 +1,21 @@
+--- miniz-oxide.orig/Cargo.toml
++++ miniz-oxide/Cargo.toml
+@@ -45,5 +44,0 @@
+-[dependencies.alloc]
+-version = "1.0.0"
+-optional = true
+-package = "rustc-std-workspace-alloc"
+-
+@@ -54,5 +48,0 @@
+-[dependencies.core]
+-version = "1.0.0"
+-optional = true
+-package = "rustc-std-workspace-core"
+-
+@@ -66,6 +55,0 @@
+-rustc-dep-of-std = [
+- "core",
+- "alloc",
+- "compiler_builtins",
+- "adler/rustc-dep-of-std",
+-]
diff --git a/vendor/miniz_oxide/debian/patches/remove-simd-adler32.patch b/vendor/miniz_oxide/debian/patches/remove-simd-adler32.patch
new file mode 100644
index 0000000..83aa42d
--- /dev/null
+++ b/vendor/miniz_oxide/debian/patches/remove-simd-adler32.patch
@@ -0,0 +1,10 @@
+--- miniz-oxide.orig/Cargo.toml
++++ miniz-oxide/Cargo.toml
+@@ -45,5 +44,0 @@
+-[dependencies.simd-adler32]
+-version = "0.3"
+-optional = true
+-default-features = false
+-
+@@ -52 +46,0 @@
+-simd = ["simd-adler32"]
diff --git a/vendor/miniz_oxide/debian/patches/series b/vendor/miniz_oxide/debian/patches/series
new file mode 100644
index 0000000..9adc4bf
--- /dev/null
+++ b/vendor/miniz_oxide/debian/patches/series
@@ -0,0 +1,4 @@
+remove-rustc-dep-of-std-etc.patch
+remove-compiler-builtins.patch
+remove-simd-adler32.patch
+fix-tests-no-default-features.patch