1 For various reasons sometimes the debcargo-conf patches can't be applied as-is,
2 so we further patch them here. The reasons are as follows:
4 - commoncrypto, commoncrypto-sys: these crates were released before crates.io
5 automatically re-wrote all Cargo.toml files. cargo-vendor outputs the
6 un-re-written original Cargo.toml files, but debcargo will forcibly rewrite
7 even un-re-written ones that were published to crates.io. The patch below
8 rewrites our existing patches so they work against the un-re-written ones.
10 - unicode-normalization, vte, tempfile: have dependency relaxation that applies,
11 but doesn't match the vendored copy
13 diff --git a/src/commoncrypto-sys/debian/patches/no-clippy.patch b/src/commoncrypto-sys/debian/patches/no-clippy.patch
14 index 3e4c8850e..93789f3b8 100644
15 --- a/src/commoncrypto-sys/debian/patches/no-clippy.patch
16 +++ b/src/commoncrypto-sys/debian/patches/no-clippy.patch
18 ---- a/Cargo.toml 2017-01-24 06:56:51.000000000 +0000
19 -+++ b/Cargo.toml 2018-09-15 15:37:47.602333479 +0000
24 keywords = ["crypto", "hash", "digest", "osx", "commoncrypto"]
26 - repository = "https://github.com/malept/rust-commoncrypto"
27 --[dependencies.clippy]
33 - [dev-dependencies.hex]
42 +-clippy = { version = "0.0", optional = true }
46 diff --git a/src/commoncrypto/debian/patches/no-clippy.patch b/src/commoncrypto/debian/patches/no-clippy.patch
47 index 38d9c9255..b21a7cae5 100644
48 --- a/src/commoncrypto/debian/patches/no-clippy.patch
49 +++ b/src/commoncrypto/debian/patches/no-clippy.patch
51 ---- a/Cargo.toml 2017-01-24 06:56:51.000000000 +0000
52 -+++ b/Cargo.toml 2018-09-15 17:37:01.354423224 +0000
57 keywords = ["crypto", "hash", "digest", "osx", "commoncrypto"]
59 - repository = "https://github.com/malept/rust-commoncrypto"
60 --[dependencies.clippy]
64 - [dependencies.commoncrypto-sys]
66 - [dev-dependencies.hex]
73 + commoncrypto-sys = { version = "0.2.0", path = "../commoncrypto-sys" }
75 +-clippy = { version = "0.0", optional = true }
79 diff --git a/src/tempfile/debian/patches/series b/src/tempfile/debian/patches/series
80 index 75abb7f14..2378a84ba 100644
81 --- a/src/tempfile/debian/patches/series
82 +++ b/src/tempfile/debian/patches/series
86 diff --git a/src/unicode-normalization/debian/patches/series b/src/unicode-normalization/debian/patches/series
87 index 2c1db10bd..39fe7a4da 100644
88 --- a/src/unicode-normalization/debian/patches/series
89 +++ b/src/unicode-normalization/debian/patches/series
91 disable-tests-missing-testdata.patch
92 -switch-back-to-smallvec.patch
93 diff --git a/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch b/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch
94 deleted file mode 100644
95 index 06e816ca7..000000000
96 --- a/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch
99 -This patch switches back to using smallvec as we do not have tinyvec in Debian.
100 -It is based on a revert of upstream commit d6abe8e5148c2c513cb65f487a037c7600de2498
101 -adapted by Peter Michael Green for use in the Debian package.
103 -Index: unicode-normalization/src/decompose.rs
104 -===================================================================
105 ---- unicode-normalization.orig/src/decompose.rs
106 -+++ unicode-normalization/src/decompose.rs
108 - use core::fmt::{self, Write};
109 - use core::iter::Fuse;
110 - use core::ops::Range;
111 --use tinyvec::TinyVec;
112 -+use smallvec::SmallVec;
115 - enum DecompositionType {
116 -@@ -32,7 +32,7 @@ pub struct Decompositions<I> {
117 - // 2) "Ready" characters which are sorted and ready to emit on demand;
118 - // 3) A "pending" block which stills needs more characters for us to be able
119 - // to sort in canonical order and is not safe to emit.
120 -- buffer: TinyVec<[(u8, char); 4]>,
121 -+ buffer: SmallVec<[(u8, char); 4]>,
122 - ready: Range<usize>,
125 -@@ -41,7 +41,7 @@ pub fn new_canonical<I: Iterator<Item =
127 - kind: self::DecompositionType::Canonical,
129 -- buffer: TinyVec::new(),
130 -+ buffer: SmallVec::new(),
134 -@@ -51,7 +51,7 @@ pub fn new_compatible<I: Iterator<Item =
136 - kind: self::DecompositionType::Compatible,
138 -- buffer: TinyVec::new(),
139 -+ buffer: SmallVec::new(),
143 -Index: unicode-normalization/src/lib.rs
144 -===================================================================
145 ---- unicode-normalization.orig/src/lib.rs
146 -+++ unicode-normalization/src/lib.rs
147 -@@ -50,7 +50,7 @@ extern crate alloc;
148 - #[cfg(feature = "std")]
151 --extern crate tinyvec;
152 -+extern crate smallvec;
154 - pub use crate::decompose::Decompositions;
155 - pub use crate::quick_check::{
156 -Index: unicode-normalization/src/recompose.rs
157 -===================================================================
158 ---- unicode-normalization.orig/src/recompose.rs
159 -+++ unicode-normalization/src/recompose.rs
162 - use crate::decompose::Decompositions;
163 - use core::fmt::{self, Write};
164 --use tinyvec::TinyVec;
165 -+use smallvec::SmallVec;
168 - enum RecompositionState {
169 -@@ -24,7 +24,7 @@ enum RecompositionState {
170 - pub struct Recompositions<I> {
171 - iter: Decompositions<I>,
172 - state: RecompositionState,
173 -- buffer: TinyVec<[char; 4]>,
174 -+ buffer: SmallVec<[char; 4]>,
175 - composee: Option<char>,
176 - last_ccc: Option<u8>,
178 -@@ -34,7 +34,7 @@ pub fn new_canonical<I: Iterator<Item =
180 - iter: super::decompose::new_canonical(iter),
181 - state: self::RecompositionState::Composing,
182 -- buffer: TinyVec::new(),
183 -+ buffer: SmallVec::new(),
187 -@@ -45,7 +45,7 @@ pub fn new_compatible<I: Iterator<Item =
189 - iter: super::decompose::new_compatible(iter),
190 - state: self::RecompositionState::Composing,
191 -- buffer: TinyVec::new(),
192 -+ buffer: SmallVec::new(),
196 -Index: unicode-normalization/Cargo.toml
197 -===================================================================
198 ---- unicode-normalization.orig/Cargo.toml
199 -+++ unicode-normalization/Cargo.toml
200 -@@ -43,9 +43,8 @@ keywords = [
201 - license = "MIT/Apache-2.0"
202 - repository = "https://github.com/unicode-rs/unicode-normalization"
204 --[dependencies.tinyvec]
205 -+[dependencies.smallvec]
207 --features = ["alloc"]
211 -Index: unicode-normalization/src/replace.rs
212 -===================================================================
213 ---- unicode-normalization.orig/src/replace.rs
214 -+++ unicode-normalization/src/replace.rs
216 - // option. This file may not be copied, modified, or distributed
217 - // except according to those terms.
218 - use core::fmt::{self, Write};
219 --use tinyvec::ArrayVec;
220 -+use smallvec::SmallVec;
222 - /// External iterator for replacements for a string's characters.
224 -@@ -36,7 +36,7 @@ impl<I: Iterator<Item = char>> Iterator
225 - match self.iter.next() {
227 - // At this time, the longest replacement sequence has length 2.
228 -- let mut buffer = ArrayVec::<[char; 2]>::new();
229 -+ let mut buffer = SmallVec::<[char; 2]>::new();
230 - super::char::decompose_cjk_compat_variants(ch, |d| buffer.push(d));
231 - self.buffer = buffer.get(1).copied();
233 diff --git a/src/vte/debian/patches/arrayvec.diff b/src/vte/debian/patches/arrayvec.diff
234 deleted file mode 100644
235 index 1923f9577..000000000
236 --- a/src/vte/debian/patches/arrayvec.diff
239 -Index: vte/Cargo.toml
240 -===================================================================
241 ---- vte.orig/Cargo.toml
243 -@@ -24,7 +24,7 @@ categories = ["parsing", "no-std"]
244 - license = "Apache-2.0 OR MIT"
245 - repository = "https://github.com/alacritty/vte"
246 - [dependencies.arrayvec]
250 - default-features = false
252 -Index: vte/src/lib.rs
253 -===================================================================
254 ---- vte.orig/src/lib.rs
256 -@@ -78,7 +78,7 @@ pub struct Parser {
259 - #[cfg(feature = "no_std")]
260 -- osc_raw: ArrayVec<[u8; MAX_OSC_RAW]>,
261 -+ osc_raw: ArrayVec<u8, MAX_OSC_RAW>,
262 - #[cfg(not(feature = "no_std"))]
264 - osc_params: [(usize, usize); MAX_OSC_PARAMS],
265 diff --git a/src/vte/debian/patches/series b/src/vte/debian/patches/series
266 index 011b1a629..203bdd762 100644
267 --- a/src/vte/debian/patches/series
268 +++ b/src/vte/debian/patches/series
270 00-remove-nightly-feature