Codebase list rust-stfu8 / 67caefe
bat: refresh of the patches and liquid no longer needed Sylvestre Ledru 3 years ago
6 changed file(s) with 18 addition(s) and 116 deletion(s). Raw diff Collapse all Expand all
0 rust-bat (0.15.4-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
0 rust-bat (0.16.0-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
11
22 * Team upload.
3 * Package bat 0.15.4 from crates.io using debcargo 2.4.3
3 * Package bat 0.16.0 from crates.io using debcargo 2.4.2
44
5 -- Sylvestre Ledru <sylvestre@debian.org> Sun, 28 Jun 2020 20:19:40 +0200
5 -- Sylvestre Ledru <sylvestre@debian.org> Sat, 03 Oct 2020 12:38:23 +0200
66
77 rust-bat (0.12.1-2) unstable; urgency=medium
88
3939 FIXME (overlay): These notices are extracted from files. Please review them
4040 before uploading to the archive.
4141
42 Files: ./doc/README-ru.md
43 Copyright: 2018-2020 [Разработчики bat](https://github.com/sharkdp/bat).
44 License: UNKNOWN-LICENSE; FIXME (overlay)
45 Comment:
46 FIXME (overlay): These notices are extracted from files. Please review them
47 before uploading to the archive.
48
4249 Files: ./src/less.rs
4350 Copyright:
4451 1984-2016 Mark Nudelman
4552 1984-2017 Mark Nudelman
4653 1984-2019 Mark Nudelman
54 License: UNKNOWN-LICENSE; FIXME (overlay)
55 Comment:
56 FIXME (overlay): These notices are extracted from files. Please review them
57 before uploading to the archive.
58
59 Files: ./tests/syntax-tests/source/SASS/LICENSE.md
60 Copyright: 2006-2018 Hampton Catlin, Natalie Weizenbaum, Chris Eppstein, and
4761 License: UNKNOWN-LICENSE; FIXME (overlay)
4862 Comment:
4963 FIXME (overlay): These notices are extracted from files. Please review them
+0
-13
src/bat/debian/patches/bump-liquid.diff less more
0 Index: bat/Cargo.toml
1 ===================================================================
2 --- bat.orig/Cargo.toml
3 +++ bat/Cargo.toml
4 @@ -110,7 +110,7 @@ version = "2.33"
5 optional = true
6
7 [build-dependencies.liquid]
8 -version = "0.20"
9 +version = "0.21"
10 optional = true
11
12 [features]
55 default-features = false
66
77 [dependencies.console]
8 -version = "0.11.2"
8 -version = "0.12.0"
99 +version = "0.8"
1010
1111 [dependencies.content_inspector]
+0
-97
src/bat/debian/patches/disable-liquid.diff less more
0 From f18009e5d57bb4ee03511a9a2b6fd933d58d539f Mon Sep 17 00:00:00 2001
1 From: sharkdp <davidpeter@web.de>
2 Date: Sun, 20 Sep 2020 19:50:39 +0200
3 Subject: [PATCH] Remove 'liquid' dependency
4
5 ---
6 CHANGELOG.md | 4 +-
7 Cargo.lock | 272 -----------------------------------------
8 Cargo.toml | 8 +-
9 assets/manual/bat.1.in | 2 +-
10 build.rs | 28 +++--
11 5 files changed, 24 insertions(+), 290 deletions(-)
12
13 Index: bat/Cargo.toml
14 ===================================================================
15 --- bat.orig/Cargo.toml
16 +++ bat/Cargo.toml
17 @@ -109,12 +109,8 @@ version = "0.3"
18 version = "2.33"
19 optional = true
20
21 -[build-dependencies.liquid]
22 -version = "0.21"
23 -optional = true
24 -
25 [features]
26 -application = ["atty", "clap", "dirs", "git", "lazy_static", "liquid", "paging", "wild", "regex-onig"]
27 +application = ["atty", "clap", "dirs", "git", "lazy_static", "paging", "wild", "regex-onig"]
28 default = ["application"]
29 git = ["git2"]
30 paging = ["shell-words"]
31 Index: bat/assets/manual/bat.1.in
32 ===================================================================
33 --- bat.orig/assets/manual/bat.1.in
34 +++ bat/assets/manual/bat.1.in
35 @@ -1,4 +1,4 @@
36 -.TH {{PROJECT_EXECUTABLE | upcase}} "1"
37 +.TH {{PROJECT_EXECUTABLE_UPPERCASE}} "1"
38 .SH NAME
39 {{PROJECT_EXECUTABLE}} \- a cat(1) clone with syntax highlighting and Git integration.
40 .SH "USAGE"
41 Index: bat/build.rs
42 ===================================================================
43 --- bat.orig/build.rs
44 +++ bat/build.rs
45 @@ -8,6 +8,7 @@ fn main() {}
46
47 #[cfg(feature = "application")]
48 fn main() -> Result<(), Box<dyn std::error::Error>> {
49 + use std::collections::HashMap;
50 use std::error::Error;
51 use std::fs;
52 use std::path::Path;
53 @@ -15,27 +16,32 @@ fn main() -> Result<(), Box<dyn std::err
54 // Read environment variables.
55 let project_name = option_env!("PROJECT_NAME").unwrap_or("bat");
56 let executable_name = option_env!("PROJECT_EXECUTABLE").unwrap_or(project_name);
57 + let executable_name_uppercase = executable_name.to_uppercase();
58 static PROJECT_VERSION: &str = env!("CARGO_PKG_VERSION");
59
60 - /// Generates a file from a liquid template.
61 + /// Generates a file from a template.
62 fn template(
63 - variables: &liquid::Object,
64 + variables: &HashMap<&str, &str>,
65 in_file: &str,
66 out_file: impl AsRef<Path>,
67 ) -> Result<(), Box<dyn Error>> {
68 - let template = liquid::ParserBuilder::with_stdlib()
69 - .build()?
70 - .parse(&fs::read_to_string(in_file)?)?;
71 + let mut content = fs::read_to_string(in_file)?;
72
73 - fs::write(out_file, template.render(variables)?)?;
74 + for (variable_name, value) in variables {
75 + // Replace {{variable_name}} by the value
76 + let pattern = format!("{{{{{variable_name}}}}}", variable_name = variable_name);
77 + content = content.replace(&pattern, value);
78 + }
79 +
80 + fs::write(out_file, content)?;
81 Ok(())
82 }
83
84 - let variables = liquid::object!({
85 - "PROJECT_NAME": project_name,
86 - "PROJECT_EXECUTABLE": executable_name,
87 - "PROJECT_VERSION": PROJECT_VERSION,
88 - });
89 + let mut variables = HashMap::new();
90 + variables.insert("PROJECT_NAME", project_name);
91 + variables.insert("PROJECT_EXECUTABLE", executable_name);
92 + variables.insert("PROJECT_EXECUTABLE_UPPERCASE", &executable_name_uppercase);
93 + variables.insert("PROJECT_VERSION", PROJECT_VERSION);
94
95 let out_dir_env = std::env::var_os("OUT_DIR").expect("OUT_DIR to be set in build.rs");
96 let out_dir = Path::new(&out_dir_env);
00 change-git2-version.diff
1 bump-liquid.diff
2 disable-liquid.diff