aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2024-07-11 13:05:13 +0200
committerLucio Sauer <watermanpaint@posteo.net>2024-07-11 13:08:00 +0200
commit13c4e705268820984b5f4a8a326df8fc7b583f2a (patch)
treea5c87213967d73bd189d7d5e77d473f9fb2be164
parentgui-apps/showmethekey: drop myself as a maintainer (diff)
downloadguru-13c4e705268820984b5f4a8a326df8fc7b583f2a.tar.gz
guru-13c4e705268820984b5f4a8a326df8fc7b583f2a.tar.bz2
guru-13c4e705268820984b5f4a8a326df8fc7b583f2a.zip
x11-misc/i3status-rust: provide release hash and date without git
Fixes output of `i3status-rs -V` Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
-rw-r--r--x11-misc/i3status-rust/files/gitless-hash-and-date.patch25
-rw-r--r--x11-misc/i3status-rust/i3status-rust-0.32.3.ebuild12
-rw-r--r--x11-misc/i3status-rust/i3status-rust-0.33.0.ebuild10
-rw-r--r--x11-misc/i3status-rust/i3status-rust-0.33.1.ebuild10
4 files changed, 56 insertions, 1 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
new file mode 100644
index 000000000..db16c8a3a
--- /dev/null
+++ b/x11-misc/i3status-rust/files/gitless-hash-and-date.patch
@@ -0,0 +1,25 @@
+Statically provide the release commit hash and date by replacing the
+placeholder values within the ebuild.
+
+Author: Lucio Sauer <watermanpaint@posteo.net>
+--- a/build.rs
++++ b/build.rs
+@@ -1,16 +1,6 @@
+-use std::process::Command;
+-
+ fn main() {
+- let hash = Command::new("git")
+- .args(["rev-parse", "--short", "HEAD"])
+- .env("GIT_CONFIG_GLOBAL", "/dev/null")
+- .output()
+- .map(|o| String::from_utf8(o.stdout).unwrap());
+- let date = Command::new("git")
+- .args(["log", "--pretty=format:'%ad'", "-n1", "--date=short"])
+- .env("GIT_CONFIG_GLOBAL", "/dev/null")
+- .output()
+- .map(|o| String::from_utf8(o.stdout).unwrap());
++ let hash = String::from("%COMMIT%");
++ let date = String::from("%DATE%");
+ if let (Ok(hash), Ok(date)) = (hash, date) {
+ let ver = format!(
+ "{} (commit {} {})",
diff --git a/x11-misc/i3status-rust/i3status-rust-0.32.3.ebuild b/x11-misc/i3status-rust/i3status-rust-0.32.3.ebuild
index 7a9a1ee14..b51bc50f5 100644
--- a/x11-misc/i3status-rust/i3status-rust-0.32.3.ebuild
+++ b/x11-misc/i3status-rust/i3status-rust-0.32.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020-2023 Gentoo Authors
+# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.10
@@ -377,8 +377,18 @@ DEPEND="dev-libs/openssl:=
RDEPEND="${DEPEND}"
BDEPEND=">=virtual/rust-1.72.0"
+PATCHES="${FILESDIR}"/gitless-hash-and-date.patch
+
QA_FLAGS_IGNORED="usr/bin/i3status-rs"
+src_prepare() {
+ default
+ local COMMIT="6d936b9698902ad4bd35294cdb26147c1b23bb90"
+ local DATE="2023-11-22"
+ sed -e "s/%COMMIT%/${COMMIT:0:9}/" -e "s/%DATE%/${DATE}/" \
+ -i build.rs || die
+}
+
src_configure() {
local myfeatures=(
$(usex debug debug_borders "")
diff --git a/x11-misc/i3status-rust/i3status-rust-0.33.0.ebuild b/x11-misc/i3status-rust/i3status-rust-0.33.0.ebuild
index f7a453afa..ce3bca70f 100644
--- a/x11-misc/i3status-rust/i3status-rust-0.33.0.ebuild
+++ b/x11-misc/i3status-rust/i3status-rust-0.33.0.ebuild
@@ -405,8 +405,18 @@ BDEPEND="
pipewire? ( sys-devel/clang )
"
+PATCHES="${FILESDIR}"/gitless-hash-and-date.patch
+
QA_FLAGS_IGNORED="usr/bin/i3status-rs"
+src_prepare() {
+ default
+ local COMMIT="e62d10e9ce9f6b381f6095ddc7bbf6f5a891012d"
+ local DATE="2024-02-19"
+ sed -e "s/%COMMIT%/${COMMIT:0:9}/" -e "s/%DATE%/${DATE}/" \
+ -i build.rs || die
+}
+
src_configure() {
local myfeatures=(
$(usex debug debug_borders "")
diff --git a/x11-misc/i3status-rust/i3status-rust-0.33.1.ebuild b/x11-misc/i3status-rust/i3status-rust-0.33.1.ebuild
index bf604d090..45393e950 100644
--- a/x11-misc/i3status-rust/i3status-rust-0.33.1.ebuild
+++ b/x11-misc/i3status-rust/i3status-rust-0.33.1.ebuild
@@ -407,8 +407,18 @@ BDEPEND="
pipewire? ( sys-devel/clang )
"
+PATCHES="${FILESDIR}"/gitless-hash-and-date.patch
+
QA_FLAGS_IGNORED="usr/bin/i3status-rs"
+src_prepare() {
+ default
+ local COMMIT="974402d0d3cd458e9df14581d53081779fd6ef6b"
+ local DATE="2024-04-07"
+ sed -e "s/%COMMIT%/${COMMIT:0:9}/" -e "s/%DATE%/${DATE}/" \
+ -i build.rs || die
+}
+
src_configure() {
local myfeatures=(
$(usev debug debug_borders)