aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/i3status-rust/files/gitless-hash-and-date.patch')
-rw-r--r--x11-misc/i3status-rust/files/gitless-hash-and-date.patch24
1 files changed, 20 insertions, 4 deletions
diff --git a/x11-misc/i3status-rust/files/gitless-hash-and-date.patch b/x11-misc/i3status-rust/files/gitless-hash-and-date.patch
index db16c8a3a..5efefaaa4 100644
--- a/x11-misc/i3status-rust/files/gitless-hash-and-date.patch
+++ b/x11-misc/i3status-rust/files/gitless-hash-and-date.patch
@@ -4,7 +4,7 @@ placeholder values within the ebuild.
Author: Lucio Sauer <watermanpaint@posteo.net>
--- a/build.rs
+++ b/build.rs
-@@ -1,16 +1,6 @@
+@@ -1,25 +1,11 @@
-use std::process::Command;
-
fn main() {
@@ -18,8 +18,24 @@ Author: Lucio Sauer <watermanpaint@posteo.net>
- .env("GIT_CONFIG_GLOBAL", "/dev/null")
- .output()
- .map(|o| String::from_utf8(o.stdout).unwrap());
+- if let (Ok(hash), Ok(date)) = (hash, date) {
+- let ver = format!(
+- "{} (commit {} {})",
+- env!("CARGO_PKG_VERSION"),
+- hash.trim(),
+- date.trim_matches('\'')
+- );
+- println!("cargo:rustc-env=VERSION={ver}");
+- } else {
+- println!("cargo:rustc-env=VERSION={}", env!("CARGO_PKG_VERSION"));
+- }
+ let hash = String::from("%COMMIT%");
+ let date = String::from("%DATE%");
- if let (Ok(hash), Ok(date)) = (hash, date) {
- let ver = format!(
- "{} (commit {} {})",
++ let ver = format!(
++ "{} (commit {} {})",
++ env!("CARGO_PKG_VERSION"),
++ hash.trim(),
++ date.trim_matches('\'')
++ );
++ println!("cargo:rustc-env=VERSION={ver}");
+ }