mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
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>
This commit is contained in:
25
x11-misc/i3status-rust/files/gitless-hash-and-date.patch
Normal file
25
x11-misc/i3status-rust/files/gitless-hash-and-date.patch
Normal file
@@ -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 {} {})",
|
||||
@@ -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 "")
|
||||
|
||||
@@ -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 "")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user