gitui: 0.25.2 -> 0.26.1

This commit is contained in:
Tim Biermann 2024-04-22 23:43:30 +02:00
parent 0ca01e24aa
commit 1608a22db3
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 49 additions and 5 deletions

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF300TZvhpPxZNY6h25F8IqyPSIaTIlpuM/lvcFL1Oh4iks2S/I2MmfBjJmNaiDwEcEzpIeVYvBd1KZur6UNQr4gA=
SHA256 (Pkgfile) = 55238488146de1c8a619c1ef1be29b3ba75ef0103ef0d43f3d8bb2865ae19296
RWSagIOpLGJF3+jjMd4c8c4teFIaunEEYAmJoO6yGjljS4Mv6PKVGW4fnekUnNGeXYNmyGJJoN09QgJu1eHUnDpwg4mFmliaaAo=
SHA256 (Pkgfile) = 448c05bbd1de134fdda3fd35fc0844c9709c6a3358ef05922449d0956a4fa92e
SHA256 (.footprint) = adfcc47470b14395e43a31d4d47625f61396b4f69abaa4f0f4a0b0aff4337667
SHA256 (gitui-0.25.2.tar.gz) = 5a67d526e22533952a747cb34eb2430a1340dd3139f60a785f579bba4a6aa5ed
SHA256 (gitui-0.26.1.tar.gz) = b1b0a6c692771a4e37f7ff33490365f8f330660a4110adf650b2483d99379c1d
SHA256 (no-git.patch) = dc934a74b908b95c6b695a2ded379788154f1b02f0739ac8cd46aea50e7bb5c8

View File

@ -4,14 +4,16 @@
# Depends on: libgit2 rust xorg-libxcb
name=gitui
version=0.25.2
version=0.26.1
release=1
source=(https://github.com/extrawurst/gitui/archive/v$version/$name-$version.tar.gz)
source=(https://github.com/extrawurst/gitui/archive/v$version/$name-$version.tar.gz
no-git.patch)
build() {
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
[[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust
patch -Np1 -d $name-$version -i $SRC/no-git.patch
cargo build --release --manifest-path $name-$version/Cargo.toml
install -Dt $PKG/usr/bin $name-$version/target/release/$name

41
gitui/no-git.patch Normal file
View File

@ -0,0 +1,41 @@
diff --git a/build.rs b/build.rs
index 64470c1..874a5d7 100644
--- a/build.rs
+++ b/build.rs
@@ -1,34 +1,10 @@
-fn get_git_hash() -> String {
- use std::process::Command;
-
- let commit = Command::new("git")
- .arg("rev-parse")
- .arg("--short")
- .arg("--verify")
- .arg("HEAD")
- .output();
- if let Ok(commit_output) = commit {
- let commit_string =
- String::from_utf8_lossy(&commit_output.stdout);
-
- return commit_string.lines().next().unwrap_or("").into();
- }
-
- panic!("Can not get git commit: {}", commit.unwrap_err());
-}
-
fn main() {
let build_date = chrono::Local::now().date_naive();
let build_name = if std::env::var("GITUI_RELEASE").is_ok() {
- format!(
- "{} {} ({})",
- env!("CARGO_PKG_VERSION"),
- build_date,
- get_git_hash()
- )
+ format!("{} {}", env!("CARGO_PKG_VERSION"), build_date)
} else {
- format!("nightly {} ({})", build_date, get_git_hash())
+ format!("nightly {}", build_date)
};
println!("cargo:warning=buildname '{}'", build_name);